Chapitre 2 : Matrices

Opérations matricielles, pivot de Gauss, inverse et rang

Auteur·rice

Ibrahim BENKHERFELLAH

Modifié

27 mai 2026

Matrices

L’espace vectoriel des matrices \(\mathcal{M}_{n,p}(\mathbb{R})\)

Définition 2.1 - Matrice

Une matrice à \(n\) lignes et \(p\) colonnes à coefficients réels est un tableau rectangulaire de nombres réels : \[ A = \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1p} \\ a_{21} & a_{22} & \cdots & a_{2p} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{np} \end{pmatrix} \]

L’ensemble de toutes les matrices à \(n\) lignes et \(p\) colonnes est noté \(\mathcal{M}_{n,p}(\mathbb{R})\).

Le coefficient situé à la ligne \(i\) et la colonne \(j\) est noté \(a_{ij}\) ou \((A)_{ij}\).

Quand \(n = p\), on parle de matrice carrée d’ordre \(n\) et on note \(\mathcal{M}_n(\mathbb{R})\).

Exemple 2.1.1

La matrice \(A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}\) est une matrice de \(\mathcal{M}_{2,3}(\mathbb{R})\).

On a \(a_{12} = 2\) et \(a_{23} = 6\).

Définition 2.2 - Types de matrices particulières

  • La matrice nulle de \(\mathcal{M}_{n,p}(\mathbb{R})\), notée \(O_{n,p}\) ou simplement \(O\), est la matrice dont tous les coefficients sont nuls.
  • Une matrice ligne est une matrice à une seule ligne (élément de \(\mathcal{M}_{1,p}(\mathbb{R})\)).
  • Une matrice colonne est une matrice à une seule colonne (élément de \(\mathcal{M}_{n,1}(\mathbb{R})\)).
  • Pour une matrice carrée \(A \in \mathcal{M}_n(\mathbb{R})\), la diagonale principale est formée des coefficients \(a_{11}, a_{22}, \ldots, a_{nn}\).
  • Une matrice carrée est diagonale si tous ses coefficients en dehors de la diagonale principale sont nuls.
  • La matrice identité d’ordre \(n\), notée \(I_n\) ou simplement \(I\), est la matrice diagonale dont tous les coefficients diagonaux valent 1 : \[ I_n = \begin{pmatrix} 1 & 0 & \cdots & 0 \\ 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & 1 \end{pmatrix} \]

Définition 2.3 - Matrices élémentaires

Pour \(i \in \{1, \ldots, n\}\) et \(j \in \{1, \ldots, p\}\), on note \(E_{ij}\) la matrice de \(\mathcal{M}_{n,p}(\mathbb{R})\) dont le seul coefficient non nul est situé en position \((i,j)\) et vaut 1.

Ces matrices sont appelées matrices élémentaires.

Exemple 2.1.2

Dans \(\mathcal{M}_{2,3}(\mathbb{R})\), on a : \[ E_{12} = \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 0 \end{pmatrix}, \quad E_{23} = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix} \]

Opérations sur les matrices

Définition 2.4 - Addition et multiplication scalaire

Soient \(A = (a_{ij})\) et \(B = (b_{ij})\) deux matrices de \(\mathcal{M}_{n,p}(\mathbb{R})\).

Addition : La somme \(A + B\) est la matrice de \(\mathcal{M}_{n,p}(\mathbb{R})\) définie par : \[ (A + B)_{ij} = a_{ij} + b_{ij} \]

Multiplication par un scalaire : Pour \(\lambda \in \mathbb{R}\), le produit \(\lambda A\) est la matrice de \(\mathcal{M}_{n,p}(\mathbb{R})\) définie par : \[ (\lambda A)_{ij} = \lambda a_{ij} \]

Proposition 2.5

L’ensemble \(\mathcal{M}_{n,p}(\mathbb{R})\) muni de l’addition et de la multiplication par un scalaire est un espace vectoriel réel de dimension \(np\).

Une base de \(\mathcal{M}_{n,p}(\mathbb{R})\) est formée par les matrices élémentaires \(\{E_{ij} \mid 1 \leq i \leq n, 1 \leq j \leq p\}\).

