A Few Matrix Applications

Example:

$A^2 = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}$

Since $(A^2)_{1,3} = 1$, there is a path of length 2 from City 1 to City 3.

This technique is widely used in network analysis, routing, and social network connectivity.