MPSI · Calcul matriciel et systèmes linéaires

Opérations sur les matrices et transposition

Somme et multiplication par un scalaire

Question

Une matrice est une famille de nombres rangés dans un tableau. Sur des familles de nombres, deux opérations s'imposent d'elles-mêmes : additionner case par case, et multiplier toutes les cases par un même scalaire. Ces opérations naïves ont-elles un sens ici, et à quelles conditions ?

Définition 1 : Somme de deux matrices et multiplication par un scalaire

Soient A,BMn,p(K)A,B\in\mathcal{M}_{n,p}(\mathbb{K}) et λK\lambda\in\mathbb{K}.

  1. On définit la matrice A+BA+B par [A+B]i,j=[A]i,j+[B]i,j[A+B]_{i,j}=[A]_{i,j}+[B]_{i,j}.
  2. On définit la matrice λA\lambda A par [λA]i,j=λ[A]i,j[\lambda A]_{i,j}=\lambda\,[A]_{i,j}.

Remarque :

  1. La somme de deux matrices n'est définie que pour des matrices de même taille.
  2. Pour tous A,BMn,p(K)A,B\in\mathcal{M}_{n,p}(\mathbb{K}) et tout λK\lambda\in\mathbb{K}, on a A+BMn,p(K)A+B\in\mathcal{M}_{n,p}(\mathbb{K}) et λAMn,p(K)\lambda A\in\mathcal{M}_{n,p}(\mathbb{K}). On dit que Mn,p(K)\mathcal{M}_{n,p}(\mathbb{K}) est stable par somme et par multiplication par un scalaire.
  3. La matrice (1)A(-1)A se note A-A.

Test 1 : Quand la somme est-elle définie ?

La somme A+BA+B est définie dès que AA et BB ont le même nombre de lignes.

Exemple :

Soient A=(213101)A=\begin{pmatrix} 2 & -1 & 3\\ 1 & 0 & 1\end{pmatrix} et B=(012420)B=\begin{pmatrix} 0 & 1 & 2\\ 4 & -2 & 0\end{pmatrix}. On a

A+B=(205521),2A=(426202),3B=(0361260).A+B=\begin{pmatrix} 2 & 0 & 5\\ 5 & -2 & 1\end{pmatrix},\qquad 2A=\begin{pmatrix} 4 & -2 & 6\\ 2 & 0 & 2\end{pmatrix},\qquad -3B=\begin{pmatrix} 0 & -3 & -6\\ -12 & 6 & 0\end{pmatrix}.

Question

Ces deux opérations obéissent-elles aux règles de calcul habituelles des nombres — commutativité, associativité, distributivité ? Rien ne l'impose a priori : il faut le vérifier sur les coefficients.

Proposition 1 : Règles de calcul pour la somme et la multiplication par un scalaire

Soient A,B,CMn,p(K)A,B,C\in\mathcal{M}_{n,p}(\mathbb{K}) et λ,μK\lambda,\mu\in\mathbb{K}.

  1. A+B=B+AA+B=B+A ;
  2. (A+B)+C=A+(B+C)=A+B+C(A+B)+C=A+(B+C)=A+B+C ;
  3. (λ+μ)A=λA+μA(\lambda+\mu)A=\lambda A+\mu A ;
  4. λ(A+B)=λA+λB\lambda(A+B)=\lambda A+\lambda B ;
  5. λ(μA)=(λμ)A\lambda(\mu A)=(\lambda\mu)A ;
  6. A+On,p=On,p+A=AA+O_{n,p}=O_{n,p}+A=A ;
  7. AA=On,pA-A=O_{n,p} ;
  8. 0A=On,p0\cdot A=O_{n,p}.

Démonstration :

Toutes les égalités sont des égalités de matrices de Mn,p(K)\mathcal{M}_{n,p}(\mathbb{K}) : il suffit de les vérifier coefficient par coefficient. Soit donc (i,j)1,n×1,p(i,j)\in\llbracket 1,n\rrbracket\times\llbracket 1,p\rrbracket.

  1. On a
[A+B]i,j=[A]i,j+[B]i,j=[B]i,j+[A]i,j=[B+A]i,j.[A+B]_{i,j}=[A]_{i,j}+[B]_{i,j}=[B]_{i,j}+[A]_{i,j}=[B+A]_{i,j}.

Donc A+B=B+AA+B=B+A.

  1. On a
[(A+B)+C]i,j=([A]i,j+[B]i,j)+[C]i,j=[A]i,j+([B]i,j+[C]i,j)=[A+(B+C)]i,j,\bigl[(A+B)+C\bigr]_{i,j}=\bigl([A]_{i,j}+[B]_{i,j}\bigr)+[C]_{i,j} =[A]_{i,j}+\bigl([B]_{i,j}+[C]_{i,j}\bigr)=\bigl[A+(B+C)\bigr]_{i,j},

par associativité de l'addition dans K\mathbb{K}.

  1. On a
[(λ+μ)A]i,j=(λ+μ)[A]i,j=λ[A]i,j+μ[A]i,j=[λA]i,j+[μA]i,j=[λA+μA]i,j.\bigl[(\lambda+\mu)A\bigr]_{i,j} =(\lambda+\mu)[A]_{i,j} =\lambda[A]_{i,j}+\mu[A]_{i,j} =[\lambda A]_{i,j}+[\mu A]_{i,j} =[\lambda A+\mu A]_{i,j}.

Donc (λ+μ)A=λA+μA(\lambda+\mu)A=\lambda A+\mu A.

  1. On a
[λ(A+B)]i,j=λ([A]i,j+[B]i,j)=λ[A]i,j+λ[B]i,j=[λA+λB]i,j.\bigl[\lambda(A+B)\bigr]_{i,j}=\lambda\bigl([A]_{i,j}+[B]_{i,j}\bigr) =\lambda[A]_{i,j}+\lambda[B]_{i,j}=[\lambda A+\lambda B]_{i,j}.
  1. On a
