# If A and B are nn matrices, then (A-B)^2 =A^2-2AB+B^2

If A and B are nn matrices, then $\left(A-B{\right)}^{2}={A}^{2}-2AB+{B}^{2}$
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

lamusesamuset
Step 1
Given
$\left(A-B{\right)}^{2}={A}^{2}-2AB+{B}^{2}$
Step 2
Consider
$L.H.S=\left(A-B{\right)}^{2}=\left(A-B\right)\left(A-B\right)$
$=\left(A-B\right)A-\left(A-B\right)B$
$=AA-BA-AB-BB$
$={A}^{2}-BA-AB-{B}^{2}$
Here $L.H.S.=R.H.S$ is possible only when $AB=BA$
Consider
$A=\left[\begin{array}{cc}1& 2\\ 3& 4\end{array}\right],B=\left[\begin{array}{cc}2& 1\\ 3& 1\end{array}\right]$
$AB=\left[\begin{array}{cc}1& 2\\ 3& 4\end{array}\right]\left[\begin{array}{cc}2& 1\\ 3& 1\end{array}\right]=\left[\begin{array}{cc}8& 3\\ 18& 7\end{array}\right]$
$BA=\left[\begin{array}{cc}2& 1\\ 3& 1\end{array}\right]\left[\begin{array}{cc}1& 2\\ 3& 4\end{array}\right]=\left[\begin{array}{cc}5& 8\\ 6& 10\end{array}\right]$
$⇒AB\ne BA$
Hence $\left(A-B{\right)}^{2}={A}^{2}-2AB+{B}^{2}$
Jeffrey Jordon