Definition:Adjacency Matrix

Definition
An adjacency matrix is a matrix which describes a graph by representing which vertices are adjacent to which other vertices.

If $G$ is a graph of order $n$, then its adjacency matrix is a square matrix of order $n$, where each row and column corresponds to a vertex of $G$.

The element $a_{i j}$ of such a matrix specifies the number of edges from vertex $i$ to vertex $j$.

An adjacency matrix for a simple graph and a loop-digraph is a logical matrix, that is, one whose elements are all either $0$ or $1$.

An adjacency matrix for an undirected graph is symmetrical about the main diagonal.

This is because if vertex $i$ is adjacent to vertex $j$, then $j$ is adjacent to $i$.

An adjacency matrix for a weighted graph or network contains the weights of the edges.