0
$\begingroup$

IF $A$ and $B$ are two matrices, find $(A-B)^2$.

My first solution was : $$ A^2 - 2AB + B^2. $$

My second solution was : $$ (A-B)(A-B) \\ A^2 - AB - BA + A^2 $$

Is one of them correct ? or both of them are incorrect ?

$\endgroup$
  • 1
    $\begingroup$ Are you trying to find $(A + B)^2$ or $(A - B)^2$? You need to edit your post to make it clear. As it stands, both your answers are wrong if you are trying to find $(A + B)^2$ $\endgroup$ – user137481 May 11 '14 at 19:12
9
$\begingroup$

$A^2 - 2AB + B^2$ is not true for all matrices.

$A^2 - AB - BA + B^2$ is correct.

You need to know that $AB = BA$ in order to conclude that $(A-B)^2 = A^2 - 2AB + B^2$.

$\endgroup$
6
$\begingroup$

$(A-B)^2=(A-B)(A-B)=A(A-B)-B(A-B)=A^2-AB-BA+B^2$. In general $AB\not=BA$.

$\endgroup$
4
$\begingroup$

In general, the second solution is correct (with $B^2$ instead of $A^2$ at the end) but the first one is incorrect because matrix multiplication isn't commutative.

$\endgroup$
  • $\begingroup$ I meant that .. Thanks $\endgroup$ – Maher May 11 '14 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.