[λ(μA)]i,j=λ(μ[A]i,j)=(λμ)[A]i,j=[(λμ)A]i,j.\bigl[\lambda(\mu A)\bigr]_{i,j}=\lambda\bigl(\mu[A]_{i,j}\bigr)=(\lambda\mu)[A]_{i,j} =\bigl[(\lambda\mu)A\bigr]_{i,j}.
  1. On a [A+On,p]i,j=[A]i,j+0=[A]i,j[A+O_{n,p}]_{i,j}=[A]_{i,j}+0=[A]_{i,j}, d'où A+On,p=AA+O_{n,p}=A ; l'égalité On,p+A=AO_{n,p}+A=A s'en déduit par le point 1.

  2. On a [0A]i,j=0[A]i,j=0=[On,p]i,j[0\cdot A]_{i,j}=0\cdot[A]_{i,j}=0=[O_{n,p}]_{i,j}, d'où 0A=On,p0\cdot A=O_{n,p}.

  3. Enfin, AA=A+(1)A=1A+(1)AA-A=A+(-1)A=1\cdot A+(-1)A, qui vaut (1+(1))A=0A\bigl(1+(-1)\bigr)A=0\cdot A d'après le point 3, c'est-à-dire On,pO_{n,p} d'après le point 8.

Remarque :

On dit que A=BA=B si, pour tout (i,j)1,n×1,p(i,j)\in\llbracket 1,n\rrbracket\times\llbracket 1,p\rrbracket, [A]i,j=[B]i,j[A]_{i,j}=[B]_{i,j}.

Produit de deux matrices

Question

L'addition se fait case par case ; pourquoi pas le produit ? Parce qu'une matrice n'est pas là pour être un tableau de nombres, mais pour représenter une transformation des inconnues d'un système. Si l'on substitue un système dans un autre, quels coefficients obtient-on — et de quel produit sont-ils la formule ?

Définition 2 : Produit de deux matrices

Soient AMn,p(K)A\in\mathcal{M}_{n,p}(\mathbb{K}) et BMp,q(K)B\in\mathcal{M}_{p,q}(\mathbb{K}). On définit la matrice produit ABAB par

[AB]i,j=k=1p[A]i,k[B]k,jpour tout (i,j)1,n×1,q.[AB]_{i,j}=\sum_{k=1}^{p}[A]_{i,k}\,[B]_{k,j} \qquad\text{pour tout } (i,j)\in\llbracket 1,n\rrbracket\times\llbracket 1,q\rrbracket.

Test 2 : Le produit se fait-il case par case ?

Pour toutes matrices AA et BB de même taille n×pn\times p, on a [AB]i,j=[A]i,j[B]i,j[AB]_{i,j}=[A]_{i,j}\,[B]_{i,j}.

Remarque :

  1. Le produit ABAB n'est défini que si le nombre de colonnes de AA est égal au nombre de lignes de BB.
  2. Si AMn,p(K)A\in\mathcal{M}_{n,p}(\mathbb{K}) et BMp,q(K)B\in\mathcal{M}_{p,q}(\mathbb{K}), alors ABMn,q(K)AB\in\mathcal{M}_{n,q}(\mathbb{K}).
  3. Schématiquement :
(××××ai,1ai,p××)(b1,jbp,j)=(×××××k=1pai,kbk,j×××).\begin{pmatrix} \times & \cdots & \times\\ \times & \cdots & \times\\ a_{i,1} & \cdots & a_{i,p}\\ \times & \cdots & \times \end{pmatrix} \begin{pmatrix} \cdots & b_{1,j} & \cdots\\ \cdots & \vdots & \cdots\\ \cdots & b_{p,j} & \cdots \end{pmatrix} = \begin{pmatrix} \times & \cdots & \times\\ \times & \cdots & \times\\ \times & \sum_{k=1}^{p}a_{i,k}b_{k,j} & \times\\ \times & \cdots & \times \end{pmatrix}.

Test 3 : AB et BA de tailles différentes

Si AM2,3(K)A\in\mathcal{M}_{2,3}(\mathbb{K}) et BM3,2(K)B\in\mathcal{M}_{3,2}(\mathbb{K}), alors ABAB et BABA sont tous deux définis, mais ne sont pas de la même taille.

Exercice 1 : Produits de matrices

Soient

A=(201113),B=(101120),C=(2110),D=(011112213).A=\begin{pmatrix} 2 & 0 & 1\\ 1 & -1 & 3\end{pmatrix},\quad B=\begin{pmatrix} 1 & 0\\ -1 & 1\\ 2 & 0\end{pmatrix},\quad C=\begin{pmatrix} 2 & -1\\ 1 & 0\end{pmatrix},\quad D=\begin{pmatrix} 0 & -1 & 1\\ 1 & 1 & 2\\ 2 & -1 & 3\end{pmatrix}.

Calculer les produits possibles.

Solution :(cliquer pour afficher)

Recensement. On a AM2,3(K)A\in\mathcal{M}_{2,3}(\mathbb{K}), BM3,2(K)B\in\mathcal{M}_{3,2}(\mathbb{K}), CM2,2(K)C\in\mathcal{M}_{2,2}(\mathbb{K}) et DM3,3(K)D\in\mathcal{M}_{3,3}(\mathbb{K}). Un produit MNMN est défini si et seulement si le nombre de colonnes de MM est égal au nombre de lignes de NN. Sur les 1616 couples possibles, huit produits sont définis :

