Adjacency Matrix/Examples

From ProofWiki
Jump to navigation Jump to search

Examples of Adjacency Matrices

Simple Graph

The elements of the adjacency matrix of a simple graph are $0$ and $1$, and the diagonal elements are all zero:

SimpleGraph.png $\qquad \begin{pmatrix} 0 & 1 & 1 & 0 \\ 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ \end{pmatrix}$


Multigraph

The elements of the adjacency matrix of a multigraph are integers, and the diagonal elements are all zero:

Multigraph.png $\qquad \begin{pmatrix} 0 & 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 2 & 1 & 0 & 0 \\ 0 & 2 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 0 & 3 \\ 0 & 0 & 0 & 0 & 3 & 0 \\ \end{pmatrix}$


Digraph

The adjacency matrix for a directed graph is no longer symmetrical about the main diagonal:

Digraph.png $\qquad \begin{pmatrix} 0 & 1 & 0 & 1 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 \\ \end{pmatrix}$


Loop-Graph

The elements on the main diagonal of the adjacency matrix for a loop-graph are not all non-zero:

Pseudograph.png $\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}$


Loop-Multigraph

The elements of the adjacency matrix of a loop-multigraph are integers, and this time some of the diagonal elements are non-zero:

LoopMultigraph.png $\qquad \begin{pmatrix} 0 & 2 & 0 & 0 & 0 & 0 \\ 2 & 0 & 1 & 1 & 0 & 0 \\ 0 & 1 & 2 & 1 & 0 & 0 \\ 0 & 1 & 1 & 2 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 3 \\ 0 & 0 & 0 & 1 & 3 & 0 \\ \end{pmatrix}$


Loop-Digraph

The adjacency matrix for a loop-digraph is not only not symmetrical about the main diagonal, it also has non-zero elements on that main diagonal:

LoopDigraph.png $\qquad \begin{pmatrix} 1 & 1 & 0 & 1 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 \\ \end{pmatrix}$


Network

The adjacency matrix for a general network can have any numbers in any of its elements:

DigraphNetwork.png $\qquad \begin{pmatrix} 0 & 1.2 & 0 & 0.5 \\ 0 & 0 & 0 & 3.4 \\ 0 & 0 & 0 & 0 \\ 4.1 & 0 & 10.1 & 0 \\ \end{pmatrix}$