Soient les matrices : \[A=\left(\begin{array}{ccc} -1&0&1\\ 0&2&-1\\ -2&1&0 \end{array}\right) \quad \textrm{ et} \quad B= \left(\begin{array}{ccc} 1&1&1\\ -1&0&2\\ 2&-1&2 \end{array}\right)\]
Calculer : \(AB\) et \(BA\).
Calculer : \({\left(AB\right)}^{\mathrm{T}}\) et \({B}^{\mathrm{T}}\), \({A}^{\mathrm{T}}\) et \({B}^{\mathrm{T}}{A}^{\mathrm{T}}\).
Calculer : \(\mathop{\mathrm{Tr}}\left(A\right)\), \(\mathop{\mathrm{Tr}}\left(B\right)\), \(\mathop{\mathrm{Tr}}\left(AB\right)\) et \(\mathop{\mathrm{Tr}}\left(BA\right)\).
Développer :\(\left(A+B\right)^2\).
\(AB=\left( \begin {array}{ccc} 1&-2&1\\-4&1&2 \\-3&-2&0\end {array} \right)\) et \(BA=\left( \begin {array}{ccc} -3&3&0\\-3&2&-1 \\-6&0&3\end {array} \right)\). On remarque que \(AB\neq BA\).
\({\left(AB\right)}^{\mathrm{T}}=\left( \begin {array}{ccc} 1&-4&-3\\-2&1&-2 \\1&2&0\end {array} \right)\), \({B}^{\mathrm{T}}=\left( \begin {array}{ccc} 1&-1&2\\1&0&-1 \\1&2&2\end {array} \right)\), \({A}^{\mathrm{T}}=\left( \begin {array}{ccc} -1&0&-2\\0&2&1 \\1&-1&0\end {array} \right)\) et \({B}^{\mathrm{T}}{A}^{\mathrm{T}}=\left( \begin {array}{ccc} 1&-4&-3\\-2&1&-2 \\1&2&0\end {array} \right) = {\left(AB\right)}^{\mathrm{T}}\).
\(\mathop{\mathrm{Tr}}\left(A\right)=1\), \(\mathop{\mathrm{Tr}}\left(B\right)=3\), \(\mathop{\mathrm{Tr}}\left(AB\right)=2\) et \(\mathop{\mathrm{Tr}}\left(BA\right)=2\). On a bien : \(\mathop{\mathrm{Tr}}\left(AB\right)=\mathop{\mathrm{Tr}}\left(BA\right)\)
\(\left(A+B\right)^2=A^2+AB+BA+B^2 \neq A^2+2AB+B^2\) car \(AB\neq BA\). De manière plus générale, la formule du binôme ne s’applique pour développer \(\left(A+B\right)^n\) que si \(A\) et \(B\) commutent.
Calculer lorsque cela est possible les produits \(AB\) et \(BA\) :
\[A= \left(\begin{array}{cccc} -1&0&1&1\\ 2&1&0&0 \end{array}\right) \quad \textrm{ et} \quad B= \left(\begin{array}{ccc} 1&0\\ 0&1\\ 1&2\\ -1&1 \end{array}\right)\]
\[A= \left(\begin{array}{c} 1 \end{array}\right) \quad \textrm{ et} \quad B= \left(\begin{array}{c} 1\\ 0\\ 1 \end{array}\right)\]
\[A= \left(\begin{array}{cccc} 1&1&1&1 \end{array}\right) \quad \textrm{ et} \quad B= \left(\begin{array}{c} -1\\ 1\\ 0\\ 1 \end{array}\right)\]
\(AB=\left( \begin {array}{cc} -1&3\\2&1\end {array} \right)\) et \(BA=\left( \begin {array}{cccc} -1&0&1&1\\2&1&0&0 \\3&2&1&1\\3&1&-1&-1\end {array} \right)\).
Le produit \(AB\) n’est pas possible. Par contre : \(BA= B\).
\(AB=\left( \begin {array}{c} 1\end {array} \right)\) et \(BA=\left( \begin {array}{cccc} -1&-1&-1&-1\\1&1&1&1 \\0&0&0&0\\1&1&1&1\end {array} \right)\)
Soient \(i,j,k,l\in\llbracket 1,n\rrbracket\) et \(E_{i,j}\), \(E_{k,l}\) les matrices élémentaires de \(\mathfrak{M}_{n}\left(\mathbb{K}\right)\) correspondantes. Calculer \(E_{i,j}\times E_{k,l}\).
Soit une matrice \(A \in \mathfrak{M}_{n}(\mathbb{R})\). On suppose que \(A\) commute avec toutes les matrices diagonales. Montrer que \(A\) est une matrice diagonale.
Trouver les matrices \(A\in\mathfrak{M}_{n}(\mathbb{R})\) qui commutent avec toutes les matrices symétriques.
On vérifie facilement que \(E_{i,j}\times E_{k,\ell}=\delta_{j,k} E_{i,\ell}\)
Notons \(A=((a_{i,j}))\). Soit \(k\in \llbracket 1,n\rrbracket\). Comme \(A\) commute avec la matrice \(E_{k,k}\), on a \[AE_{k,k} = \sum_{i=1}^n\sum_{j=1}^n\] et \[E_{k,k}A = a_{i,j}E_{i,j}E_{k,k}=\sum_{i=1}^n\sum_{j=1}^na_{i,j}E_{k,k}E_{i,j}\] et donc \[\sum_{i=1}^n a_{i,k}E_{i,k}=\sum_{j=1}^n a_{k,j}E_{k,j},\] Ceci pour tout indice \(k\).
Comme le membre de gauche est une matrice nulle sauf peut-être sur la \(k\)-ième colonne et le membre de droite, une matrice nulle sauf peut-être sur la \(k\)-ième ligne. On en déduit que pour \(i\neq k\), \(a_{i,k}=0\) et donc que \(A\) est une matrice diagonale. La réciproque est claire.
Soit une matrice \(A = ((a_{i,j}))\) qui commute avec toutes les matrices symétriques. Soit \(k \in [\kern-0.127em[ 1, n ]\kern-0.127em]\). La matrice \(E_{k,k}\) est symétrique, et on calcule \[AE_{kk} = \sum_{i=1}^n \sum_{j=1}^n a_{i,j}E_{i,j}E_{k,k} = \sum_{i=1}^n \sum_{j=1}^n a_{i,j} \delta_{j,k}E_{i,k} = \sum_{i=1}^n a_{i,k}E_{i,k}\] \[E_{kk}A = \sum_{i=1}^n \sum_{j=1}^n a_{i,j} E_{k,k}E_{i,j} = \sum_{i=1}^n \sum_{j=1}^n a_{i,j} \delta_{k,i}E_{k,j} = \sum_{j=1}^n a_{k,j}E_{k,j}\] Par conséquent, les coefficients de la matrice \(AE_{k,k}\) sont nuls, sauf sur la \(k\)-ième colonne où ce sont les coefficients de la \(k\)-ième colonne de la matrice \(A\). De même, les coefficients de la matrice \(E_{kk}A\) sont tous nuls sauf sur la \(k\)-ième ligne, où l’on retrouve les coefficients de la matrice \(A\). Puisque \(AE_{k,k} = E_{k,k}A\), on en déduit que \(\forall (i, k) \in [\kern-0.127em[ 1, n ]\kern-0.127em]^2\), \(i \neq k \Rightarrow a_{i,k} = a_{k,i} = 0_{\mathbb{K} }\). La matrice \(A\) est donc nécessairement une matrice diagonale : \(A = \sum_{i=1}^n d_i E_{i,i}\).
Considérons ensuite pour \((k, \ell) \in [\kern-0.127em[ 1, n ]\kern-0.127em]^2\), \(k \neq \ell\), la matrice symétrique \(S = E_{k,\ell} + E_{\ell, k}\). On calcule \[AS = \sum_{i=1}^n d_i E_{i,i}E_{k,\ell} + \sum_{i=1}^n d_i E_{i,i}E_{\ell, k} = d_k E_{k,\ell} + d_\ell E_{\ell, k}\] \[SA = \sum_{i=1}^n d_iE_{k,\ell}E_{i,i} + \sum_{i=1}^n d_iE_{\ell, k}E_{i,i} = d_\ell E_{k,\ell} + d_k E_{\ell, k}\] Puisque le système \((E_{k,\ell}, E_{\ell, k})\) est libre, on trouve que \(d_\ell = d_k\). En définitive, la matrice \(A\) doit être une matrice scalaire : \(\exists \alpha \in \mathbb{K}\) tel que \(A = \alpha I_n\). Réciproquement, une matrice scalaire commute avec toute matrice, donc avec toute matrice symétrique.
Soit une matrice \(A=((a_{i,j}))\in \mathfrak{M}_{n}(\mathbb{\mathbb{K} })\) et deux indices \((k,l) \in [\kern-0.127em[ 1, n ]\kern-0.127em]^2\).
Déterminer les matrices \(AE_{k,l}\) et \(E_{k,l}A\).
Trouver toutes les matrices \(A \in \mathfrak{M}_{n}(\mathbb{\mathbb{K} })\) vérifiant : \(\forall B\in \mathfrak{M}_{n}(\mathbb{\mathbb{K} }) , \quad AB=BA\).
On sait que \(A=\sum_{i,j=1\dots n} a_{i,j}E_{ij}\) donc \[AE_{k,l} = \sum_{i,j=1\dots n} a_{i,j}E_{i,j} E_{k,l}=\sum_{i,j=1\dots n} a_{i,j} \delta_{j,k}E_{i,l}= \sum_{i=1\dots n} a_{i,k}E_{i,l}\] \[E_{k,l} A= \sum_{i,j=1\dots n} a_{i,j} E_{k,l}E_{i,j}=\sum_{i,j=1\dots n} a_{i,j} \delta_{l,i}E_{k,j}= \sum_{j=1\dots n} a_{l,j}E_{k,j}\]
Si pour tout \(B\in \mathfrak{M}_{n}(\mathbb{\mathbb{K} })\), \(AB=BA\), alors en particulier, pour tout \(k,l\in\llbracket 1,n\rrbracket\), \(E_{k,l}A=AE_{l,k}\) et donc \(\sum_{i=1\dots n} a_{i,k}E_{i,l}=\sum_{j=1\dots n} a_{l,j}E_{k,j}\). Mais la famille \(\left(E_{i,j}\right)\) est libre donc cette égalité n’a lieu que si \(a_{i,k}=0\) pour \(i\neq k\) et si \(a_{i,i}=a_{j,j}\) pour tout \(i,j\in\llbracket 1,n\rrbracket\), autrement dit que si \(A\) est scalaire. Réciproquement, si \(A\) est scalaire alors elle commute avec toutes les matrices de \(\mathfrak{M}_{n}(\mathbb{\mathbb{K} })\).
Déterminer une condition nécessaire et suffisante pour que le produit de deux matrices symétriques soit encore une matrice symétrique.
Soit \(C=AB\), où \(A = \left( a_{i,j}\right)_{\substack{ 1\leqslant i \leqslant n\\ 1\leqslant j \leqslant n}}\) et \(B = \left( b_{i,j}\right)_{\substack{ 1\leqslant i \leqslant n\\ 1\leqslant j \leqslant n}}\) sont deux matrices carrées symétriques. On a \(c_{i,j}=\displaystyle \sum_{k=1}^n a_{i,k} b_{k,j} = \sum_{k=1}^n a_{k,i} b_{j,k} = \sum_{k=1}^n b_{j,k} a_{k,i} = c'_{j,i}\) avec \(C'=BA\). Donc \(c_{i,j}=c_{j,i}\) si et seulement si \(C = C'\) c’est-à-dire lorsque \(A\) et \(B\) commutent.
On considère la matrice \[J = \begin{pmatrix} 0 & 1 & \ldots & \mathbb{O}\\ \vdots & \ddots & \ddots & \vdots \\ & &0 & 1 \\ \mathbb{O}& \ldots & 0 & 0 \end{pmatrix}\] Calculer \({J}^{\mathrm{T}}J\), et \(J{J}^{\mathrm{T}}\).
On considère \(\mathcal B = (e_i)_{1\leqslant i \leqslant n}\) la base canonique de \(\mathbb{R}^n\) et \(u\) l’endomorphisme de \(\mathbb{R}^n\) défini par \(u(e_1) = 0\) et \(u(e_i) = e_{i-1}\) pour \(i\geqslant 2\). \(J\) est la matrice de \(u\) dans \(\mathcal B\). \({J}^{\mathrm{T}}\) est la matrice de \(v\) dans \(\mathcal B\), avec \(v(e_i) = e_{i+1}\) pour \(i\leqslant n-1\) et \(v(e_n) = 0\). \({J}^{\mathrm{T}}J\) est la matrice de \(v\circ u\) dans \(\mathcal B\). On a \(v\circ u(e_1) = 0\) et \(v\circ u(e_i) = v(e_{i-1}) = e_i\). Donc \[{J}^{\mathrm{T}}J = \begin{pmatrix} 0 & 0 & \dots& \dots& \dots& 0 \\ 0 & 1 & 0 & \dots& \dots& \vdots \\ \vdots & 0 & 1 & 0 & \dots& \vdots \\ \vdots & \vdots & \ddots & \ddots & \ddots & 0 \\ \vdots & & \ddots & \ddots & \ddots & 0 \\ 0 & 0 & \dots& \dots& 0 & 1 \end{pmatrix} \qquad \textrm{ de même } \qquad J{J}^{\mathrm{T}} = \begin{pmatrix} 1 & 0 & \dots& \dots& \dots& 0 \\ 0 & 1 & 0 & \dots& \dots& \vdots \\ \vdots & 0 & 1 & 0 & \dots& \vdots \\ \vdots & \vdots & \ddots & \ddots & \ddots & 0 \\ 0 & & \ddots & \ddots & 1 & 0 \\ 0 & 0 & \dots& \dots& 0 & 0 \end{pmatrix}\]
On définit pour \(i \neq j\), la matrice \(T_{ij}^{\lambda} \in \mathfrak{M}_{n}(\mathbb{R})\) par \[T_{ij}^{\lambda} = I+\lambda E_{i,j}\] Soit une matrice \(A\in \mathfrak{M}_{n}(\mathbb{R})\). Calculer \(AT_{ij}^{\lambda}\) et \(T_{ij}^{\lambda}A\). Interpréter le résultat trouvé.
Soit \(e_i\) les vecteurs colonnes de la base canonique de \(\mathbb{R}^n\). On a \(T_{ij}^{\lambda} e_k = e_k\) pour \(k\neq i\) et \(T_{ij}^{\lambda} e_j = e_j + \lambda e_i\). On en déduit que la \(k\)-ième colonne de la matrice de \(AT_{ij}^{\lambda}\) est \(AT_{ij}^{\lambda}e_k = Ae_k\) pour \(k\neq i\) et \(AT_{ij}^{\lambda} e_j = Ae_j + \lambda Ae_i\). Moralité : la matrice \(AT_{ij}^{\lambda}\) est obtenue en ajoutant \(\lambda\) fois la \(i\)-ème colonne de \(A\) à sa \(j\)-ème colonne.
Soit \(A\in \mathfrak{M}_{n,p}(\mathbb{R})\) telle que \[\forall (X,Y) \in \mathfrak{M}_{n,1}(\mathbb{R}) \times\mathfrak{M}_{p,1}(\mathbb{R}) \quad{X}^{\mathrm{T}}AY = 0.\]
Montrer que \(A=0\).
Trouver une matrice \(2 \times 2\) non-nulle telle que \[\forall X \in \mathfrak{M}_{21}(\mathbb{R}) \quad^tXAX = 0 .\]
Soit \(f_j\) la \(j\)-ème matrice de la base naturelle de \(\mathfrak{M}_{p,1}(\mathbb{R})\) et \(e_i\) la \(i\)-ème matrice de la base naturelle de \(\mathfrak{M}_{n,1}(\mathbb{R})\). On a \({e_i}^{\mathrm{T}}Af_j = a_{i,j}\) d’où le résultat.
\(\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}\).
Soient deux matrices \(A,B \in \mathfrak{M}_{n}(\mathbb{R})\) telles que : \[\forall C \in \mathfrak{M}_{n}(\mathbb{R}) \quad ACB=0\] Montrer que \(A=0\) ou \(B=0\).
On traduit l’énoncé avec des endomorphismes : Soit \(u,v\in\mathcal L(\mathbb{R}^n)\) tels que \(\forall w\in\mathcal L(\mathbb{R}^n),\; u\circ w\circ v =0\). Démonter que \(u=0\) ou \(v=0\).
Soit deux matrices colonnes non nulles \(X, Y \in \mathfrak{M}_{n,1}(\mathbb{R})\).
Montrer que la matrice \(X{Y}^{\mathrm{T}}\) est de rang \(1\).
Montrer que toute matrice carrée \(A\) de rang \(1\) peut s’écrire sous la forme ci-dessus.
Soit une matrice \(A\in\mathfrak{M}_{n1}(\mathbb{R})\) de rang \(1\). Montrer qu’il existe \(\lambda \in \mathbb{R}\) tel que \[A^2 = \lambda A\] et exprimer \(\lambda\) en fonction de \(X\) et \(Y\).
Le rang de \(X\) et de \({Y}^{\mathrm{T}}\) égale \(1\) donc le rang du produit est \(\leqslant 1\). Par exemple parce que toutes les lignes (ou les colonnes) sont proportionnelles, ou bien parce que si \(u\) et \(v\) sont deux applications linéaires, \(u\circ v\) (si elle existe) a un rang inférieur au rang de \(u\). Le rang de \(X{Y}^{\mathrm{T}}\) n’est pas \(0\) manifestement.
Comme \(A\neq0\), on choisit un élément \(a_{ij}\neq0\). Comme \(A\) est de rang \(1\), toutes les lignes sont proportionnelles à la \(i\)-ème ligne : \(L_k = \alpha_k L_i\). Donc on peut prendre \(X = (\alpha_1,\ldots,\alpha_{i-1},1,\alpha_{i+1},\ldots,\alpha_n)\) et \(Y = (a_{i1},\ldots,a_{in})\).
On écrit \(A = X{Y}^{\mathrm{T}}\), d’où \(A^2 = AA = X{Y}^{\mathrm{T}}X{Y}^{\mathrm{T}}\). Comme \({Y}^{\mathrm{T}}X\) est un réel, il commute à \(X\). Donc \(AA = ({Y}^{\mathrm{T}}X)X{Y}^{\mathrm{T}} = ({Y}^{\mathrm{T}}X)A\). On peut donc prendre \(\lambda = {Y}^{\mathrm{T}}X\).
Déterminer toutes les formes linéaires \(\varphi\) sur \(\mathfrak{M}_{n}(\mathbb{R})\) vérifiant : \[\forall A,B \in \mathfrak{M}_{n}(\mathbb{R}) \quad\varphi(AB)=\varphi(B{A}^{\mathrm{T}})\]
Remarque : Si \(n=1\), alors toutes les formes linéaires conviennent.
On considère deux matrices \(A\) et \(B\) de \(\mathfrak{M}_{2}\left((\right)\mathbb{R} )\), et \(C=AB\).
Calculer le nombre d’additions, puis de multiplications nécessaires au calcul de \(C\).
On pose : \(S_1 = a_{2,1} - a_{1,1};\; S_2 = a_{1,1} + a_{1,2};\; S_3 = a_{1,2} - S_{1};\; S_4 = a_{2,2} - S_{3};\; S_5 = b_{2,2} - b_{1,2};\; S_6 = b_{1,2} - b_{1,1};\; S_7 = b_{1,1} + S_{5};\; S_8 = b_{2,1} - S_{7}\).
Calculer le nombre d’additions, puis de multiplications nécessaires au calcul de \(C\) par cette nouvelle méthode.
Il y a \(4\) coefficients à calculer. Pour chacun d’eux il y a deux multiplications et une addition. Soit \(8\) multiplications et \(4\) additions.
\(S_{10} + P_6 = S_9 + P_3 + a_{1,2}S_{8} = P_1 + P_7 + S_{1}S_{5} + a_{1,2}( b_{2,1} - S_{7}) = a_{2,1}b_{1,1} + S_{3}S_{7} + (a_{2,1} - a_{1,1})(b_{2,2} - b_{1,2}) + a_{1,2} b_{2,1} - a_{1,2}(b_{1,1} + S_{5}) = a_{2,1}b_{1,1} + (a_{1,2} - S_{1})(b_{1,1} + S_{5}) + a_{2,1} b_{2,2} - a_{2,1} b_{1,2} - a_{1,1} b_{2,2} + a_{1,1}b_{1,2} + a_{1,2} b_{2,1} - a_{1,2}b_{1,1} - a_{1,2}(b_{2,2} - b_{1,2}) = a_{2,1}b_{1,1} + a_{1,2}b_{1,1} + a_{1,2}(b_{2,2} - b_{1,2}) - (a_{2,1} - a_{1,1})b_{1,1} - (a_{2,1} - a_{1,1})(b_{2,2} - b_{1,2}) + a_{2,1} b_{2,2} - a_{2,1} b_{1,2} - a_{1,1} b_{2,2} + a_{1,1} b_{1,2} + a_{1,2} b_{2,1} - a_{1,2}b_{1,1} - a_{1,2}b_{2,2} + a_{1,2}b_{1,2} = a_{2,1}b_{1,1} + a_{1,2}b_{1,1} + a_{1,2}b_{2,2} - a_{1,2}b_{1,2} - a_{2,1}b_{1,1} + a_{1,1}b_{1,1} - a_{2,1}b_{2,2} + a_{2,1}b_{1,2} + a_{1,1}b_{2,2} - a_{1,1}b_{1,2} + a_{2,1} b_{2,2} - a_{2,1} b_{1,2} - a_{1,1} b_{2,2} + a_{1,1}b_{1,2} + a_{1,2} b_{2,1} - a_{1,2}b_{1,1} - a_{1,2}b_{2,2} + a_{1,2}b_{1,2} = a_{1,1}b_{1,1} + a_{1,1}b_{2,2} - a_{1,1}b_{1,2} - a_{1,1} b_{2,2} + a_{1,1}b_{1,2} + a_{1,2}b_{1,1} + a_{1,2}b_{2,2} - a_{1,2}b_{1,2} + a_{1,2} b_{2,1} - a_{1,2}b_{1,1} - a_{1,2}b_{2,2} + a_{1,2}b_{1,2} + a_{2,1}b_{1,1} - a_{2,1}b_{1,1} - a_{2,1}b_{2,2} + a_{2,1}b_{1,2} + a_{2,1} b_{2,2} - a_{2,1}b_{1,2} = a_{1,1}b_{1,1} + a_{1,2} b_{2,1} + 0 = c_{1,1}\). Les trois autres calculs sont tout aussi jubilatoires.
Il y a \(7\) multiplications et \(11\) additions. Le deuxième algorithme est plus rapide dès qu’une addition est \(7\) fois plus rapide qu’une addition. Dans ce cas on constate que le gain en rapidité est au détriment de la place mémoire utilisée.
Soient \(A_{1} \in \mathcal M _{n,p_{1}}(\mathbb{K})\), \(A_{2} \in \mathcal M _{n,p_{2}}(\mathbb{K})\), \(B_{1} \in \mathcal M _{p_{1},q}(\mathbb{K})\), \(B_{2} \in \mathcal M _{p_{2},q}(\mathbb{K})\).
On pose \(A = \begin{pmatrix}A_{1}&A_{2}\end{pmatrix} \in \mathcal M _{n,p_{1}+p_{2}}(\mathbb{K})\) et \(B = \begin{pmatrix}B_{1}\\ B_{2}\end{pmatrix} \in \mathcal M _{p_{1}+p_{2},q}(\mathbb{K})\).
Montrer que \(AB = A_{1}B_{1} + A_{2}B_{2}\).
Soit \(M = \begin{pmatrix}A & B \\ 0 & C\end{pmatrix}\) où \(A,B,0,C\) sont des matrices de tailles \(p\times p\), \(p\times q\), \(q\times p\), \(q\times q\) (matrice triangulaire par blocs). Montrer que \(M\) est inversible si et seulement si \(A\) et \(C\) le sont. Le cas échéant, donner \(M^{-1}\) sous la même forme.
En déduire une démonstration de la propriété : L’inverse d’une matrice triangulaire est triangulaire.
\(M^{-1}=\begin{pmatrix}A^{-1}&-A^{-1}BC^{-1}\\ 0&C^{-1}\end{pmatrix}\).