ABM2,2(K),ADM2,3(K),BAM3,3(K),BCM3,2(K),CAM2,3(K),CCM2,2(K),DBM3,2(K),DDM3,3(K).\begin{array}{llll} AB\in\mathcal{M}_{2,2}(\mathbb{K}), & AD\in\mathcal{M}_{2,3}(\mathbb{K}), & BA\in\mathcal{M}_{3,3}(\mathbb{K}), & BC\in\mathcal{M}_{3,2}(\mathbb{K}),\\ CA\in\mathcal{M}_{2,3}(\mathbb{K}), & CC\in\mathcal{M}_{2,2}(\mathbb{K}), & DB\in\mathcal{M}_{3,2}(\mathbb{K}), & DD\in\mathcal{M}_{3,3}(\mathbb{K}). \end{array}

Les huit autres ne le sont pas : AAAA, ACAC, BBBB, BDBD, CBCB, CDCD, DADA, DCDC.

Calculs. On a

AB=(201113)(101120)=(4081),AB=\begin{pmatrix} 2 & 0 & 1\\ 1 & -1 & 3\end{pmatrix} \begin{pmatrix} 1 & 0\\ -1 & 1\\ 2 & 0\end{pmatrix} =\begin{pmatrix} 4 & 0\\ 8 & -1\end{pmatrix},BA=(101120)(201113)=(201112402).BA=\begin{pmatrix} 1 & 0\\ -1 & 1\\ 2 & 0\end{pmatrix} \begin{pmatrix} 2 & 0 & 1\\ 1 & -1 & 3\end{pmatrix} =\begin{pmatrix} 2 & 0 & 1\\ -1 & -1 & 2\\ 4 & 0 & 2\end{pmatrix}.

Puis

AD=(235558),BC=(211142),CA=(311201),AD=\begin{pmatrix} 2 & -3 & 5\\ 5 & -5 & 8\end{pmatrix},\qquad BC=\begin{pmatrix} 2 & -1\\ -1 & 1\\ 4 & -2\end{pmatrix},\qquad CA=\begin{pmatrix} 3 & 1 & -1\\ 2 & 0 & 1\end{pmatrix},CC=(3221),DB=(314191),DD=(121529569).CC=\begin{pmatrix} 3 & -2\\ 2 & -1\end{pmatrix},\qquad DB=\begin{pmatrix} 3 & -1\\ 4 & 1\\ 9 & -1\end{pmatrix},\qquad DD=\begin{pmatrix} 1 & -2 & 1\\ 5 & -2 & 9\\ 5 & -6 & 9\end{pmatrix}.

Détaillons par exemple le coefficient de position (2,3)(2,3) de DDDD : c'est le produit de la deuxième ligne de DD par la troisième colonne de DD, soit 1×1+1×2+2×3=91\times 1+1\times 2+2\times 3=9.

Produit par une colonne, produit par une ligne

Question

Le produit AXAX d'une matrice par une colonne se calcule coefficient par coefficient. Mais si l'on regarde le résultat globalement, comme une colonne et non comme une liste de nombres : que reconnaît-on ?

Proposition 2 : Produit d'une matrice par une colonne, produit d'une ligne par une matrice

  1. Si A=(C1Cp)A=\begin{pmatrix} C_{1} & \cdots & C_{p}\end{pmatrix} et X=(x1xp)X=\begin{pmatrix} x_{1}\\ \vdots\\ x_{p}\end{pmatrix}, où CjC_{j} désigne la jeˋmej^{\text{ème}} colonne de AA, alors
AX=j=1pxjCj.AX=\sum_{j=1}^{p}x_{j}C_{j}.
  1. Si L1,,LnL_{1},\dots,L_{n} sont les lignes de AA et L=(x1xn)L=\begin{pmatrix} x_{1} & \cdots & x_{n}\end{pmatrix}, alors
LA=i=1nxiLi.LA=\sum_{i=1}^{n}x_{i}L_{i}.

Démonstration :

  1. On pose Cj=(a1,jan,j)C_{j}=\begin{pmatrix} a_{1,j}\\ \vdots\\ a_{n,j}\end{pmatrix}. On a
AX=(a1,1a1,pan,1an,p)(x1xp)=(j=1pa1,jxjj=1pan,jxj)=j=1p(a1,jxjan,jxj)=j=1pxj(a1,jan,j).AX=\begin{pmatrix} a_{1,1} & \cdots & a_{1,p}\\ \vdots & & \vdots\\ a_{n,1} & \cdots & a_{n,p} \end{pmatrix} \begin{pmatrix} x_{1}\\ \vdots\\ x_{p}\end{pmatrix} =\begin{pmatrix} \sum_{j=1}^{p}a_{1,j}x_{j}\\ \vdots\\ \sum_{j=1}^{p}a_{n,j}x_{j} \end{pmatrix} =\sum_{j=1}^{p}\begin{pmatrix} a_{1,j}x_{j}\\ \vdots\\ a_{n,j}x_{j}\end{pmatrix} =\sum_{j=1}^{p}x_{j}\begin{pmatrix} a_{1,j}\\ \vdots\\ a_{n,j}\end{pmatrix}.

Donc AX=j=1pxjCjAX=\sum_{j=1}^{p}x_{j}C_{j}.

  1. La matrice LALA appartient à M1,p(K)\mathcal{M}_{1,p}(\mathbb{K}). Soit j1,pj\in\llbracket 1,p\rrbracket. On a [L]1,i=xi[L]_{1,i}=x_{i} pour tout ii, et [Li]1,j=[A]i,j[L_{i}]_{1,j}=[A]_{i,j} puisque LiL_{i} est la ieˋmei^{\text{ème}} ligne de AA. Ainsi
[LA]1,j=i=1n[L]1,i[A]i,j=i=1nxi[Li]1,j=[i=1nxiLi]1,j.[LA]_{1,j}=\sum_{i=1}^{n}[L]_{1,i}\,[A]_{i,j} =\sum_{i=1}^{n}x_{i}\,[L_{i}]_{1,j} =\Bigl[\sum_{i=1}^{n}x_{i}L_{i}\Bigr]_{1,j}.

Ceci valant pour tout jj, on a LA=i=1nxiLiLA=\sum_{i=1}^{n}x_{i}L_{i}.

