Adjacency Matrix/Examples/Loop-Graph
Jump to navigation
Jump to search
Example of Adjacency Matrix
The elements on the main diagonal of the adjacency matrix for a loop-graph are not all non-zero:
$\qquad \begin{pmatrix} 0 & 1 & 0 & 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 2 & 1 & 1 & 1 & 0 \\ 0 & 0 & 1 & 2 & 1 & 1 & 0 \\ 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ \end{pmatrix}$
Also defined as
Some other treatments of this subject require that a loop contributes a value of $1$ to the vertex to which it is incident.