Properties of the adjacency matrix

1.1k Views Asked by At

Here is a seemingly easy exercise from Bondy and Murty’s book on graph theory: For a simple graph $G$, show that the diagonal entries of $A^2$ are the degrees of the vertices of G.

Here, $A$ represents the adjacency matrix of the graph $G$. Although I have managed to come up with a proof that seems to be correct, I am dissatisfied because I do not know how to formulate it more rigorously . The verification that I came up with proceeds as follows:

First note that all entries of $A$ are either $0$ or $1$. Clearly, the diagonal entry $(i,i)$ of $A^2$ is given by:

($i$th row of $A$) $\cdot$ ($i$th column of $A$)

$=$ ($i$th row of $A$) $\cdot$ ($i$th row of $A$)

The previous line follows because $A$ is symmetric, i.e. $A=A^T$. Here, we have the dot product between two vectors.

Observe that all entries are either $0$ or $1$, and that the dot product of the $i$th row of $A$ with itself is equal to the sum of the squares of the entries in the row vector. Thus, we simply have that the dot product of the $i$th row of $A$ with itself is clearly equal to the sum of all the entries in the $i$th row of $A$, that is, the $i$th diagonal entry of $A^2$ is the degree of vertex $i$ in $G$.

However, is there a way to formulate this argument in a more mathematically concise manner?

2

There are 2 best solutions below

0
On BEST ANSWER

In response to the answer provided, I have managed to come up with an inductive proof for a crucial claim provided in the answer (Specifically, prove that the $(i,j)$th entry of $A^k$ is the number of length $k$ walks from vertex $v_i$ to $v_j$). I am posting my proof here for reference purposes, as well as to request for help in checking the validity of the proof. Any suggestions on how to refine/improve this proof are most welcome. @Mohammad Riazi-Kermani can you help me take a look at it?

Proof)

Let $P_k$ be the proposition that the $(i,j)$th entry of $A^k$ is the number of walks of length $k$ from vertex $v_i$ to $v_j$. Clearly, $k=1$ is true due to the way that adjacency matrices are defined. Now, suppose the proposition is true for some $1,2, \cdots m-1, m \in \mathbb{Z^+} $. Let $d_{ij}$ represent the $(i,j)$th entry of $A(G)^{m-1}$. By the induction hypothesis, $d_{ij}$ is precisely the number of length $m-1$ walks between $v_i$ and $v_j$.

Now, by definition of matrix multiplication, $A(G)^m=A(G)^{m-1}A(G)$. Hence, the $(i,j)$th entry of $A(G)^m$, which we denote as $A(G)_{ij}^{m}$, is such that $A(G)_{ij}^{m}=(A(G)^{m-1}A(G))_{ij}$=$d_{i1}a_{1j} \ + d_{i2}a_{2j} \ + \cdots + d_{in}a_{nj}.$

Note that $d_{ir}a_{rj}$ gives us the number of walks of length exactly $m$ from vertices $v_i$ and $v_j$ that passes through $v_r$, $r \in [1,2, \cdots n]$. This is because $d_{ir}$ represents the number of walks of length $m-1$ between $v_i$ and $v_r$, while $a_{ij}$ represents the number of walks of length $1$ between $v_r$ and $v_j$. The conclusion then follows from the Multiplication Principle.

Finally, summing across all possible values of $r$ gives us the total number of walks of length $k$ from $v_i$ to $v_j$ and passing through $v_r$, i.e. $P_{m}$ is true.

Since $P_1$ is true and $P_m$ is true $\Rightarrow$ $P_{m+1}$ is true $\forall$ $m \in \mathbb{Z^+}$, by the Principle of Mathematical Induction, $P_k$ is true $\forall$ $k \in \mathbb{Z^+}$, i.e the $ij$th entry of $A^k$ will be the number of walks of length $k$ from $v_i$ to $v_j$. $\blacksquare$

3
On

Note that the $ij$ entry of $A^k$ counts the number of paths of length $k$ from $v_i$ to $v_j$

Thus if you have a vertex $v_i$ with degree k, that means you have $k$ paths of length $2$ from $v_i$ to itself, so $$ (A^2)_{ii} = k $$