Exemple 2.1.3

Toute matrice \(A \in \mathcal{M}_{2,3}(\mathbb{R})\) s’écrit de manière unique : \[ A = \sum_{i=1}^{2} \sum_{j=1}^{3} a_{ij} E_{ij} \]

Donc \(\dim(\mathcal{M}_{2,3}(\mathbb{R})) = 2 \times 3 = 6\).

Produit matriciel

Définition 2.6 - Produit matriciel

Soient \(A = (a_{ij}) \in \mathcal{M}_{n,p}(\mathbb{R})\) et \(B = (b_{jk}) \in \mathcal{M}_{p,q}(\mathbb{R})\). Le produit \(AB\) est la matrice de \(\mathcal{M}_{n,q}(\mathbb{R})\) définie par : \[ (AB)_{ik} = \sum_{j=1}^{p} a_{ij} b_{jk} \]

En pratique : Le coefficient de la ligne \(i\) et de la colonne \(k\) de \(AB\) est le produit scalaire de la \(i\)-ème ligne de \(A\) par la \(k\)-ème colonne de \(B\).

Remarque

Attention : Pour que le produit \(AB\) soit défini, il faut que le nombre de colonnes de \(A\) soit égal au nombre de lignes de \(B\).

Exemple 2.2.1

Calculons le produit : \[ A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}, \quad B = \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix} \]

On a : \[ \begin{aligned} AB &= \begin{pmatrix} 1 \times 5 + 2 \times 7 & 1 \times 6 + 2 \times 8 \\ 3 \times 5 + 4 \times 7 & 3 \times 6 + 4 \times 8 \end{pmatrix} \\ &= \begin{pmatrix} 19 & 22 \\ 43 & 50 \end{pmatrix} \end{aligned} \]

Remarque

Personnellement, c’est ce dessin qui m’a débloqué le produit matriciel : pour calculer une entrée \(c_{ij}\) de \(C=AB\), je vise juste la ligne \(i\) de \(A\) et la colonne \(j\) de \(B\), et je fais la somme des produits correspondants : \[ c_{ij}=\sum_{k=1}^{p} a_{ik}\,b_{kj}. \] En plus, ça force à vérifier les dimensions sans se prendre la tête : si \(A\) est \(n\times p\) et \(B\) est \(p\times q\), alors \(AB\) existe et le résultat est automatiquement de taille \(n\times q\).

Proposition 2.7

Le produit matriciel possède les propriétés suivantes :

  1. Associativité : \((AB)C = A(BC)\) quand les produits sont définis
  2. Distributivité : \(A(B+C) = AB + AC\) et \((A+B)C = AC + BC\)
  3. Élément neutre : \(I_n A = A\) et \(AI_p = A\) pour \(A \in \mathcal{M}_{n,p}(\mathbb{R})\)
  4. Compatibilité avec la multiplication scalaire : \(\lambda(AB) = (\lambda A)B = A(\lambda B)\)

Remarque

Attention : Le produit matriciel n’est pas commutatif en général.

Par exemple, avec les matrices ci-dessus : \[ BA = \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix} \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} = \begin{pmatrix} 23 & 34 \\ 31 & 46 \end{pmatrix} \neq AB \]

Exercice

Calculer le produit \(\begin{pmatrix} 1 & 2 & 3 \end{pmatrix} \begin{pmatrix} 4 \\ 5 \\ 6 \end{pmatrix}\).

Exercice

Montrer que pour toute matrice \(A \in \mathcal{M}_n(\mathbb{R})\), on a \(A \cdot I_n = I_n \cdot A = A\).

Proposition 2.8

Pour les matrices élémentaires, on a : \[ E_{ij} \cdot E_{kl} = \begin{cases} E_{il} & \text{si } j = k \\ O & \text{si } j \neq k \end{cases} \]

Puissances de matrices

Définition 2.9 - Puissances de matrices

