(related to Definition: Adjacency Matrix)
The following figure shows a digraph \(D\) with \(6\) vertices and some edges:
This digraph has the adjacency matrix. $$\begin{array}{cccccccc} & & a & b & c & d & e & f \cr & & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow \cr a & \rightarrow & 0 & 1 & 1 & 1 & 0 & 0 \cr b & \rightarrow & 2 & 0 & 0 & 0 & 0 & 0 \cr c & \rightarrow & 0 & 3 & 0 & 0 & 0 & 0 \cr d & \rightarrow & 0 & 0 & 0 & 0 & 2 & 0 \cr e & \rightarrow & 0 & 0 & 0 & 0 & 1 & 0 \cr f & \rightarrow & 0 & 0 & 0 & 0 & 0 & 0 \cr \end{array}$$
Please note that an adjacency matrix of a digraph * is in general not symmetric, * diagonal elements \(\neq 0\) indicate loops, * elements of \( > 1 \) indicate multiple edges.
The figure below demonstrates a similar graph with \(G\) with \(6\) vertices and some edges:
The adjacency matrix of this graph is given by
$$ \begin{array}{cccccccc} & & a & b & c & d & e & f \cr & & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow \cr a & \rightarrow & 0 & 3 & 1 & 1 & 0 & 0 \cr b & \rightarrow & 3 & 0 & 3 & 0 & 0 & 0 \cr c & \rightarrow & 1 & 3 & 0 & 0 & 0 & 0 \cr d & \rightarrow & 1 & 0 & 0 & 0 & 2 & 0 \cr e & \rightarrow & 0 & 0 & 0 & 2 & 1 & 0 \cr f & \rightarrow & 0 & 0 & 0 & 0 & 0 & 0 \cr \end{array} $$
Please note that an adjacency matrix of a graph is * always symmetric, * diagonal elements \(\neq 0\) indicate loops, * elements of \( > 1 \) indicate multiple edges.