Leaving Certificate Applied Mathematics2.4 Matrix algebra and the product of adjacency matrices

All books

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: M3=M2×MM^3 = M^2 \times M. Check the diagonal of M2M^2 against the degrees before you trust anything else.

  1. Work out the matrix product (1234)(0110)\begin{pmatrix} 1&2\\ 3&4 \end{pmatrix}\begin{pmatrix} 0&1\\ 1&0 \end{pmatrix}.
  2. For the network with adjacency matrix M=(0110101011010010)M = \begin{pmatrix} 0&1&1&0\\ 1&0&1&0\\ 1&1&0&1\\ 0&0&1&0 \end{pmatrix}, work out M2M^2.
  3. Using the same MM, how many walks of length 2 are there from vertex AA to vertex AA? Read it off M2M^2.
  4. Using the same MM, how many walks of length 2 are there from AA to DD?
  5. Explain why the entry in row ii, column jj of M2M^2 counts the walks of length 2 from ii to jj.
  6. For the same MM, how many walks of length 3 are there from AA to CC? Use M3M^3.
  7. A network has adjacency matrix N=(010101010)N = \begin{pmatrix} 0&1&0\\ 1&0&1\\ 0&1&0 \end{pmatrix}. How many walks of length 2 are there from vertex 1 to vertex 1, and what are they?
  8. H For a network with adjacency matrix MM, the number of triangles is tr⁡(M3)6\dfrac{\operatorname{tr}(M^3)}{6}. Use this on the triangle T=(011101110)T = \begin{pmatrix} 0&1&1\\ 1&0&1\\ 1&1&0 \end{pmatrix} to find its number of triangles.

Answers and concise solutions

1. Show the answer

1. The product

Answer: (2143)\begin{pmatrix} 2&1\\ 4&3 \end{pmatrix}. The entry in row 1, column 1 is 1×0+2×1=21 \times 0 + 2 \times 1 = 2: row 1 of the first matrix times column 1 of the second.

2. Show the answer

2. M squared

Answer: M2=(2111121111301101)M^2 = \begin{pmatrix} 2&1&1&1\\ 1&2&1&1\\ 1&1&3&0\\ 1&1&0&1 \end{pmatrix}.

3. Show the answer

3. Number of walks of length 2

Answer: The entry in row AA, column AA of M2M^2 is 22. The two walks are A→B→AA \to B \to A and A→C→AA \to C \to A. 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 AA, column DD of M2M^2 is 11. The only walk of length 2 from AA to DD is A→C→DA \to C \to D, because CC is the only vertex joined to both.

5. Show the answer

5. Why the product counts walks

Answer: A walk of length 2 from ii to jj is i→k→ji \to k \to j for some middle vertex kk. It exists exactly when ii is joined to kk and kk is joined to jj, which is when both entries MikM_{ik} and MkjM_{kj} are 11. Their product is 11 when the walk exists and 00 when it does not. The matrix product adds that product over every possible middle vertex kk, so it counts exactly the walks that work.

6. Show the answer

6. Number of walks of length 3

Answer: The entry in row AA, column CC of M3M^3 is 44. In general the entry in row ii, column jj of MnM^n counts the walks of length nn from ii to jj.

7. Show the answer

7. Number of walks and the walks

Answer: The entry is 11. The only walk of length 2 from vertex 1 back to vertex 1 is 1→2→11 \to 2 \to 1: vertex 2 is the only neighbour of 1, and it is the only middle vertex available.

8. Show the answer

8. Number of triangles

Answer: T3T^3 has diagonal entries all equal to 22, so its trace is 66 and the number of triangles is 6÷6=16 \div 6 = 1. The triangle is the network itself. The division by 66 is because each triangle is counted once from each of its three vertices, and in each of two directions: 3×2=63 \times 2 = 6.

Settings

Colour scheme

Light or dark pages. Your colour and layout stay the same.

Colour

The paper, ink and lettering. Your layout stays the same.

Quiet colours
Bold colours
Layout

How pages are arranged. Your colours stay the same.

Reading offline

Keep this book on this device and read it offline.