Pour une matrice carrée \(A \in \mathcal{M}_n(\mathbb{R})\) et un entier \(k \in \mathbb{N}\), on définit : \[ \begin{aligned} A^0 &= I_n \\ A^1 &= A \\ A^{k+1} &= A^k \cdot A \end{aligned} \]

Proposition 2.10

Pour toute matrice carrée \(A\) et tous entiers \(k, l \in \mathbb{N}\), on a :

  1. \(A^k \cdot A^l = A^{k+l}\)
  2. \((A^k)^l = A^{kl}\)

Démonstration

Propriété (1) : On procède par récurrence sur \(l\). Pour \(l = 0\), on a \(A^k \cdot A^0 = A^k \cdot I_n = A^k = A^{k+0}\). Si la propriété est vraie pour \(l\), alors : \[ A^k \cdot A^{l+1} = A^k \cdot (A^l \cdot A) = (A^k \cdot A^l) \cdot A = A^{k+l} \cdot A = A^{k+l+1} \]

Propriété (2) : On procède par récurrence sur \(l\). Pour \(l = 0\), on a \((A^k)^0 = I_n = A^0 = A^{k \cdot 0}\). Si la propriété est vraie pour \(l\), alors : \[ (A^k)^{l+1} = (A^k)^l \cdot A^k = A^{kl} \cdot A^k = A^{kl+k} = A^{k(l+1)} \]

Remarque

Attention : En général, \((A+B)^2 \neq A^2 + 2AB + B^2\) car le produit matriciel n’est pas commutatif.

On a seulement : \((A+B)^2 = A^2 + AB + BA + B^2\).

Exercice

Soit \(A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}\). Calculer \(A^2\) et \(A^3\), puis conjecturer une formule pour \(A^n\) et la démontrer par récurrence.

Opérations élémentaires sur les lignes

Les opérations élémentaires sur les lignes d’une matrice sont des outils fondamentaux pour :

  • Résoudre des systèmes d’équations linéaires (méthode du pivot de Gauss)
  • Calculer le rang d’une matrice
  • Calculer l’inverse d’une matrice

Définition 2.11 - Opérations élémentaires sur les lignes

Il existe trois types d’opérations élémentaires sur les lignes d’une matrice :

  1. \(L_i \leftrightarrow L_j\) : échanger les lignes \(i\) et \(j\)
  2. \(L_i \leftarrow \lambda L_i\) avec \(\lambda \neq 0\) : multiplier la ligne \(i\) par le scalaire non nul \(\lambda\)
  3. \(L_i \leftarrow L_i + \lambda L_j\) avec \(i \neq j\) : ajouter à la ligne \(i\) un multiple de la ligne \(j\)

Exemple 2.3.1

Soit \(A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}\).

Effectuons l’opération \(L_2 \leftarrow L_2 - 4L_1\) : \[ A \to \begin{pmatrix} 1 & 2 & 3 \\ 0 & -3 & -6 \\ 7 & 8 & 9 \end{pmatrix} \]

Proposition 2.12

Toute opération élémentaire sur les lignes peut être représentée par une multiplication à gauche par une matrice inversible.

Plus précisément, effectuer une opération élémentaire sur \(A\) revient à calculer \(EA\)\(E\) est la matrice obtenue en effectuant la même opération sur \(I_n\).

Exemple 2.3.2

L’opération \(L_1 \leftrightarrow L_2\) sur une matrice \(2 \times 2\) correspond à la multiplication par : \[ P = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \]

En effet : \(\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} a & b \\ c & d \end{pmatrix} = \begin{pmatrix} c & d \\ a & b \end{pmatrix}\)

Forme échelonnée

Définition 2.13 - Forme échelonnée

Une matrice est dite en forme échelonnée (ou échelonnée par lignes) si :

  1. Toutes les lignes nulles (si elles existent) sont en bas
  2. Pour chaque ligne non nulle, le premier coefficient non nul (appelé pivot) est strictement à droite du pivot de la ligne précédente

Une matrice est en forme échelonnée réduite si de plus :

  1. Tous les pivots valent 1
  2. Dans chaque colonne contenant un pivot, tous les autres coefficients sont nuls

