Matrices Exercise Solutions#

Solution to Exercise 1.1

(a) \( A = \begin{pmatrix} 2 & 3 & 4 \\ 3 & 4 & 5 \\ 4 & 5 & 6 \end{pmatrix} \)

(b) \( B = \begin{pmatrix} 1 & -1 & 1 & -1 \\ -1 & 1 & -1 & 1 \\ 1 & -1 & 1 & -1 \\ -1 & 1 & -1 & 1 \end{pmatrix} \)

(c) \( C = \begin{pmatrix} 0 & 1 & 1 & 1 \\ -1 & 0 & 1 & 1 \\ -1 & -1 & 0 & 1 \\ -1 & -1 & -1 & 0 \end{pmatrix} \)

Solution to Exercise 1.2

(a)   \(A + B = \begin{pmatrix} 1 + 3 & -3 + 0 \\ 4 + (-1) & 2 + 5 \end{pmatrix} = \begin{pmatrix} 4 & -3 \\ 3 & 7 \end{pmatrix}\)

(b)   \(B + C\) is undefined since \(B\) is \(2\times 2\) and \(C\) is \(2\times 1\)

(c)   \(A^\mathsf{T} = \begin{pmatrix} 1 & 4 \\ -3 & 2 \end{pmatrix}\)

(d)   \(C^\mathsf{T} = \begin{pmatrix} 5 & 9 \end{pmatrix}\)

(e)   \(3 B - A = \begin{pmatrix} 9 & 0 \\ -3 & 15 \end{pmatrix} - \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} = \begin{pmatrix} 8 & 3 \\ -7 & 13 \end{pmatrix}\)

(f)   \((F^\mathsf{T})^\mathsf{T} = \begin{pmatrix} 1 \\ 2 \\ 4 \end{pmatrix}^\mathsf{T} = \begin{pmatrix} 1 & -2 & 4 \end{pmatrix} = F\)

(g)   \(A^\mathsf{T} + B^\mathsf{T} = \begin{pmatrix} 1 & 4 \\ -3 & 2 \end{pmatrix} + \begin{pmatrix} 3 & -1 \\ 0 & 5 \end{pmatrix} = \begin{pmatrix} 4 & 3 \\ -3 & 7 \end{pmatrix}\)

(h)   \((A + B)^\mathsf{T} = \begin{pmatrix} 4 & -3 \\ 3 & 7 \end{pmatrix}^\mathsf{T} = \begin{pmatrix} 4 & 3 \\ -3 & 7 \end{pmatrix}\)

Solution to Exercise 1.3

(a)   \(AB = \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} \begin{pmatrix} 3 & 0 \\ -1 & 5 \end{pmatrix} = \begin{pmatrix} 3 + 3 & 0 - 15 \\ 7 - 2 & 0 + 10 \end{pmatrix} = \begin{pmatrix}6 & -15 \\ 10 & 10 \end{pmatrix}\)

(b)   \(BA = \begin{pmatrix} 3 & 0 \\ -1 & 5 \end{pmatrix}\begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} = \begin{pmatrix} 3 + 0 & -9 + 0 \\ -1 + 20 & 3 + 10 \end{pmatrix} = \begin{pmatrix} 3 & -9 \\ 19 & 13 \end{pmatrix}\)

(c)   \(AC = \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix}\begin{pmatrix} 5 \\ 9 \end{pmatrix} = \begin{pmatrix} 15 - 27 \\ 20 + 18 \end{pmatrix} = \begin{pmatrix} -22 \\ 38 \end{pmatrix}\)

(d)   \(CA\) is undefined since \(C\) has 1 column and \(A\) has 2 rows

(e)   \(C^\mathsf{T}C = \begin{pmatrix} 5 & 9 \end{pmatrix} \begin{pmatrix} 5 \\ 9 \end{pmatrix} = 25 + 81 = 106\)

