Significance of the matrix $A^2$?

1.9k Views Asked by At

Say you have destinations/places, $A,B,C,D$ and $E$ that are points that you can travel to and from. The only ways to travel between this is by the following schematic:

$A \rightarrow B \\ A \rightarrow E \\ B \rightarrow C \\ B \rightarrow D \\ C \rightarrow A \\ D \rightarrow A \\ D \rightarrow E \\ E \rightarrow B \\ E \rightarrow D$

The links are the arrows and the nodes are the destinations. The connection-matrix is created by the rule

$$a_{ij}=\left\{ \begin{array}{rcr} 1&,& \text{if there is a link from $i$ to $j$.} \\ 0&,& \text{else.} \\ \end{array} \right.$$

In this case, we get the connection matrix

$$A_c=\pmatrix{0&1&0&0&1 \\0&0&1&1&0 \\ 1&0&0&0&0 \\ 1&0&0&0&1 \\ 0&1&0&1&0}.$$

Computing $(A_c)^2$ and $A+(A_c)^2$ I get

$$(A_c)^2=\pmatrix{0&1&1&2&0 \\2&0&0&0&1 \\ 0&1&0&0&1 \\ 0&2&0&1&1 \\ 1&0&1&1&1}, \quad A+(A_c)^2=\pmatrix{0&2&1&2&1 \\2&0&1&1&1 \\ 1&1&0&0&1 \\ 1&1&1&2&1 \\ 0&1&0&1&0}.$$

Questions: What is the explanation/significance of the elements in $(A_c)^2$ and $A+(A_c)^2$? What do they intuitivley mean in terms of flights between the destinations?

How should I think and what should I do in order to derive/realize the answer to the above?

1

There are 1 best solutions below

4
On BEST ANSWER

The square of an adjacency matrix like $A_c$ can be interpreted as the number of paths of length $2$. For example, the $2$ in the $2$nd row and $1$st column shows that there are two paths of length exactly $2$ from $B$ to $A$ ($B \to C \to A$ and $B \to D \to A$). Correspondingly $A_c^2 + A_c$ gives you all the paths of at most length $2$.