Exemple 2.3.3

Matrice en forme échelonnée : \[ \begin{pmatrix} 2 & 1 & -3 & 4 \\ 0 & 3 & 5 & -1 \\ 0 & 0 & 4 & 2 \\ 0 & 0 & 0 & 21 \end{pmatrix} \]

Les pivots sont \(2\), \(3\) et \(4\). Chaque pivot est strictement à droite de celui de la ligne précédente.

Matrice en forme échelonnée réduite : \[ \begin{pmatrix} 1 & 0 & 2 & -1 \\ 0 & 1 & 3 & 4 \\ 0 & 0 & 1 & 5 \\ 0 & 0 & 0 & 1 \end{pmatrix} \]

Les pivots sont égaux à \(1\) et sont les seuls éléments non nuls de leur colonne.

Théorème 2.14 - Algorithme du pivot de Gauss

Toute matrice peut être transformée en une matrice échelonnée réduite par une suite d’opérations élémentaires sur les lignes.

Cette forme échelonnée réduite est unique.

Exercice

Mettre la matrice suivante sous forme échelonnée : \[ A = \begin{pmatrix} 1 & 2 & 1 \\ 2 & 4 & 3 \\ 1 & 2 & 2 \end{pmatrix} \]

Inverse d’une matrice

Définition 2.15 - Matrice inversible

Une matrice carrée \(A \in \mathcal{M}_n(\mathbb{R})\) est dite inversible (ou régulière) s’il existe une matrice \(B \in \mathcal{M}_n(\mathbb{R})\) telle que : \[ AB = BA = I_n \]

La matrice \(B\) est alors unique et est appelée l’inverse de \(A\), notée \(A^{-1}\).

Une matrice non inversible est dite singulière.

Proposition 2.16

Si \(A\) est inversible, alors \(A^{-1}\) est unique.

Démonstration

Supposons qu’il existe deux matrices \(B\) et \(C\) telles que \(AB = BA = I_n\) et \(AC = CA = I_n\).

Alors : \[ B = BI_n = B(AC) = (BA)C = I_n C = C \]

Donc \(B = C\).

Proposition 2.17

Propriétés de l’inverse :

  1. Si \(A\) et \(B\) sont inversibles, alors \(AB\) est inversible et \((AB)^{-1} = B^{-1}A^{-1}\)
  2. Si \(A\) est inversible, alors \(A^{-1}\) est inversible et \((A^{-1})^{-1} = A\)
  3. Si \(A\) est inversible et \(\lambda \neq 0\), alors \(\lambda A\) est inversible et \((\lambda A)^{-1} = \frac{1}{\lambda}A^{-1}\)
  4. \(I_n\) est inversible et \(I_n^{-1} = I_n\)

Démonstration

Propriété (1) : Il suffit de vérifier que \(B^{-1}A^{-1}\) est bien l’inverse de \(AB\) : \[ (AB)(B^{-1}A^{-1}) = A(BB^{-1})A^{-1} = AI_nA^{-1} = AA^{-1} = I_n \]

Le calcul est analogue pour \((B^{-1}A^{-1})(AB) = I_n\).

Propriété (2) : Par définition, \(A^{-1}A = AA^{-1} = I_n\). C’est exactement dire que \(A\) est l’inverse de \(A^{-1}\).

Propriété (3) : On vérifie : \((\lambda A) \cdot \frac{1}{\lambda}A^{-1} = \frac{\lambda}{\lambda} AA^{-1} = I_n\).

Propriété (4) : Immédiat car \(I_n \cdot I_n = I_n\).

Remarque

L’inversion de l’ordre dans \((AB)^{-1} = B^{-1}A^{-1}\) est une source d’erreur fréquente. L’analogie qui m’aide : pour enlever ses chaussures et ses chaussettes, on enlève d’abord les chaussures (mises en dernier) puis les chaussettes (mises en premier). C’est la même logique.

Exemple 2.4.1