(f)   \(CC^\mathsf{T} = \begin{pmatrix} 5 \\ 9 \end{pmatrix}\begin{pmatrix} 5 & 9 \end{pmatrix} = \begin{pmatrix} 25 & 45 \\ 45 & 81 \end{pmatrix}\)

(g)  

\[\begin{split} \begin{align*} DE &= \begin{pmatrix} 1 & 1 & 3 \\ 4 & -2 & 3 \end{pmatrix} \begin{pmatrix} 1 & 2 \\ 0 & 6 \\ -2 & 3 \end{pmatrix} = \begin{pmatrix} 1 + 0 - 6 & 2 + 6 + 9 \\ 4 + 0 - 6 & 8 - 12 + 9 \end{pmatrix} \\ &= \begin{pmatrix} -5 & 17 \\ -2 & 5 \end{pmatrix} \end{align*} \end{split}\]

(h)  

\[\begin{split} \begin{align*} GH &= \begin{pmatrix} 4 & 2 & 3 \\ -2 & 6 & 0 \\ 0 & 7 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 & 1 \\ 5 & 2 & -2 \\ 2 & -3 & 4 \end{pmatrix} \\ &= \begin{pmatrix} 4 + 10 + 6 & 0 + 4 - 9 & 4 - 4 + 12 \\ -2 + 30 + 0 & 0 + 12 + 0 & -2 - 12 + 0 \\ 0 + 35 + 2 & 0 + 14 - 3 & 0 - 14 + 4 \end{pmatrix} \\ &= \begin{pmatrix} 20 & -5 & 12 \\ 28 & 12 & -14 \\ 37 & 11 & -10 \end{pmatrix} \end{align*} \end{split}\]

(i)  

\[\begin{split} \begin{align*} A(DE) &= \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} \left( \begin{pmatrix} 1 & 1 & 3 \\ 4 & -2 & 3 \end{pmatrix} \begin{pmatrix} 1 & 2 \\ 0 & 6 \\ -2 & 3 \end{pmatrix} \right) \\ &= \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} \begin{pmatrix} -5 & 17 \\ -2 & 5 \end{pmatrix} \\ &= \begin{pmatrix} 1 & 2 \\ -24 & 78 \end{pmatrix} \end{align*} \end{split}\]

(j)  

\[\begin{split} \begin{align*} (AD)E &= \left( \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} \begin{pmatrix} 1 & 1 & 3 \\ 4 & -2 & 3 \end{pmatrix} \right) \begin{pmatrix} 1 & 2 \\ 0 & 6 \\ -2 & 3 \end{pmatrix} \\ &= \begin{pmatrix} -11 & 7 & -6 \\ 12 & 0 & 18 \end{pmatrix} \begin{pmatrix} 1 & 2 \\ 0 & 6 \\ -2 & 3 \end{pmatrix} \\ &= \begin{pmatrix} 1 & 2 \\ -24 & 78 \end{pmatrix} \end{align*} \end{split}\]

(k)  

\[\begin{split} \begin{align*} A^3 &= \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} \\ &= \begin{pmatrix} -11 & -9 \\ 12 & -8 \end{pmatrix} \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} \\ &= \begin{pmatrix} -47 & 15 \\ -20 & -52 \end{pmatrix} \end{align*} \end{split}\]

(l)  

\[\begin{split} \begin{align*} G^2 &= \begin{pmatrix} 4 & 2 & 3 \\ -2 & 6 & 0 \\ 0 & 7 & 1 \end{pmatrix} \begin{pmatrix} 4 & 2 & 3 \\ -2 & 6 & 0 \\ 0 & 7 & 1 \end{pmatrix} \\ &= \begin{pmatrix} 12 & 41 & 15 \\ -20 & 32 & -6 \\ -14 & 49 & 1 \end{pmatrix} \\ \therefore G^4 &= G^2G^2 = \begin{pmatrix} 12 & 41 & 15 \\ -20 & 32 & -6 \\ -14 & 49 & 1 \end{pmatrix} \begin{pmatrix} 12 & 41 & 15 \\ -20 & 32 & -6 \\ -14 & 49 & 1 \end{pmatrix} \\ &= \begin{pmatrix} -886 & 2539 & -51 \\ -796 & -90 & -498 \\ -1162 & 1043 & -503 \end{pmatrix} \end{align*} \end{split}\]

