On appelle matrice à $n$ lignes et $p$ colonnes, avec $(n,p)\in(\mathbb{N}^*)^2$, tout tableau du type :
\[A = \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1p} \\ a_{21} & a_{22} & \cdots & a_{2p} \\ \vdots & \vdots & & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{np} \end{pmatrix}\]Une telle matrice se note $A = (a_{i,j})_{i,j}$ et se lit et s'écrit en colonnes. $a_{i,j} \in \mathbb{R}$ est appelé coefficient de la matrice ; il se situe à l'intersection de la $i$-ième ligne et de la $j$-ième colonne. On note ce coefficient $a_{i,j}$ ou $A[i,j]$.
L'ensemble des matrices à $n$ lignes et $p$ colonnes à coefficients réels se note $\mathcal{M}_{n,p}(\mathbb{R})$.
Si $p = n$, $A$ est une matrice carrée d'ordre $n$. L'ensemble de ces matrices se note $\mathcal{M}_n(\mathbb{R})$.
On appelle matrice nulle à $n$ lignes et $p$ colonnes la matrice dont tous les coefficients sont nuls. On la note $O_{n,p}$ ou simplement $O_n$ si $n = p$.
Deux matrices $A = (a_{i,j})_{i,j}$ et $B = (b_{i,j})_{i,j}$ de $\mathcal{M}_{n,p}(\mathbb{R})$ sont égales si et seulement si tous leurs coefficients sont égaux :
\[\forall i \in \llbracket 1,n \rrbracket,\quad \forall j \in \llbracket 1,p \rrbracket,\quad a_{i,j} = b_{i,j}\]On note alors $A = B$.
On appelle matrice unité d'ordre $n$ la matrice notée $I_n$ ayant des "1" sur la diagonale et des "0" ailleurs. Elle est définie par :
\[I_n = (\delta_{i,j})_{i,j} \quad \text{où} \quad \delta_{i,j} = \begin{cases} 1 & \text{si } i = j \\ 0 & \text{si } i \neq j \end{cases}\]Soit $A = (a_{i,j})_{i,j} \in \mathcal{M}_n(\mathbb{R})$. On dit que $A$ est une matrice diagonale ssi $a_{i,j} = 0$ pour $i \neq j$. Une matrice $A$ est diagonale ssi elle est du type :
\[A = \begin{pmatrix} a_{11} & 0 & \cdots & 0 \\ 0 & a_{22} & & \vdots \\ \vdots & & \ddots & 0 \\ 0 & \cdots & 0 & a_{nn} \end{pmatrix}\]L'ensemble des matrices diagonales se note $D_n(\mathbb{R})$. On a $I_n \in D_n(\mathbb{R})$ et $O_n \in D_n(\mathbb{R})$.
Soit $A = (a_{i,j})_{i,j} \in \mathcal{M}_n(\mathbb{R})$.
$A$ est triangulaire supérieure ssi $a_{i,j} = 0$ pour $i > j$ (zéros sous la diagonale).
$A$ est triangulaire inférieure ssi $a_{i,j} = 0$ pour $i < j$ (zéros au-dessus de la diagonale).
Soit $A = (a_{i,j})_{i,j} \in \mathcal{M}_{n,p}(\mathbb{R})$, $B = (b_{i,j})_{i,j} \in \mathcal{M}_{n,p}(\mathbb{R})$ et $\lambda \in \mathbb{R}$.
La somme $A + B$ est la matrice $C = (c_{i,j})_{i,j} \in \mathcal{M}_{n,p}(\mathbb{R})$ définie par :
\[\forall i \in \llbracket 1,n \rrbracket,\; \forall j \in \llbracket 1,p \rrbracket,\quad c_{i,j} = a_{i,j} + b_{i,j}\]La multiplication par $\lambda$ est la matrice $D = \lambda.A \in \mathcal{M}_{n,p}(\mathbb{R})$ définie par :
\[\forall i \in \llbracket 1,n \rrbracket,\; \forall j \in \llbracket 1,p \rrbracket,\quad d_{i,j} = \lambda \cdot a_{i,j}\]Soient $A$, $B$ deux matrices de $\mathcal{M}_n(\mathbb{R})$. On note $\text{Vect}(A,B) = \{M = \lambda.A + \mu.B \mid \lambda, \mu \in \mathbb{R}\}$.
On a $M \in \text{Vect}(A,B) \Leftrightarrow \exists(\lambda,\mu)\in\mathbb{R}^2$ tels que $M = \lambda.A + \mu.B$.
On dit alors que $M$ est une combinaison linéaire de $A$ et de $B$.
Soit $A = (a_{i,j})_{i,j} \in \mathcal{M}_{n,r}(\mathbb{R})$ et $B = \begin{pmatrix}b_1 \\ b_2 \\ \vdots \\ b_r\end{pmatrix} \in \mathcal{M}_{r,1}(\mathbb{R})$. On pose $A \times B = C$ avec :
\[C = \begin{pmatrix} a_{11}b_1 + a_{12}b_2 + \cdots + a_{1r}b_r \\ a_{21}b_1 + a_{22}b_2 + \cdots + a_{2r}b_r \\ \vdots \\ a_{n1}b_1 + a_{n2}b_2 + \cdots + a_{nr}b_r \end{pmatrix} \in \mathcal{M}_{n,1}(\mathbb{R})\]Pour calculer un produit matriciel, on utilisera une présentation sous forme de tableau ($B$ en haut, $A$ à gauche, coefficients de $C$ dans le tableau).
Soit $A = (a_{i,j})_{i,j} \in \mathcal{M}_{n,r}(\mathbb{R})$ et $B = (b_{i,j})_{i,j} \in \mathcal{M}_{r,p}(\mathbb{R})$. On appelle produit matriciel de $A$ par $B$ la matrice $C = A \times B$ définie par :
\[C = (c_{i,j})_{i,j} \in \mathcal{M}_{n,p}(\mathbb{R}) \quad \text{avec} \quad c_{i,j} = \sum_{k=1}^{r} a_{i,k}\, b_{k,j}\]On construit $C$ colonne par colonne : la $i$-ième colonne de $C$ est $C_i = A \times B_i$.
Dans tout ce paragraphe, $A$, $B$, $C$ sont des matrices et $\lambda$, $\mu$ des nombres.
- Associativité : $A + (B+C) = (A+B)+C$ ; $A\times(B\times C) = (A\times B)\times C$ ; $\lambda.(\mu.A) = (\lambda\mu).A$
- Distributivité : $A\times(B+C) = A\times B + A\times C$ et $(B+C)\times A = B\times A + C\times A$ ; $(\lambda+\mu).A = \lambda.A + \mu.A$ et $\lambda.(A+B) = \lambda.A + \lambda.B$
- Regroupement des scalaires : $(\lambda.A)\times B = A\times(\lambda.B) = \lambda.(A\times B)$ et $(\lambda.A)\times(\mu.B) = (\lambda\mu).A\times B$
- La "+" est commutative ; "×" ne l'est pas : $A+B = B+A$ mais en général $A\times B \neq B\times A$
On dit que deux matrices $A$ et $B$ de $\mathcal{M}_n(\mathbb{R})$ commutent ssi $A\times B = B\times A$.
- Action des réels : $0.A = O_{n,p}$ et $1.A = A$
- Action des matrices : \[A + O_{n,p} = O_{n,p} + A = A\] \[A\times O_p = O_n\times A = O_{n,p}\] \[A\times I_p = I_n\times A = A\]
Soit $D = \text{diag}(d_1,\dots,d_n)$ et $\Delta = \text{diag}(\delta_1,\dots,\delta_n)$ deux matrices diagonales :
$D + \Delta$ est une matrice diagonale : $D + \Delta = \text{diag}(d_1+\delta_1, \dots, d_n+\delta_n)$
$D\times\Delta$ est une matrice diagonale : $D\times\Delta = \text{diag}(d_1\delta_1, \dots, d_n\delta_n)$
Remarque : Le résultat d'une opération sur des matrices triangulaires est aussi une matrice du même type.
Soit $A = (a_{i,j})_{i,j} \in \mathcal{M}_{n,p}(\mathbb{R})$. On appelle transposée de $A$ la matrice notée ${}^tA$ obtenue en faisant une symétrie par rapport à la diagonale (les lignes de ${}^tA$ sont les colonnes de $A$). Elle est définie par :
\[{}^tA = (b_{i,j})_{i,j} \in \mathcal{M}_{p,n}(\mathbb{R}) \quad \text{où} \quad \forall(i,j)\in\llbracket 1,p\rrbracket\times\llbracket 1,n\rrbracket,\quad b_{i,j} = a_{j,i}\]Ainsi, la $k$-ième colonne de $A$ devient la $k$-ième ligne de ${}^tA$.
Soit $M = (m_{i,j})_{i,j} \in \mathcal{M}_n(\mathbb{R})$.
$M$ est une matrice symétrique ssi ${}^tM = M$.
$M$ est une matrice antisymétrique ssi ${}^tM = -M$. En particulier, les coefficients diagonaux d'une matrice antisymétrique sont tous nuls.
Soit $A$ et $B$ deux éléments de $\mathcal{M}_{n,p}(\mathbb{R})$ (ou $\mathcal{M}_n(\mathbb{R})$) et $\lambda \in \mathbb{R}$ :
Soit $A \in \mathcal{M}_n(\mathbb{R})$. On pose :
\[A^0 = I_n \qquad \text{et} \qquad \forall k \in \mathbb{N}^*,\quad A^k = \underbrace{A\times A\times\cdots\times A}_{k \text{ fois}}\]- La matrice unité $I_n$ commute avec toute matrice $A \in \mathcal{M}_n(\mathbb{R})$ et avec toute puissance de $A$.
- $A$ commute avec toute puissance de $A$ : $\forall k \in \mathbb{N},\; A\times A^k = A^k\times A = A^{k+1}$
- Si $B$ commute avec $A$, alors $\forall k \in \mathbb{N}$ : $A\times B^k = B^k\times A$ et $(A\times B)^k = A^k\times B^k$
Attention : Si $A$ et $B$ ne commutent pas, on ne peut rien dire. Notamment $(AB)^n \neq A^n B^n$ en général.
Si $D = \text{diag}(d_1,\dots,d_n)$ est une matrice diagonale, alors $\forall k \in \mathbb{N}$, $D^k$ est une matrice diagonale et :
\[D^k = \text{diag}(d_1^k, \dots, d_n^k)\]Soit $A$ et $B$ deux matrices de $\mathcal{M}_r(\mathbb{R})$ telles que $A\times B = B\times A$. On a pour tout $n \in \mathbb{N}$ :
\[(A+B)^n = \sum_{k=0}^{n} \binom{n}{k} A^k \times B^{n-k} = B^n + \binom{n}{1}A\,B^{n-1} + \binom{n}{2}A^2\,B^{n-2} + \cdots + A^n\]On dit qu'une matrice $A$ de $\mathcal{M}_n(\mathbb{R})$ est inversible ssi il existe une matrice $B \in \mathcal{M}_n(\mathbb{R})$ telle que :
\[A\times B = I_n \quad \text{ou} \quad B\times A = I_n\]$B$ est alors unique et s'appelle l'inverse de $A$, noté $A^{-1}$. On a :
\[\boxed{A \text{ est inversible} \iff A^{-1} \text{ existe} \iff A\times A^{-1} = A^{-1}\times A = I_n}\]- $I_n$ est inversible avec $(I_n)^{-1} = I_n$ ; par contre, $O_n$ n'est pas inversible.
- Si $A$ est inversible alors $A^{-1}$ est inversible et $(A^{-1})^{-1} = A$.
- Le produit de matrices inversibles est inversible : si $A$ et $B$ sont inversibles alors $(A\times B)^{-1} = B^{-1}\times A^{-1}$.
- La transposée d'une matrice inversible est inversible : $({}^tA)^{-1} = {}^t(A^{-1})$.
- Si $A$ est inversible alors $\forall k \in \mathbb{N}$, $A^k$ est inversible et $(A^k)^{-1} = (A^{-1})^k$.
Une matrice diagonale $D = \text{diag}(d_1, d_2, \dots, d_n)$ est inversible ssi tous ses coefficients diagonaux sont différents de zéro :
\[D \text{ est inversible} \iff \forall i \in \llbracket 1,n\rrbracket,\; d_i \neq 0 \quad \Rightarrow \quad D^{-1} = \text{diag}\!\left(\tfrac{1}{d_1}, \tfrac{1}{d_2}, \dots, \tfrac{1}{d_n}\right)\]Une matrice triangulaire est inversible ssi tous ses coefficients diagonaux sont différents de zéro. Ainsi pour $T = (t_{ij})$ triangulaire :
\[T \text{ est inversible} \iff \forall i \in \llbracket 1,n\rrbracket,\; t_{ii} \neq 0\]L'inverse $T^{-1}$ est alors une matrice triangulaire du même type, avec $\frac{1}{t_{ii}}$ sur la diagonale.
Soit $M = \begin{pmatrix} a & c \\ b & d \end{pmatrix} \in \mathcal{M}_2(\mathbb{R})$. On a :
\[M \text{ est inversible} \iff ad - bc \neq 0 \qquad \text{et dans ce cas} \quad M^{-1} = \frac{1}{ad-bc}\begin{pmatrix} d & -c \\ -b & a \end{pmatrix}\]La quantité $ad - bc$ s'appelle le déterminant de $M$.
- Si la matrice contient une colonne (ou ligne) nulle, elle n'est pas inversible.
- Une matrice ayant deux colonnes (ou deux lignes) proportionnelles n'est pas inversible.
- Si l'on peut recréer une colonne nulle à l'aide des autres colonnes (ou lignes), la matrice n'est pas inversible.