La matrice \(A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\) est inversible et son inverse est : \[ A^{-1} = \begin{pmatrix} -2 & 1 \\ 1{,}5 & -0{,}5 \end{pmatrix} = \frac{1}{-2} \begin{pmatrix} 4 & -2 \\ -3 & 1 \end{pmatrix} \]

Vérifions : \(AA^{-1} = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \begin{pmatrix} -2 & 1 \\ 1{,}5 & -0{,}5 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I_2\)

Calcul pratique de l’inverse

Proposition 2.18 - Méthode de Gauss-Jordan

Pour calculer l’inverse d’une matrice \(A \in \mathcal{M}_n(\mathbb{R})\), on forme la matrice augmentée \([A | I_n]\) et on effectue des opérations élémentaires sur les lignes jusqu’à obtenir \([I_n | B]\).

Alors \(B = A^{-1}\).

Si on ne peut pas obtenir \(I_n\) à gauche, alors \(A\) n’est pas inversible.

Exemple 2.4.2

Calculons l’inverse de \(A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\).

On forme : \[ [A | I_2] = \left(\begin{array}{cc|cc} 1 & 2 & 1 & 0 \\ 3 & 4 & 0 & 1 \end{array}\right) \]

Opération \(L_2 \leftarrow L_2 - 3L_1\) : \[ \left(\begin{array}{cc|cc} 1 & 2 & 1 & 0 \\ 0 & -2 & -3 & 1 \end{array}\right) \]

Opération \(L_2 \leftarrow -\frac{1}{2}L_2\) : \[ \left(\begin{array}{cc|cc} 1 & 2 & 1 & 0 \\ 0 & 1 & 1{,}5 & -0{,}5 \end{array}\right) \]

Opération \(L_1 \leftarrow L_1 - 2L_2\) : \[ \left(\begin{array}{cc|cc} 1 & 0 & -2 & 1 \\ 0 & 1 & 1{,}5 & -0{,}5 \end{array}\right) \]

Donc \(A^{-1} = \begin{pmatrix} -2 & 1 \\ 1{,}5 & -0{,}5 \end{pmatrix}\).

Exercice

Calculer l’inverse de \(A = \begin{pmatrix} 1 & 2 & 1 \\ 2 & 3 & 1 \\ 1 & 1 & 1 \end{pmatrix}\) par la méthode de Gauss-Jordan.

Proposition 2.19 - Formule d’inversion en dimension 2

Soit \(A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\) une matrice de \(\mathcal{M}_2(\mathbb{R})\) avec \(ad - bc \neq 0\). Alors \(A\) est inversible et : \[ A^{-1} = \frac{1}{ad - bc} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} \]

Démonstration

On vérifie directement : \[ \begin{pmatrix} a & b \\ c & d \end{pmatrix} \cdot \frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix} = \frac{1}{ad-bc}\begin{pmatrix} ad - bc & 0 \\ 0 & ad - bc \end{pmatrix} = I_2 \]

Remarque

Cette formule est très utile en pratique : on échange les termes diagonaux, on change le signe des termes anti-diagonaux, et on divise par \(ad - bc\). La quantité \(ad - bc\) est le déterminant de la matrice \(2 \times 2\) (on formalisera cette notion au chapitre 4).

Proposition 2.20

Une matrice triangulaire supérieure (ou inférieure) \(A\) est inversible si et seulement si tous ses coefficients diagonaux sont non nuls.

Proposition 2.21

Les opérations élémentaires sur les lignes sont réalisées par multiplication à gauche par des matrices inversibles.

Réciproquement, toute matrice inversible est un produit de matrices élémentaires.

Transposée d’une matrice

Définition 2.22 - Transposée

Soit \(A = (a_{ij}) \in \mathcal{M}_{n,p}(\mathbb{R})\). La transposée de \(A\), notée \(A^T\) ou \({}^tA\), est la matrice de \(\mathcal{M}_{p,n}(\mathbb{R})\) définie par : \[ (A^T)_{ij} = a_{ji} \]

Autrement dit, les lignes de \(A\) deviennent les colonnes de \(A^T\) et vice-versa.

Exemple 2.5.1

