Si l'on prend :
$$A=\left(\begin{matrix} 1&0\\0&0 \end{matrix}\right)
\et
B=\left(\begin{matrix} 0&1\\0&0 \end{matrix}\right)$$
alors on a :
\[
A^2 -B^2 \neq (A-B)\,(A+B).
\]
Comment le justifier ?
On pourrait Ă©videmment calculer :
\[
A^2,\quad B^2,\quad A^2-B^2 \et (A+B)\,(A-B)
\]
mais cela fait encore beaucoup de calculs
Avec les matrices choisies, on a :
\[
A^2 = A\,A
= \left(\begin{matrix} 1&0\\0&0 \end{matrix}\right)\left(\begin{matrix} 1&0\\0&0 \end{matrix}\right)
=\left(\begin{matrix} 1&0\\0&0 \end{matrix}\right)
\]
et
\[
B^2 = B\,B
= \left(\begin{matrix} 0&1\\0&0 \end{matrix}\right)\left(\begin{matrix} 0&1\\0&0 \end{matrix}\right)
=\left(\begin{matrix} 0&0\\0&0 \end{matrix}\right).
\]
On en déduit :
\[
A^2-B^2 = A^2 = \left(\begin{matrix} 1&0\\0&0 \end{matrix}\right)
\]
alors que :
\[
(A+B)\,(A-B)
= \left(\begin{matrix} 1&1\\0&0 \end{matrix}\right)
\left(\begin{matrix} 1&-1\\0&\phantom{-}0 \end{matrix}\right)
= \left(\begin{matrix} 1&-1\\0&\phantom{-}0 \end{matrix}\right).
\]
et ce n'est pas indispensable avec ce que l'on a déjà fait.
Comme :
\[
(A-B) \, (A+B)= A^2+A\,B- B\,A-B^2
\]
si l'on a :
\[
(A-B) \, (A+B)= A^2-B^2,
\]
alors on en déduit $A\,B = B\,A$.
Comme on a précédemment prouvé que les matrices $A$ et $B$ choisies
vérifient $A\,B \neq B\,A$, on en déduit :
$$(A-B)\,(A+B)\neq A^2-B^2.$$