Solution to Exercise 1.4

(a)   \(\det(A) = 1(2) - (-3)4 = 2 + 12 = 14\)

(b)   \(|B| = 3(5) - 0(-1) = 15\)

(c)   \(\det(3A) = 3\begin{vmatrix} 3 & -9 \\ 12 & 6 \end{vmatrix} = 3(6) - (-9)(12) = 126\).

Alternatively since each row of \(A\) is multiplied by 3 then we could simply multiply \(\det(A)=14\) by \(3 \times 3 = 9\) to give \(\det(3A) = 126\).

(d)  

\[\begin{split} \begin{align*} \det(G) &= \begin{vmatrix} 4 & 2 & 3 \\ -2 & 6 & 0 \\ 0 & 7 & 1 \end{vmatrix} \\ &= 4 \begin{vmatrix} 6 & 0 \\ 7 & 1 \end{vmatrix} - (-2) \begin{vmatrix} 2 & 3 \\ 7 & 1 \end{vmatrix} \\ &= 4(6) + 2(2 - 21) = -14 \end{align*} \end{split}\]

(e)   \(\operatorname{adj}(B) = \begin{pmatrix} 5 & -(-1) \\ 0 & 3 \end{pmatrix} = \begin{pmatrix} 5 & 0 \\ 1 & 3 \end{pmatrix}\)

(f)  

\[\begin{split} \begin{align*} \operatorname{adj}(H) &= \begin{pmatrix} \begin{vmatrix} 2 & -2 \\ -3 & 4 \end{vmatrix} & - \begin{vmatrix} 5 & -2 \\ 2 & 4 \end{vmatrix} & \begin{vmatrix} 5 & 2 \\ 2 & -3 \end{vmatrix} \\ - \begin{vmatrix} 0 & 1 \\ -3 & 4 \end{vmatrix} & \begin{vmatrix} 1 & 1 \\ 2 & 4 \end{vmatrix} & - \begin{vmatrix} 1 & 0 \\ 2 & -3 \end{vmatrix} \\ \begin{vmatrix} 0 & 1 \\ 2 & -2 \end{vmatrix} & - \begin{vmatrix} 1 & 1 \\ 5 & -2 \end{vmatrix} & \begin{vmatrix} 1 & 0 \\ 5 & 2 \end{vmatrix} \end{pmatrix}^T \\ &= \begin{pmatrix} 2 & -24 & -19 \\ -3 & 2 & 3 \\ -2 & 7 & 2 \end{pmatrix}^T \\ &= \begin{pmatrix} 2 & -3 & -2 \\ -24 & 2 & 7 \\ -19 & 3 & 2 \end{pmatrix} \end{align*} \end{split}\]

(g)  

\[\begin{split} \begin{align*} \operatorname{adj}(A) &= \begin{pmatrix} 2 & 3 \\ -4 & 1 \end{pmatrix}, \qquad \det(A) = 14, \\ \therefore A^{-1} &= \frac{\operatorname{adj}(A)}{\det(A)} = \frac{1}{14}\begin{pmatrix} 2 & 3 \\ -4 & 1 \end{pmatrix} = \begin{pmatrix} \frac{1}{7} & \frac{3}{14} \\ -\frac{2}{7} & \frac{1}{14} \end{pmatrix} \end{align*} \end{split}\]

Check: \(\begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix}\begin{pmatrix} \frac{1}{7} & \frac{3}{14} \\ -\frac{2}{7} & \frac{1}{14} \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \quad \checkmark\)

