Matrices

If $\;$ $A = \begin{bmatrix} 3 & 1 \\ -1 & 2 \end{bmatrix}$, then show that $\;$ $A^2 - 5 A + 7 I = 0$


$A = \begin{bmatrix} 3 & 1 \\ -1 & 2 \end{bmatrix}$, $\;$ $I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = 2 \times 2$ $\;$ identity matrix

$\begin{aligned} A^2 = A \times A & = \begin{bmatrix} 3 & 1 \\ -1 & 2 \end{bmatrix} \times \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} 5A & = 5 \times \begin{bmatrix} 3 & 1 \\ -1 & 2 \end{bmatrix} \\\\ & = \begin{bmatrix} 15 & 5 \\ -5 & 10 \end{bmatrix} \end{aligned}$

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

$\begin{aligned} \therefore \; A^2 - 5 A + 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} \\\\ & = 0 \;\;\; \left[\text{null matrix}\right] \end{aligned}$

$\therefore \;$ $A^2 - 5A + 7 I = 0$ $\;\;\;$ Hence proved.