# If $$A = \begin{bmatrix} 2 & -2 \\ -3 & 4 \end{bmatrix}$$, find $$-A^2+6A.$$

Toolbox:
• The sum / difference $A(+/-)B$ of two $m$-by-$n$ matrices $A$ and $B$ is calculated entrywise: $(A (+/-) B)_{i,j} = A_{i,j} +/- B_{i,j}$ where 1 ≤ i ≤ m and 1 ≤ j ≤ n.
• If A is an m-by-n matrix and B is an n-by-p matrix, then their matrix product AB is the m-by-p matrix whose entries are given by dot product of the corresponding row of A and the corresponding column of B: $\begin{bmatrix}AB\end{bmatrix}_{i,j} = A_{i,1}B_{1,j} + A_{i,2}B_{2,j} + A_{i,3}B_{3,j} ... A_{i,n}B_{n,j}$
Step1:
Given:
$A=\begin{bmatrix}2 & -2\\-3 & 4\end{bmatrix}$
$A^2=A.A=\begin{bmatrix}2 & -2\\-3 & 4\end{bmatrix}\begin{bmatrix}2 & -2\\-3 & 4\end{bmatrix}$
$\quad=\begin{bmatrix}2(2)+(-2)(-3) & 2(-2)+(-2)(4)\\-3(2)+4(-3) & -3(-2)+4(4)\end{bmatrix}$
$\quad=\begin{bmatrix}4+6 & -4-8\\-6-12 & 6+16\end{bmatrix}$
$\quad=\begin{bmatrix}10 & -12\\-18 & 22\end{bmatrix}$
Step2:
-$A^2+6A=(-1)\begin{bmatrix}10 & -12\\-18 & 22\end{bmatrix}+6\begin{bmatrix}2 & -2\\-3 & 4\end{bmatrix}$
$\qquad\;\;\;\;=\begin{bmatrix}-10 & 12\\18 & -22\end{bmatrix}+\begin{bmatrix}12 & -12\\-18 & 24\end{bmatrix}$
$\qquad\;\;\;\;=\begin{bmatrix}-10 +12& 12-12\\18-18 & -22+22\end{bmatrix}$
$\qquad\;\;\;\;=\begin{bmatrix}2& 0\\0 & 2\end{bmatrix}$