(h)  

\[\begin{split} \begin{align*} \operatorname{adj}(B) &= \begin{pmatrix} 5 & 0 \\ 1 & 3 \end{pmatrix}, \qquad \det(B) = 15, \\ \therefore B^{-1} &= \frac{\operatorname{adj}(B)}{\det(A)} = \frac{1}{15} \begin{pmatrix} 5 & 0 \\ 1 & 3 \end{pmatrix} = \begin{pmatrix} \frac{1}{3} & 0 \\ \frac{1}{15} & \frac{1}{5} \end{pmatrix} \end{align*} \end{split}\]

Check: \(BB^{-1} = \begin{pmatrix} 3 & 0 \\ -1 & 5 \end{pmatrix}\begin{pmatrix} \frac{1}{3} & 0 \\ \frac{1}{15} & \frac{1}{5} \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \quad \checkmark\)

(i)   \(G^{-1}\)

\[\begin{split} \begin{align*} \operatorname{adj}(G) &= \begin{pmatrix} 6 & 2 & -14 \\ 19 & 4 & -28 \\ -18 & -6 & 28 \end{pmatrix}^T = \begin{pmatrix} 6 & 19 & -18 \\ 2 & 4 & -6 \\ -14 & -28 & 28 \end{pmatrix}, \\ \det(G) &= -14, \\ \therefore G^{-1} &= \frac{\operatorname{adj}(G)}{\det(G)} = -\frac{1}{14} \begin{pmatrix} 6 & 19 & -18 \\ 2 & 4 & -6 \\ -14 & -28 & 28 \end{pmatrix} \\ &= \begin{pmatrix} -\frac{3}{7} & -\frac{19}{14} & \frac{9}{7} \\ -\frac{1}{7} & -\frac{2}{7} & \frac{3}{7} \\ 1 & 2 & -2 \end{pmatrix} \end{align*} \end{split}\]

Check: \(GG^{-1} = \begin{pmatrix} 4 & 2 & 3 \\ -2 & 6 & 0 \\ 0 & 7 & 1 \end{pmatrix} \begin{pmatrix} -\frac{3}{7} & -\frac{19}{14} & \frac{9}{7} \\ -\frac{1}{7} & -\frac{2}{7} & \frac{3}{7} \\ 1 & 2 & -2 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} \quad \checkmark\)

(j)   \((AB)^{-1}\)

\[\begin{split} \begin{align*} \operatorname{adj}(AB) &= \begin{pmatrix} 10 & -15 \\ 10 & 6 \end{pmatrix}, \qquad \det(AB) = 60 + 150 = 210, \\ \therefore (AB)^{-1} &= \frac{\operatorname{adj}(AB)}{\det(AB)} = \frac{1}{210} \begin{pmatrix} 10 & -15 \\ 10 & 6 \end{pmatrix} = \begin{pmatrix} \frac{1}{21} & \frac{1}{14} \\ -\frac{1}{21} & \frac{1}{35} \end{pmatrix} \end{align*} \end{split}\]

Check \((AB)(AB)^{-1} = \begin{pmatrix} 6 & -15 \\ 10 & 10 \end{pmatrix} \begin{pmatrix} \frac{1}{21} & \frac{1}{14} \\ -\frac{1}{21} & \frac{1}{35} \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \quad \checkmark\)

(k)   Using the properties of inverse matrices we know that \((AB)^{-1} = B^{-1}A^{-1}\) so

\[\begin{split} \begin{align*} B^{-1}A^{-1} = \begin{pmatrix} \frac{1}{21} & \frac{1}{14} \\ -\frac{1}{21} & \frac{1}{35} \end{pmatrix} \end{align*} \end{split}\]

(l)  

