2.4 Matrix algebra and the product of adjacency matrices — Practise
Work independently. The questions and answers are shown together at the end.
Every power of an adjacency matrix is worked out from the one before: . Check the diagonal of against the degrees before you trust anything else.
- Work out the matrix product .
- For the network with adjacency matrix , work out .
- Using the same , how many walks of length 2 are there from vertex to vertex ? Read it off .
- Using the same , how many walks of length 2 are there from to ?
- Explain why the entry in row , column of counts the walks of length 2 from to .
- For the same , how many walks of length 3 are there from to ? Use .
- A network has adjacency matrix . How many walks of length 2 are there from vertex 1 to vertex 1, and what are they?
Answers and concise solutions
1. Show the answer
1. The product
Answer: . The entry in row 1, column 1 is : row 1 of the first matrix times column 1 of the second.
2. Show the answer
2. M squared
Answer: .
3. Show the answer
3. Number of walks of length 2
Answer: The entry in row , column of is . The two walks are and . The entry on the diagonal counts the walks that return to where they started.
4. Show the answer
4. Number of walks of length 2
Answer: The entry in row , column of is . The only walk of length 2 from to is , because is the only vertex joined to both.
5. Show the answer
5. Why the product counts walks
Answer: A walk of length 2 from to is for some middle vertex . It exists exactly when is joined to and is joined to , which is when both entries and are . Their product is when the walk exists and when it does not. The matrix product adds that product over every possible middle vertex , so it counts exactly the walks that work.
6. Show the answer
6. Number of walks of length 3
Answer: The entry in row , column of is . In general the entry in row , column of counts the walks of length from to .
7. Show the answer
7. Number of walks and the walks
Answer: The entry is . The only walk of length 2 from vertex 1 back to vertex 1 is : vertex 2 is the only neighbour of 1, and it is the only middle vertex available.