Si \(A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}\), alors \(A^T = \begin{pmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{pmatrix}\).

Proposition 2.23

Propriétés de la transposée :

  1. \((A^T)^T = A\)
  2. \((A + B)^T = A^T + B^T\)
  3. \((\lambda A)^T = \lambda A^T\)
  4. \((AB)^T = B^T A^T\) (Attention à l’ordre !)
  5. Si \(A\) est inversible, alors \(A^T\) est inversible et \((A^T)^{-1} = (A^{-1})^T\)

Démonstration

Les propriétés (1), (2) et (3) découlent directement de la définition : \((A^T)_{ij} = a_{ji}\).

Propriété (4) : Soient \(A \in \mathcal{M}_{n,p}(\mathbb{R})\) et \(B \in \mathcal{M}_{p,q}(\mathbb{R})\). On calcule le coefficient \((i,j)\) de chaque côté.

D’une part : \(((AB)^T)_{ij} = (AB)_{ji} = \displaystyle\sum_{k=1}^{p} a_{jk} b_{ki}\).

D’autre part : \((B^T A^T)_{ij} = \displaystyle\sum_{k=1}^{p} (B^T)_{ik} (A^T)_{kj} = \sum_{k=1}^{p} b_{ki} a_{jk}\).

Ces deux expressions sont égales, d’où \((AB)^T = B^T A^T\).

Propriété (5) : En transposant \(AA^{-1} = I_n\), on obtient \((A^{-1})^T A^T = I_n^T = I_n\). De même, en transposant \(A^{-1}A = I_n\), on obtient \(A^T (A^{-1})^T = I_n\). Donc \((A^{-1})^T\) est l’inverse de \(A^T\).

Définition 2.24 - Matrices symétriques et antisymétriques

Une matrice carrée \(A\) est dite :

  • symétrique si \(A^T = A\)
  • antisymétrique (ou anti-symétrique) si \(A^T = -A\)

Exemple 2.5.2

La matrice \(A = \begin{pmatrix} 1 & 2 \\ 2 & 3 \end{pmatrix}\) est symétrique car \(A^T = A\).

La matrice \(B = \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}\) est antisymétrique car \(B^T = -B\).

Proposition 2.25

  1. Toute matrice carrée \(A\) peut s’écrire de manière unique comme somme d’une matrice symétrique et d’une matrice antisymétrique : \[ A = \frac{A + A^T}{2} + \frac{A - A^T}{2} \]
  2. L’ensemble des matrices symétriques d’ordre \(n\) est un sous-espace vectoriel de \(\mathcal{M}_n(\mathbb{R})\) de dimension \(\frac{n(n+1)}{2}\)
  3. L’ensemble des matrices antisymétriques d’ordre \(n\) est un sous-espace vectoriel de \(\mathcal{M}_n(\mathbb{R})\) de dimension \(\frac{n(n-1)}{2}\)

Démonstration

Propriété (1) : Posons \(S = \frac{A + A^T}{2}\) et \(K = \frac{A - A^T}{2}\).

On a bien \(A = S + K\). Vérifions que \(S\) est symétrique : \[ S^T = \frac{(A + A^T)^T}{2} = \frac{A^T + A}{2} = S \]

et que \(K\) est antisymétrique : \[ K^T = \frac{(A - A^T)^T}{2} = \frac{A^T - A}{2} = -K \]

Pour l’unicité : si \(A = S_1 + K_1 = S_2 + K_2\) avec \(S_i\) symétriques et \(K_i\) antisymétriques, alors \(S_1 - S_2 = K_2 - K_1\). Le membre de gauche est symétrique, celui de droite est antisymétrique. Une matrice à la fois symétrique et antisymétrique vérifie \(M = M^T = -M\), donc \(2M = 0\), donc \(M = 0\). D’où \(S_1 = S_2\) et \(K_1 = K_2\).

Propriétés (2) et (3) : La vérification que ce sont des sous-espaces vectoriels est laissée en exercice (c’est une application directe de la définition). Pour la dimension, une matrice symétrique est déterminée par ses coefficients sur et au-dessus de la diagonale, soit \(\frac{n(n+1)}{2}\) coefficients libres. Pour une matrice antisymétrique, la diagonale est nulle et les coefficients sous la diagonale sont les opposés de ceux au-dessus, soit \(\frac{n(n-1)}{2}\) coefficients libres.

