Adjacency Matrix definition
An adjacency matrix records which pairs of vertices have an edge between them.
Adjacency Matrix in a picture
How it works
Choose an order for the vertices, then use that same order for rows and columns. In a simple graph, the entry in row i and column j is 1 when the two vertices share an edge and 0 otherwise. For a directed graph, use 1 when the edge goes from the row vertex to the column vertex.
Worked examples
What size is the adjacency matrix of a four-vertex graph?
4 × 4.
Why is the matrix symmetric for a simple undirected graph?
Each edge joins its two endpoints in both directions, so the two reflected entries match.
What is the diagonal of the adjacency matrix of a simple graph?
All zeros, because a simple graph has no loops.
Common mistake
For directed graphs, read from row to column. Reversing that convention reverses the edges.
Quick check
What does a zero entry mean in the simple-graph convention?
Show answer
There is no edge between the two vertices.
What does a row sum give in a simple graph?
Show answer
The degree of its vertex.
Must a directed graph have a symmetric adjacency matrix?
Show answer
No.
Sources
Flashcard
Adjacency Matrix
Reveal the definition
An adjacency matrix records which pairs of vertices have an edge between them.
Effortless Math. “Adjacency Matrix.” Math Dictionary.



