Let the matrix
\[
A=\begin{bmatrix}
3& 1 \\
-1& 2
\end{bmatrix}
\]
and
\[
I=\begin{bmatrix}
1& 0 \\
0& 1
\end{bmatrix},
\]
then
\[
A^{2}-5A+7I=
\]
Show Hint
For any \(2\times2\) matrix,
\[
A=
\begin{bmatrix}
a& b
c& d
\end{bmatrix},
\]
always compute matrix polynomials in the order:
\[
\boxed{A^2\rightarrow kA\rightarrow kI\rightarrow \text{add/subtract}.}
\]
Also remember the Cayley--Hamilton theorem:
\[
A^2-(\operatorname{tr}A)A+(\det A)I=O,
\]
which often evaluates matrix expressions in one step.