Remarque

On peut vérifier la cohérence : \(\frac{n(n+1)}{2} + \frac{n(n-1)}{2} = \frac{n^2 + n + n^2 - n}{2} = n^2 = \dim(\mathcal{M}_n(\mathbb{R}))\). C’est normal car les matrices symétriques et antisymétriques sont supplémentaires dans \(\mathcal{M}_n(\mathbb{R})\).

Exercice

Décomposer la matrice \(A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}\) en somme d’une matrice symétrique et d’une matrice antisymétrique.

Rang d’une matrice

Définition 2.26 - Rang

Le rang d’une matrice \(A \in \mathcal{M}_{n,p}(\mathbb{R})\), noté \(\text{rg}(A)\), est le nombre de lignes non nulles dans une forme échelonnée de \(A\).

Remarque

Le rang est bien défini car il ne dépend pas de la forme échelonnée choisie (même si elle n’est pas unique, le nombre de lignes non nulles l’est).

Exemple 2.6.1

Soit \(A = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 1 & 1 & 2 \end{pmatrix}\).

Forme échelonnée de \(A\) : \[ \begin{pmatrix} 1 & 2 & 3 \\ 0 & -3 & -4 \\ 0 & 0 & 0 \end{pmatrix} \]

Il y a 2 lignes non nulles, donc \(\text{rg}(A) = 2\).

Proposition 2.27

Pour toute matrice \(A \in \mathcal{M}_{n,p}(\mathbb{R})\), on a : \[ 0 \leq \text{rg}(A) \leq \min(n, p) \]

Proposition 2.28

Le rang d’une matrice est invariant par opérations élémentaires sur les lignes.

Proposition 2.29

Propriétés du rang :

  1. \(\text{rg}(A^T) = \text{rg}(A)\)
  2. \(\text{rg}(AB) \leq \min(\text{rg}(A), \text{rg}(B))\)
  3. Si \(P\) et \(Q\) sont inversibles, alors \(\text{rg}(PAQ) = \text{rg}(A)\)
  4. \(\text{rg}(A + B) \leq \text{rg}(A) + \text{rg}(B)\)

Démonstration

Propriété (3) : Puisque \(P\) est inversible, la multiplication \(A \mapsto PA\) correspond à une suite d’opérations élémentaires sur les lignes (car \(P\) est un produit de matrices élémentaires). Or les opérations élémentaires ne changent pas le rang. De même, multiplier à droite par \(Q\) correspond à des opérations élémentaires sur les colonnes, qui ne changent pas le rang non plus. Donc \(\text{rg}(PAQ) = \text{rg}(A)\).

Les autres propriétés seront plus faciles à démontrer après le chapitre 3, en interprétant le rang comme la dimension de l’image d’une application linéaire.

Proposition 2.30

Une matrice carrée \(A \in \mathcal{M}_n(\mathbb{R})\) est inversible si et seulement si \(\text{rg}(A) = n\).

Démonstration

\((\Rightarrow)\) Si \(A\) est inversible, alors par la méthode de Gauss-Jordan, on peut réduire \(A\) à \(I_n\). La matrice \(I_n\) a \(n\) lignes non nulles, donc \(\text{rg}(A) = n\).

\((\Leftarrow)\) Si \(\text{rg}(A) = n\), alors la forme échelonnée réduite de \(A\) est \(I_n\) (car il y a \(n\) pivots dans une matrice \(n \times n\), donc un pivot par ligne et par colonne). La méthode de Gauss-Jordan donne alors \(A^{-1}\).

Exercice

Calculer le rang de \(A = \begin{pmatrix} 1 & 2 & 3 & 4 \\ 2 & 4 & 6 & 8 \\ 3 & 6 & 9 & 12 \end{pmatrix}\).

Trace d’une matrice

Définition 2.31 - Trace