Exemple :

Pour A=(1234)A=\begin{pmatrix} 1 & 2\\ 3 & 4\end{pmatrix} et X=(11)X=\begin{pmatrix} 1\\ 1\end{pmatrix}, le produit AX=(37)AX=\begin{pmatrix} 3\\ 7\end{pmatrix} n'est rien d'autre que la somme des deux colonnes de AA. Multiplier par une colonne de 11, c'est donc sommer les colonnes — et par une colonne quelconque, c'est en faire une combinaison linéaire. Comment s'en servir pour calculer plus vite ?

Exercice 2 : Lire un produit comme une combinaison linéaire

Soient A=(112301)A=\begin{pmatrix} 1 & -1 & 2\\ 3 & 0 & 1\end{pmatrix}, X=(211)X=\begin{pmatrix} 2\\ 1\\ -1\end{pmatrix} et L=(12)L=\begin{pmatrix} 1 & -2\end{pmatrix}.

  1. Calculer AXAX comme combinaison linéaire des colonnes de AA, puis vérifier par la définition du produit.
  2. Calculer LALA comme combinaison linéaire des lignes de AA, puis vérifier par la définition du produit.
Solution :(cliquer pour afficher)
  1. Les colonnes de AA sont C1=(13)C_{1}=\begin{pmatrix} 1\\ 3\end{pmatrix}, C2=(10)C_{2}=\begin{pmatrix} -1\\ 0\end{pmatrix} et C3=(21)C_{3}=\begin{pmatrix} 2\\ 1\end{pmatrix}. D'après la proposition,
AX=2C1+1C2+(1)C3=(26)+(10)+(21)=(15).AX=2C_{1}+1\cdot C_{2}+(-1)C_{3} =\begin{pmatrix} 2\\ 6\end{pmatrix}+\begin{pmatrix} -1\\ 0\end{pmatrix}+\begin{pmatrix} -2\\ -1\end{pmatrix} =\begin{pmatrix} -1\\ 5\end{pmatrix}.

Vérification par la définition : la première ligne donne 1×2+(1)×1+2×(1)=11\times 2+(-1)\times 1+2\times(-1)=-1, la seconde 3×2+0×1+1×(1)=53\times 2+0\times 1+1\times(-1)=5.

  1. Les lignes de AA sont L1=(112)L_{1}=\begin{pmatrix} 1 & -1 & 2\end{pmatrix} et L2=(301)L_{2}=\begin{pmatrix} 3 & 0 & 1\end{pmatrix}. D'après la proposition,
LA=1L1+(2)L2=(112)+(602)=(510).LA=1\cdot L_{1}+(-2)L_{2} =\begin{pmatrix} 1 & -1 & 2\end{pmatrix}+\begin{pmatrix} -6 & 0 & -2\end{pmatrix} =\begin{pmatrix} -5 & -1 & 0\end{pmatrix}.

Vérification par la définition : le coefficient de position (1,1)(1,1) vaut 1×1+(2)×3=51\times 1+(-2)\times 3=-5, celui de position (1,2)(1,2) vaut 1×(1)+(2)×0=11\times(-1)+(-2)\times 0=-1, celui de position (1,3)(1,3) vaut 1×2+(2)×1=01\times 2+(-2)\times 1=0.

Proposition 3 : Colonnes et lignes d'un produit de matrices

Soient AMn,p(K)A\in\mathcal{M}_{n,p}(\mathbb{K}) et BMp,q(K)B\in\mathcal{M}_{p,q}(\mathbb{K}).

  1. Si B1,,BqB_{1},\dots,B_{q} sont les colonnes de BB, alors les colonnes de la matrice ABAB sont AB1,,ABqAB_{1},\dots,AB_{q}.
  2. Si A1,,AnA_{1},\dots,A_{n} sont les lignes de AA, alors les lignes de la matrice ABAB sont A1B,,AnBA_{1}B,\dots,A_{n}B.

Démonstration :

  1. Soient i1,ni\in\llbracket 1,n\rrbracket et j1,qj\in\llbracket 1,q\rrbracket. On a
[AB]i,j=k=1p[A]i,k[B]k,jet[ABj]i=k=1p[A]i,k[B]k,j.[AB]_{i,j}=\sum_{k=1}^{p}[A]_{i,k}\,[B]_{k,j} \qquad\text{et}\qquad [AB_{j}]_{i}=\sum_{k=1}^{p}[A]_{i,k}\,[B]_{k,j}.

Ainsi [AB]i,j=[ABj]i[AB]_{i,j}=[AB_{j}]_{i} pour tout i1,ni\in\llbracket 1,n\rrbracket, d'où ABjAB_{j} est la jeˋmej^{\text{ème}} colonne de la matrice ABAB.

  1. Soient i1,ni\in\llbracket 1,n\rrbracket et j1,qj\in\llbracket 1,q\rrbracket. La matrice AiA_{i} est la ieˋmei^{\text{ème}} ligne de AA, donc [Ai]1,k=[A]i,k[A_{i}]_{1,k}=[A]_{i,k} pour tout k1,pk\in\llbracket 1,p\rrbracket. Ainsi
[AiB]1,j=k=1p[Ai]1,k[B]k,j=k=1p[A]i,k[B]k,j=[AB]i,j.[A_{i}B]_{1,j}=\sum_{k=1}^{p}[A_{i}]_{1,k}\,[B]_{k,j} =\sum_{k=1}^{p}[A]_{i,k}\,[B]_{k,j} =[AB]_{i,j}.

Ceci valant pour tout j1,qj\in\llbracket 1,q\rrbracket, la matrice ligne AiBA_{i}B est la ieˋmei^{\text{ème}} ligne de ABAB.

Règles de calcul du produit

Question

Le produit matriciel n'est pas défini case par case : rien ne garantit a priori qu'il hérite des règles de calcul des nombres. Lesquelles survivent — et lesquelles tombent ?

