An adjacency matrix indicates if a graph contains an edge from node a to node b.

This is a hard representation to use if the graph is large since it contains elements and most of them are zero. If there is no weight, the entry is then just 1. The matrix is symmetric if the graph is undirected.