*This is a guest post written by my friend, Jeremy Kun! He’s the author of the popular blog Math ∩ Programming, your go-to site for learning about algorithms, machine learning, cryptography, and so **much more.*

There’s a deep connection in mathematics between a graph (a set of vertices and edges), and the algebraic properties of special matrices associated with that graph.

Here’s the simplest example of this phenomenon. Say you take an undirected graph and you let be its adjacency matrix, where if is an edge, and otherwise. The matrix is an square matrix with . The remarkable fact is that the entry of contains the number of walks of length from to .