Soit \(A = (a_{ij}) \in \mathcal{M}_n(\mathbb{R})\) une matrice carrée. La trace de \(A\), notée \(\text{tr}(A)\), est la somme de ses coefficients diagonaux : \[ \text{tr}(A) = \sum_{i=1}^{n} a_{ii} = a_{11} + a_{22} + \cdots + a_{nn} \]

Exemple 2.7.1

Pour \(A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}\), on a \(\text{tr}(A) = 1 + 5 + 9 = 15\).

Pour la matrice identité \(I_n\), on a \(\text{tr}(I_n) = n\).

Proposition 2.32

La trace vérifie les propriétés suivantes :

  1. \(\text{tr}(A + B) = \text{tr}(A) + \text{tr}(B)\)
  2. \(\text{tr}(\lambda A) = \lambda \text{tr}(A)\)
  3. \(\text{tr}(AB) = \text{tr}(BA)\) (même si \(AB \neq BA\) !)
  4. \(\text{tr}(A^T) = \text{tr}(A)\)

Démonstration

Les propriétés (1) et (2) sont immédiates à partir de la définition.

Propriété (3) : Soient \(A \in \mathcal{M}_{n,p}(\mathbb{R})\) et \(B \in \mathcal{M}_{p,n}(\mathbb{R})\). Alors \(AB \in \mathcal{M}_n(\mathbb{R})\) et \(BA \in \mathcal{M}_p(\mathbb{R})\). On calcule : \[ \text{tr}(AB) = \sum_{i=1}^{n} (AB)_{ii} = \sum_{i=1}^{n} \sum_{j=1}^{p} a_{ij} b_{ji} \]

De même : \[ \text{tr}(BA) = \sum_{j=1}^{p} (BA)_{jj} = \sum_{j=1}^{p} \sum_{i=1}^{n} b_{ji} a_{ij} \]

Ces deux sommes sont identiques (on somme les mêmes produits \(a_{ij}b_{ji}\), juste dans un ordre différent).

Propriété (4) : Les coefficients diagonaux de \(A^T\) sont les mêmes que ceux de \(A\) (car \((A^T)_{ii} = a_{ii}\)).

Remarque

La propriété \(\text{tr}(AB) = \text{tr}(BA)\) est fondamentale. Elle implique que les matrices semblables ont la même trace : si \(B = P^{-1}AP\), alors \(\text{tr}(B) = \text{tr}(P^{-1}AP) = \text{tr}(APP^{-1}) = \text{tr}(A)\). On verra au chapitre 4 que la trace d’une matrice est aussi la somme de ses valeurs propres.

Exercice

Soient \(A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\) et \(B = \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}\). Vérifier que \(\text{tr}(AB) = \text{tr}(BA)\).

Lien avec les systèmes linéaires

Remarque

Les matrices ne sont pas qu’un objet abstrait : elles servent à écrire les systèmes d’équations linéaires de manière compacte. Le système : \[ \begin{cases} a_{11}x_1 + a_{12}x_2 + \cdots + a_{1p}x_p = b_1 \\ a_{21}x_1 + a_{22}x_2 + \cdots + a_{2p}x_p = b_2 \\ \qquad\vdots \\ a_{n1}x_1 + a_{n2}x_2 + \cdots + a_{np}x_p = b_n \end{cases} \]

s’écrit simplement \(AX = B\)\(A\) est la matrice des coefficients, \(X\) le vecteur des inconnues et \(B\) le second membre. Si \(A\) est carrée et inversible, la solution est \(X = A^{-1}B\). On retrouvera ce point de vue au chapitre 3 avec les applications linéaires, puis au chapitre 9 avec la régression multivariée où l’estimateur MCO est exactement de cette forme.

Exercice

Résoudre le système \(AX = B\) avec \(A = \begin{pmatrix} 1 & 2 & 1 \\ 2 & 3 & 1 \\ 1 & 1 & 1 \end{pmatrix}\) et \(B = \begin{pmatrix} 1 \\ 0 \\ 2 \end{pmatrix}\) en utilisant l’inverse de \(A\) calculée plus haut.