Adjacency matrix of a directed graph
= Adjacency matrix of a directed graph
{title2=$A$}
The adjacency matrix of a finite directed graph has entry $A_{ij}$ equal to the number of directed edges from vertex $i$ to vertex $j$. The entry $(A^n)_{ij}$ counts length-$n$ directed walks from $i$ to $j$, so $\operatorname{tr}(A^n)$ counts pointed closed directed walks of length $n$.