\[\begin{split} \begin{align*} \operatorname{adj}(DE) &= \begin{pmatrix} 5 & -17 \\ 2 & -5 \end{pmatrix}, \qquad \det(DE) = -25 + 34 = 9, \\ \therefore (DE)^{-1} &= \frac{\operatorname{adj}(DE)}{\det(DE)} = \frac{1}{9} \begin{pmatrix} 5 & -17 \\ 2 & -5 \end{pmatrix} = \begin{pmatrix} \frac{5}{9} & -\frac{17}{9} \\ \frac{2}{9} & -\frac{5}{9} \end{pmatrix} \end{align*} \end{split}\]

Check: \((DE)(DE)^{-1} = \begin{pmatrix} -5 & 17 \\ -2 & 5 \end{pmatrix} \begin{pmatrix} \frac{5}{9} & -\frac{17}{9} \\ \frac{2}{9} & -\frac{5}{9} \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \quad \checkmark\)

Solution to Exercise 1.5

(a)   Row 2 is 2 times row 1 so the determinant is 0.

(b)   This is the same as the matrix \(A\) above but with rows 1 and 2 swapped. Therefore the determinant of this matrix is \(-\det(A) = -14\).

(c)   Column 2 is all zeros so the determinant is 0.

(d)   This it the same as the matrix \(G\) from above with row 2 multiplied by 2. Therefore the determinant of this matrix is \(2\det(G) = 2(-14) = -28\).

(e)   Column 2 is 2 times column 1 so the determinant is 0.

(f)   This is the same as the matrix \(B\) from above with 2 times column 1 added to column 2. Therefore the determinant of this matrix is \(\det(B) = 15\).

Solution to Exercise 1.6

Let

\[\begin{split}A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\end{split}\]

which has the determinant \(\det(A) = ad - bc\). Also let \(k\) be a scalar then adding \(k\) multiplied by row 1 to row 2 of \(A\) gives

\[\begin{split} \begin{pmatrix} a & b \\ c + ka & d + kb \end{pmatrix}. \end{split}\]

Calculating the determinant of this matrix

\[\begin{split} \begin{align*} \begin{vmatrix} a & b \\ c + ka & d + kb \end{vmatrix} &= ad + abk - bc - abk = ad - bc, \end{align*} \end{split}\]

which is equal to \(\det(A)\). Doing similar for adding \(k\) multiples of row 2 to row 1 of \(A\)

\[\begin{split} \begin{align*} \begin{vmatrix} a + kc & b + kd \\ c & d \end{vmatrix} = ad + kcd - bc - kcd = ad - bc, \end{align*} \end{split}\]

which is also equal to \(\det(A)\). Doing similar for the columns of \(A\)

\[\begin{split} \begin{align*} \begin{vmatrix} a & b + ak \\ c & d + ck \end{vmatrix} &= ad + ack - bc - ack = ad - bc, \\ \begin{vmatrix} a + kb & b \\ c + kd & d \end{vmatrix} &= ad + kbd - bc - kbd = ad - bc. \end{align*} \end{split}\]

Solution to Exercise 1.7

(a)

\[\begin{split} \begin{align*} 5X &= A \\ X &= \frac{1}{5} A \\ &= \dfrac{1}{5}\begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} = \begin{pmatrix} \frac{1}{5} & -\frac{3}{5} \\ \frac{4}{5} & \frac{2}{5} \end{pmatrix} \end{align*} \end{split}\]

(b)

\[\begin{split} \begin{align*} X + A &= I \\ X &= I - A \\ &= \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} - \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} = \begin{pmatrix} 0 & 3 \\ -4 & -1 \end{pmatrix} \end{align*} \end{split}\]

(c)

\[\begin{split} \begin{align*} 2X - B &= A \\ 2X &= A + B \\ X &= \dfrac{1}{2}(A + B) = \dfrac{1}{2}\left( \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} + \begin{pmatrix} 3 & 0 \\ -1 & 5 \end{pmatrix} \right) \\ &= \dfrac{1}{2} \begin{pmatrix} 4 & -3 \\ 3 & 7 \end{pmatrix} = \begin{pmatrix} 2 & -\frac{3}{2} \\ \frac{3}{2} & \frac{7}{2} \end{pmatrix} \end{align*} \end{split}\]