Proposition 4 : Propriétés du produit matriciel

  1. Soient AMn,p(K)A\in\mathcal{M}_{n,p}(\mathbb{K}), BMp,q(K)B\in\mathcal{M}_{p,q}(\mathbb{K}) et CMq,m(K)C\in\mathcal{M}_{q,m}(\mathbb{K}). On a
(AB)C=A(BC)=ABC.(AB)C=A(BC)=ABC.
  1. Soient A,BMn,p(K)A,B\in\mathcal{M}_{n,p}(\mathbb{K}), CMp,q(K)C\in\mathcal{M}_{p,q}(\mathbb{K}) et DMm,n(K)D\in\mathcal{M}_{m,n}(\mathbb{K}). On a
(A+B)C=AC+BCetD(A+B)=DA+DB.(A+B)C=AC+BC \qquad\text{et}\qquad D(A+B)=DA+DB.
  1. Soit AMn,p(K)A\in\mathcal{M}_{n,p}(\mathbb{K}). On a
AIp=A,InA=A,AOp,q=On,q,Om,nA=Om,p.AI_{p}=A,\quad I_{n}A=A,\quad AO_{p,q}=O_{n,q},\quad O_{m,n}A=O_{m,p}.
  1. Soient AMn,p(K)A\in\mathcal{M}_{n,p}(\mathbb{K}), BMp,q(K)B\in\mathcal{M}_{p,q}(\mathbb{K}) et λK\lambda\in\mathbb{K}. On a
(λA)B=A(λB)=λAB.(\lambda A)B=A(\lambda B)=\lambda AB.

Démonstration :

  1. Soient i1,ni\in\llbracket 1,n\rrbracket et j1,mj\in\llbracket 1,m\rrbracket. On a
[(AB)C]i,j=k=1q[AB]i,k[C]k,j=k=1q(=1p[A]i,[B],k)[C]k,j==1pk=1q[A]i,[B],k[C]k,j==1p[A]i,[BC],j=[A(BC)]i,j.\begin{aligned} \bigl[(AB)C\bigr]_{i,j} &=\sum_{k=1}^{q}[AB]_{i,k}\,[C]_{k,j} =\sum_{k=1}^{q}\Bigl(\sum_{\ell=1}^{p}[A]_{i,\ell}\,[B]_{\ell,k}\Bigr)[C]_{k,j}\\ &=\sum_{\ell=1}^{p}\sum_{k=1}^{q}[A]_{i,\ell}\,[B]_{\ell,k}\,[C]_{k,j} =\sum_{\ell=1}^{p}[A]_{i,\ell}\,[BC]_{\ell,j} =\bigl[A(BC)\bigr]_{i,j}. \end{aligned}

D'où (AB)C=A(BC)(AB)C=A(BC).

  1. Soient i1,ni\in\llbracket 1,n\rrbracket et j1,qj\in\llbracket 1,q\rrbracket. On a
[(A+B)C]i,j=k=1p[A+B]i,k[C]k,j=k=1p([A]i,k+[B]i,k)[C]k,j=k=1p[A]i,k[C]k,j+k=1p[B]i,k[C]k,j=[AC]i,j+[BC]i,j.\begin{aligned} \bigl[(A+B)C\bigr]_{i,j} &=\sum_{k=1}^{p}[A+B]_{i,k}\,[C]_{k,j} =\sum_{k=1}^{p}\bigl([A]_{i,k}+[B]_{i,k}\bigr)[C]_{k,j}\\ &=\sum_{k=1}^{p}[A]_{i,k}\,[C]_{k,j}+\sum_{k=1}^{p}[B]_{i,k}\,[C]_{k,j} =[AC]_{i,j}+[BC]_{i,j}. \end{aligned}

D'où (A+B)C=AC+BC(A+B)C=AC+BC. Le calcul est identique pour D(A+B)=DA+DBD(A+B)=DA+DB, en sommant cette fois sur l'indice de ligne.

  1. Soient i1,ni\in\llbracket 1,n\rrbracket et j1,pj\in\llbracket 1,p\rrbracket. On a
[AIp]i,j=k=1p[A]i,k[Ip]k,j=k=1p[A]i,kδk,j=[A]i,j,[AI_{p}]_{i,j}=\sum_{k=1}^{p}[A]_{i,k}\,[I_{p}]_{k,j} =\sum_{k=1}^{p}[A]_{i,k}\,\delta_{k,j} =[A]_{i,j},

car tous les termes de la somme sont nuls sauf celui d'indice k=jk=j. De même

[InA]i,j=k=1nδi,k[A]k,j=[A]i,j.[I_{n}A]_{i,j}=\sum_{k=1}^{n}\delta_{i,k}\,[A]_{k,j}=[A]_{i,j}.

Enfin, pour j1,qj\in\llbracket 1,q\rrbracket, [AOp,q]i,j=k=1p[A]i,k×0=0[AO_{p,q}]_{i,j}=\sum_{k=1}^{p}[A]_{i,k}\times 0=0, d'où AOp,q=On,qAO_{p,q}=O_{n,q} ; et de même Om,nA=Om,pO_{m,n}A=O_{m,p}.

  1. Soient i1,ni\in\llbracket 1,n\rrbracket et j1,qj\in\llbracket 1,q\rrbracket. On a
[(λA)B]i,j=k=1pλ[A]i,k[B]k,j=λk=1p[A]i,k[B]k,j=λ[AB]i,j,\bigl[(\lambda A)B\bigr]_{i,j} =\sum_{k=1}^{p}\lambda[A]_{i,k}\,[B]_{k,j} =\lambda\sum_{k=1}^{p}[A]_{i,k}\,[B]_{k,j} =\lambda\,[AB]_{i,j},

et le même calcul, en plaçant le facteur λ\lambda sur le second facteur, donne [A(λB)]i,j=λ[AB]i,j\bigl[A(\lambda B)\bigr]_{i,j}=\lambda\,[AB]_{i,j}.

