We shall now give a brief hint about utility of matrices and linear algebra in answering graph-theoretic questions.
Let be a graph on vertices. For simplicity, assume . The adjacency matrix of a simple finite graph is defined as follows : . The definition can be appropriately extended for multi-graphs.
is a symmetric matrix and hence has real eigenvalues. Define length of a walk/path as the number of edges in the path . We denote it by .
Let be a graph on vertices and be its adjaceny matrix. Then is the number of walks of length from to .
By definition, and since is a valued matrix, we get that . The proof is complete by noting that if i.e., is a walk of length . ∎
Let be the eigenvalues of . Show that the number of closed walks of length in is . Here, we count the walk and as distinct walks.
Count the number of closed walks of length in the complete graph .
The distance between two vertices is defined as We set and if there is no path from to . One can show that defines a metric on a connected graph (see Section 2.5).
Let be a connected graph on vertex set . If , then are linearly independent.
Assume . Since there is no path from to of length less than , for all (show this claim) and . Thus, if are linearly dependent with coefficients , then by the above observation and positivity of entries of for all , we have that i.e., are linearly dependent. Since , there exists such that (show this claim). Now applying the above argument recursively, we get that . ∎
Define .
Let be a connected graph with distinct eigenvalues. Then .
Let . Recall that the minimal polynomial of a matrix is the monic polynomial of least degree such that . By Lemma 2.40, we have that . The proof is complete by observing that the number of distinct eigenvalues of is as is symmetric. ∎
How would you define for multi-graphs or weighted graphs ? Which of the above results hold in such cases ?