(d)

\[\begin{split} \begin{align*} XA &= I \\ X &= IA^{-1} = A^{-1}I \\ &= \dfrac{1}{14} \begin{pmatrix} 2 & 3 \\ -4 & 1 \end{pmatrix} = \begin{pmatrix} \frac{1}{7} & \frac{3}{14} \\ -\frac{2}{7} & \frac{1}{14} \end{pmatrix} \end{align*} \end{split}\]

(e)

\[\begin{split} \begin{align*} BX &= A \\ X &= B^{-1}A \\ &= \dfrac{1}{15}\begin{pmatrix} 5 & 0 \\ 1 & 3 \end{pmatrix} \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} \\ &= \dfrac{1}{15} \begin{pmatrix} 5 & -15 \\ 13 & 3\end{pmatrix} = \begin{pmatrix} \frac{1}{3} & -1 \\ \frac{13}{15} & \frac{1}{5} \end{pmatrix} \end{align*} \end{split}\]

(f)

\[\begin{split} \begin{align*} A^2 &= X \\ X &= \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix}\begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} = \begin{pmatrix} -11 & -9 \\ 12 & -8 \end{pmatrix} \end{align*} \end{split}\]

(g)   We begin by setting \(X = \begin{pmatrix}a & b \\ c & d\end{pmatrix}\), and then \(X^2 = B\) gives

\[\begin{split} \begin{align*} \begin{pmatrix}a^2 + bc & ab + bd \\ ca+dc & cb+d^2\end{pmatrix} = \begin{pmatrix} a^2 + bc & b(a + d) \\ c(a + d) & cb + d^2 \end{pmatrix} = \begin{pmatrix} 3 & 0 \\ -1 & 5 \end{pmatrix}. \end{align*} \end{split}\]

Now we can solve the quadratic equations over \(\mathbb{R}\), since \([X^2]_{12} = 0\) then

\[\begin{split} \begin{align*} b(a + d) &= 0 \\ \therefore b &= 0 \text{ or } a = -d. \end{align*} \end{split}\]

For the case when \(b = 0\)

\[\begin{split} \begin{align*} a^2 + bc &= 3 \implies a = \pm \sqrt{3}, \\ cb + d^2 &= 5 \implies d = \pm \sqrt{5}. \end{align*} \end{split}\]

So we have four possible solutions

\[\begin{split} \begin{align*} X &= \begin{pmatrix} \pm \sqrt{3} & 0 \\ - 1 / (\pm \sqrt{3} \pm \sqrt{5}) & \pm\sqrt{5} \end{pmatrix}, \text{ or }\\ X &= \begin{pmatrix} \pm \sqrt{3} & 0 \\ - 1 / (\pm \sqrt{3} \mp \sqrt{5}) & \mp\sqrt{5} \end{pmatrix}. \end{align*} \end{split}\]

For the case when \(a = -d\)

\[ \begin{align*} c(a + d) = 0c = -1, \end{align*} \]

which is a contradiction so \(a = -d\) yields no solutions.

(h)

\[\begin{split} \begin{align*} (X + A)B &= I \\ X + A &= I B^{-1} \\ X &= B^{-1} - A \\ &= \frac{1}{15} \begin{pmatrix} 5 & 0 \\ 1 & 3 \end{pmatrix} - \begin{pmatrix} 1 & -3 \\ 4 & 2 \end{pmatrix} \\ &= \begin{pmatrix} -2/3 & 3 \\ -59/15 & -9/5 \end{pmatrix} \\ &= \frac{1}{15} \begin{pmatrix} -10 & 45 \\ -59 & -27 \end{pmatrix} \end{align*} \end{split}\]