Remarque :

Le produit matriciel n'est pas commutatif. En effet,

(0100)(1000)=(0000)et(1000)(0100)=(0100),\begin{pmatrix} 0 & 1\\ 0 & 0\end{pmatrix}\begin{pmatrix} 1 & 0\\ 0 & 0\end{pmatrix} =\begin{pmatrix} 0 & 0\\ 0 & 0\end{pmatrix} \qquad\text{et}\qquad \begin{pmatrix} 1 & 0\\ 0 & 0\end{pmatrix}\begin{pmatrix} 0 & 1\\ 0 & 0\end{pmatrix} =\begin{pmatrix} 0 & 1\\ 0 & 0\end{pmatrix},

donc

(0100)(1000)(1000)(0100).\begin{pmatrix} 0 & 1\\ 0 & 0\end{pmatrix}\begin{pmatrix} 1 & 0\\ 0 & 0\end{pmatrix} \neq \begin{pmatrix} 1 & 0\\ 0 & 0\end{pmatrix}\begin{pmatrix} 0 & 1\\ 0 & 0\end{pmatrix}.

Test 4 : Un produit nul sans facteur nul

Il existe deux matrices AA et BB de M2(K)\mathcal{M}_{2}(\mathbb{K}), toutes deux non nulles, telles que AB=O2AB=O_{2}.

Produit de matrices élémentaires

Question

Toute matrice est combinaison linéaire de matrices élémentaires. Si l'on savait multiplier les Ei,jE_{i,j} entre elles, on saurait donc multiplier n'importe quoi. Que vaut Ei,jEk,E_{i,j}E_{k,\ell} ?

Proposition 5 : Produit de deux matrices élémentaires

Soient Ei,jMn,p(K)E_{i,j}\in\mathcal{M}_{n,p}(\mathbb{K}) et Ek,Mp,q(K)E_{k,\ell}\in\mathcal{M}_{p,q}(\mathbb{K}) deux matrices élémentaires. On a

Ei,jEk,=δk,jEi,,E_{i,j}\,E_{k,\ell}=\delta_{k,j}\,E_{i,\ell},

Ei,E_{i,\ell} désigne la matrice élémentaire de Mn,q(K)\mathcal{M}_{n,q}(\mathbb{K}).

Démonstration :

Soient α1,n\alpha\in\llbracket 1,n\rrbracket et β1,q\beta\in\llbracket 1,q\rrbracket. En utilisant la formule [Ei,j]k,=δi,kδj,\bigl[E_{i,j}\bigr]_{k,\ell}=\delta_{i,k}\,\delta_{j,\ell}, on a

[Ei,jEk,]α,β=s=1p[Ei,j]α,s[Ek,]s,β=s=1pδi,αδj,sδk,sδ,β=δi,αδ,βs=1pδj,sδk,s=δj,k[Ei,]α,β=[δk,jEi,]α,β.\begin{aligned} \bigl[E_{i,j}E_{k,\ell}\bigr]_{\alpha,\beta} &=\sum_{s=1}^{p}\bigl[E_{i,j}\bigr]_{\alpha,s}\bigl[E_{k,\ell}\bigr]_{s,\beta} =\sum_{s=1}^{p}\delta_{i,\alpha}\,\delta_{j,s}\,\delta_{k,s}\,\delta_{\ell,\beta}\\ &=\delta_{i,\alpha}\,\delta_{\ell,\beta}\sum_{s=1}^{p}\delta_{j,s}\,\delta_{k,s} =\delta_{j,k}\bigl[E_{i,\ell}\bigr]_{\alpha,\beta} =\bigl[\delta_{k,j}E_{i,\ell}\bigr]_{\alpha,\beta}. \end{aligned}

D'où Ei,jEk,=δk,jEi,E_{i,j}\,E_{k,\ell}=\delta_{k,j}\,E_{i,\ell}.

Remarque :

  1. En pratique, on utilise cette formule dans Mn(K)\mathcal{M}_{n}(\mathbb{K}), où les trois matrices Ei,jE_{i,j}, Ek,E_{k,\ell} et Ei,E_{i,\ell} vivent dans le même ensemble.
  2. On a [Ei,j]k,=δi,kδj,\bigl[E_{i,j}\bigr]_{k,\ell}=\delta_{i,k}\,\delta_{j,\ell} et k=1nδi,kδk,j=δi,j\displaystyle\sum_{k=1}^{n}\delta_{i,k}\,\delta_{k,j}=\delta_{i,j}.
  3. La formule se lit ainsi : le produit Ei,jEk,E_{i,j}E_{k,\ell} est nul dès que jkj\neq k, et vaut Ei,E_{i,\ell} lorsque j=kj=k — l'indice de colonne du premier facteur doit « rencontrer » l'indice de ligne du second. Ainsi, dans M3(K)\mathcal{M}_{3}(\mathbb{K}), E1,2E2,3=E1,3E_{1,2}E_{2,3}=E_{1,3} tandis que E2,3E1,2=O3E_{2,3}E_{1,2}=O_{3}. Ce seul exemple redit la non-commutativité du produit.

Exercice 3 : Calculs dans la base des matrices élémentaires

On travaille dans M3(K)\mathcal{M}_{3}(\mathbb{K}) et l'on pose N=E1,2+E2,3N=E_{1,2}+E_{2,3}.

  1. Calculer NNNN à l'aide de la formule Ei,jEk,=δk,jEi,E_{i,j}E_{k,\ell}=\delta_{k,j}E_{i,\ell}.
  2. Écrire NN et NNNN sous forme de tableaux et vérifier le résultat.
Solution :(cliquer pour afficher)
  1. Par distributivité du produit sur la somme,
