Adjacency matrix
Set
context | $n\in\mathbb N$ |
definiendum | $ A \in \mathrm{it}(n) $ |
postulate | $ A \in \mathrm{SquareMatrix}(n,\mathbb N) $ |
Discussion
If the indices $i,j$ label two vertices of a finite undirected graph, then the value $A_{ij}$ determines the number of edges joining them.
Theorems
The number $(A^n)_{ij}$ is the number of paths from $v_i$ to $v_j$. And so, for example, $\frac{1}{2}\cdot\frac{1}{3}\cdot\mathrm{tr}\,A^3$ is the number of triangles in the graph.