An adjacency matrix of a digraph \(D=(V,E,\alpha,\omega)\) is a square matrix of natural numbers \(A\in M_{n\times n}(\mathbb N)\), whose matrix elements are defined by
\[a_{ij}:=\cases{\text{number of edges }v_iv_j\text{ and }v'_iv'_j&\text{ if initial and terminal vertices are the same, i.e. }\alpha(v_iv_j)=\alpha(v'_iv'_j),~\omega(v_iv_j)=\omega(v'_iv'_j)\\ 0&\text{ else.}}\]
An adjacency matrix of a graph \(G=(V,E,\gamma)\) is a square matrix of natural numbers \(A\in M_{n\times n}(\mathbb N)\), whose matrix elements are defined by
\[a_{ij}:=\cases{\text{number of edges }v_iv_j\text{ and }v'_iv'_j&\text{ if the ends are the same, i.e. }\gamma(v_iv_j)=\gamma(v'_iv'_j),\\ 0&\text{ else.}}\]
Examples: 1