NN=(E1,2+E2,3)(E1,2+E2,3)=E1,2E1,2+E1,2E2,3+E2,3E1,2+E2,3E2,3.NN=(E_{1,2}+E_{2,3})(E_{1,2}+E_{2,3}) =E_{1,2}E_{1,2}+E_{1,2}E_{2,3}+E_{2,3}E_{1,2}+E_{2,3}E_{2,3}.

On applique la formule à chaque terme :

  • E1,2E1,2=δ1,2E1,2=O3E_{1,2}E_{1,2}=\delta_{1,2}E_{1,2}=O_{3} ;
  • E1,2E2,3=δ2,2E1,3=E1,3E_{1,2}E_{2,3}=\delta_{2,2}E_{1,3}=E_{1,3} ;
  • E2,3E1,2=δ1,3E2,2=O3E_{2,3}E_{1,2}=\delta_{1,3}E_{2,2}=O_{3} ;
  • E2,3E2,3=δ2,3E2,3=O3E_{2,3}E_{2,3}=\delta_{2,3}E_{2,3}=O_{3}.

D'où NN=E1,3NN=E_{1,3}.

  1. On a
N=(010001000),NN=(010001000)(010001000)=(001000000)=E1,3,N=\begin{pmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ 0 & 0 & 0\end{pmatrix}, \qquad NN=\begin{pmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ 0 & 0 & 0\end{pmatrix} \begin{pmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ 0 & 0 & 0\end{pmatrix} =\begin{pmatrix} 0 & 0 & 1\\ 0 & 0 & 0\\ 0 & 0 & 0\end{pmatrix}=E_{1,3},

ce qui confirme le calcul de la question 1.

Transposée d'une matrice

Question

Dans tout ce qui précède, lignes et colonnes ne jouent pas le même rôle : on multiplie à gauche par des lignes, à droite par des colonnes. Que devient une matrice si l'on échange systématiquement ces deux rôles — et les règles de calcul résistent-elles à cet échange ?

Définition 3 : Transposée d'une matrice

Soit A=(ai,j)1in, 1jpA=\bigl(a_{i,j}\bigr)_{1\leqslant i\leqslant n,\ 1\leqslant j\leqslant p}. On appelle transposée de AA la matrice, notée ATA^{\mathsf{T}} (ou tA{}^{t}A), définie par

[AT]k,=[A],k=a,kpour tous k1,p et 1,n.\bigl[A^{\mathsf{T}}\bigr]_{k,\ell}=[A]_{\ell,k}=a_{\ell,k} \qquad\text{pour tous } k\in\llbracket 1,p\rrbracket \text{ et } \ell\in\llbracket 1,n\rrbracket.

Remarque :

  1. Si AMn,p(K)A\in\mathcal{M}_{n,p}(\mathbb{K}), alors ATMp,n(K)A^{\mathsf{T}}\in\mathcal{M}_{p,n}(\mathbb{K}).
  2. La ieˋmei^{\text{ème}} ligne de ATA^{\mathsf{T}} est la ieˋmei^{\text{ème}} colonne de AA.
  3. La jeˋmej^{\text{ème}} colonne de ATA^{\mathsf{T}} est la jeˋmej^{\text{ème}} ligne de AA.

Test 5 : Taille de la transposée

Pour toute matrice AA, la matrice ATA^{\mathsf{T}} a la même taille que AA.

Exemple :

  1. Si A=(203114)A=\begin{pmatrix} 2 & 0 & 3\\ -1 & 1 & 4\end{pmatrix}, alors AT=(210134)A^{\mathsf{T}}=\begin{pmatrix} 2 & -1\\ 0 & 1\\ 3 & 4\end{pmatrix}.

  2. Si A=(101211345)A=\begin{pmatrix} 1 & 0 & -1\\ 2 & -1 & 1\\ 3 & 4 & 5\end{pmatrix}, alors AT=(123014115)A^{\mathsf{T}}=\begin{pmatrix} 1 & 2 & 3\\ 0 & -1 & 4\\ -1 & 1 & 5\end{pmatrix}.

Proposition 6 : Propriétés de la transposition

  1. Pour tout AMn,p(K)A\in\mathcal{M}_{n,p}(\mathbb{K}), on a (AT)T=A\bigl(A^{\mathsf{T}}\bigr)^{\mathsf{T}}=A.

  2. Pour tous A,BMn,p(K)A,B\in\mathcal{M}_{n,p}(\mathbb{K}) et tous λ,μK\lambda,\mu\in\mathbb{K}, on a

(λA+μB)T=λAT+μBT.(\lambda A+\mu B)^{\mathsf{T}}=\lambda\,A^{\mathsf{T}}+\mu\,B^{\mathsf{T}}.
  1. Pour tous AMn,p(K)A\in\mathcal{M}_{n,p}(\mathbb{K}) et BMp,q(K)B\in\mathcal{M}_{p,q}(\mathbb{K}), on a
(AB)T=BTAT.(AB)^{\mathsf{T}}=B^{\mathsf{T}}\,A^{\mathsf{T}}.

Démonstration :

  1. Les deux matrices (AT)T\bigl(A^{\mathsf{T}}\bigr)^{\mathsf{T}} et AA appartiennent à Mn,p(K)\mathcal{M}_{n,p}(\mathbb{K}). Soient i1,ni\in\llbracket 1,n\rrbracket et j1,pj\in\llbracket 1,p\rrbracket. En appliquant deux fois la définition,
[(AT)T]i,j=[AT]j,i=[A]i,j.\Bigl[\bigl(A^{\mathsf{T}}\bigr)^{\mathsf{T}}\Bigr]_{i,j}=\bigl[A^{\mathsf{T}}\bigr]_{j,i}=[A]_{i,j}.

D'où (AT)T=A\bigl(A^{\mathsf{T}}\bigr)^{\mathsf{T}}=A.

  1. Les deux membres appartiennent à Mp,n(K)\mathcal{M}_{p,n}(\mathbb{K}). Soient k1,pk\in\llbracket 1,p\rrbracket et 1,n\ell\in\llbracket 1,n\rrbracket. On a
[(λA+μB)T]k,=[λA+μB],k=λ[A],k+μ[B],k=λ[AT]k,+μ[BT]k,.\bigl[(\lambda A+\mu B)^{\mathsf{T}}\bigr]_{k,\ell} =[\lambda A+\mu B]_{\ell,k} =\lambda[A]_{\ell,k}+\mu[B]_{\ell,k} =\lambda\bigl[A^{\mathsf{T}}\bigr]_{k,\ell}+\mu\bigl[B^{\mathsf{T}}\bigr]_{k,\ell}.

D'où (λA+μB)T=λAT+μBT(\lambda A+\mu B)^{\mathsf{T}}=\lambda\,A^{\mathsf{T}}+\mu\,B^{\mathsf{T}}.

  1. Soient i1,qi\in\llbracket 1,q\rrbracket et j1,nj\in\llbracket 1,n\rrbracket. On a
[(AB)T]i,j=[AB]j,i=k=1p[A]j,k[B]k,i=k=1p[AT]k,j[BT]i,k=k=1p[BT]i,k[AT]k,j=[BTAT]i,j.\begin{aligned} \bigl[(AB)^{\mathsf{T}}\bigr]_{i,j} &=[AB]_{j,i} =\sum_{k=1}^{p}[A]_{j,k}\,[B]_{k,i} =\sum_{k=1}^{p}\bigl[A^{\mathsf{T}}\bigr]_{k,j}\bigl[B^{\mathsf{T}}\bigr]_{i,k}\\ &=\sum_{k=1}^{p}\bigl[B^{\mathsf{T}}\bigr]_{i,k}\bigl[A^{\mathsf{T}}\bigr]_{k,j} =\bigl[B^{\mathsf{T}}\,A^{\mathsf{T}}\bigr]_{i,j}. \end{aligned}

D'où (AB)T=BTAT(AB)^{\mathsf{T}}=B^{\mathsf{T}}\,A^{\mathsf{T}}.

Test 6 : Transposée d'un produit

Pour toutes matrices AA et BB dont le produit ABAB est défini, on a (AB)T=ATBT(AB)^{\mathsf{T}}=A^{\mathsf{T}}B^{\mathsf{T}}.

Remarque :

On considère les applications

f: Mn,p(K)Mp,n(K)AATetg: Mp,n(K)Mn,p(K)AAT.f:\ \begin{array}{rcl} \mathcal{M}_{n,p}(\mathbb{K}) & \longrightarrow & \mathcal{M}_{p,n}(\mathbb{K})\\ A & \longmapsto & A^{\mathsf{T}} \end{array} \qquad\text{et}\qquad g:\ \begin{array}{rcl} \mathcal{M}_{p,n}(\mathbb{K}) & \longrightarrow & \mathcal{M}_{n,p}(\mathbb{K})\\ A & \longmapsto & A^{\mathsf{T}}. \end{array}
  1. On a fg=idMp,n(K)f\circ g=\mathrm{id}_{\mathcal{M}_{p,n}(\mathbb{K})} et gf=idMn,p(K)g\circ f=\mathrm{id}_{\mathcal{M}_{n,p}(\mathbb{K})}. Donc ff est bijective et f1=gf^{-1}=g.
  2. On a f(λA+μB)=λf(A)+μf(B)f(\lambda A+\mu B)=\lambda f(A)+\mu f(B). On dit que ff est une application linéaire.

Exercice 4 : Une matrice égale à sa transposée

Soit AMn,p(K)A\in\mathcal{M}_{n,p}(\mathbb{K}).

  1. Justifier que le produit AATA\,A^{\mathsf{T}} est défini et préciser sa taille.
  2. Montrer que (AAT)T=AAT\bigl(A\,A^{\mathsf{T}}\bigr)^{\mathsf{T}}=A\,A^{\mathsf{T}}.
  3. Calculer AATA\,A^{\mathsf{T}} pour A=(102131)A=\begin{pmatrix} 1 & 0 & 2\\ -1 & 3 & 1\end{pmatrix} et vérifier le résultat de la question 2 sur cet exemple.
Solution :(cliquer pour afficher)
  1. On a AMn,p(K)A\in\mathcal{M}_{n,p}(\mathbb{K}) et ATMp,n(K)A^{\mathsf{T}}\in\mathcal{M}_{p,n}(\mathbb{K}) : le nombre de colonnes de AA vaut pp, qui est aussi le nombre de lignes de ATA^{\mathsf{T}}. Le produit est donc défini et AATMn,n(K)A\,A^{\mathsf{T}}\in\mathcal{M}_{n,n}(\mathbb{K}).

  2. En appliquant la propriété du produit puis celle de la double transposition,

(AAT)T=(AT)TAT=AAT.\bigl(A\,A^{\mathsf{T}}\bigr)^{\mathsf{T}} =\bigl(A^{\mathsf{T}}\bigr)^{\mathsf{T}}A^{\mathsf{T}} =A\,A^{\mathsf{T}}.
  1. Ici AM2,3(K)A\in\mathcal{M}_{2,3}(\mathbb{K}) et AT=(110321)A^{\mathsf{T}}=\begin{pmatrix} 1 & -1\\ 0 & 3\\ 2 & 1\end{pmatrix}, donc
AAT=(102131)(110321)=(51111).A\,A^{\mathsf{T}} =\begin{pmatrix} 1 & 0 & 2\\ -1 & 3 & 1\end{pmatrix} \begin{pmatrix} 1 & -1\\ 0 & 3\\ 2 & 1\end{pmatrix} =\begin{pmatrix} 5 & 1\\ 1 & 11\end{pmatrix}.

Cette matrice de M2(K)\mathcal{M}_{2}(\mathbb{K}) est bien égale à sa transposée : les deux coefficients hors diagonale valent tous deux 11.