Matrices

If $A = \begin{bmatrix} 3 & 1 \\ -1 & 2 \end{bmatrix}$ and $I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$, find $A^2 - 5A + 7I$.


$\begin{aligned} A^2 = A \times A & = \begin{bmatrix} 3 & 1 \\ -1 & 2 \end{bmatrix} \begin{bmatrix} 3 & 1 \\ -1 & 2 \end{bmatrix} \\\\ & = \begin{bmatrix} 3 \times 3 + 1 \times \left(-1\right) & 3 \times 1 + 1 \times 2 \\ -1 \times 3 + 2 \times \left(-1\right) & -1 \times 1+ 2 \times 2 \end{bmatrix} \\\\ & = \begin{bmatrix} 8 & 5 \\ -5 & 3 \end{bmatrix} \end{aligned}$

$\begin{aligned} 5 A & = 5 \begin{bmatrix} 3 & 1 \\ -1 & 2 \end{bmatrix} \\\\ & = \begin{bmatrix} 15 & 5 \\ -5 & 10 \end{bmatrix} \end{aligned}$

$\begin{aligned} 7 I & = 7 \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \\\\ & = \begin{bmatrix} 7 & 0 \\ 0 & 7 \end{bmatrix} \end{aligned}$

$\begin{aligned} \therefore \; A^2 - 5A + 7 I & = \begin{bmatrix} 8 & 5 \\ -5 & 3 \end{bmatrix} - \begin{bmatrix} 15 & 5 \\ -5 & 10 \end{bmatrix} + \begin{bmatrix} 7 & 0 \\ 0 & 7 \end{bmatrix} \\\\ & = \begin{bmatrix} 8 - 15 + 7 & 5 - 5 + 0 \\ -5 +5 + 0 & 3 -10 + 7 \end{bmatrix} \\\\ & = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} \end{aligned}$