Inverser une matrice 3×3 : la méthode rapide
Plutôt que d’utiliser le pivot de Gauss pour inverser une matrice, ce qui peut être long, il existe une méthode plus directe et rapide pour les matrices de taille 3×3. Elle repose sur une formule célèbre :
L’inverse d’une matrice carrée $A$ est donné par la formule : $$ A^{-1} = \frac{1}{\det(A)} \cdot \text{com}(A)^T $$ où $\det(A)$ est le déterminant de A et $\text{com}(A)^T$ est la transposée de la comatrice de A.
Attention : Cette formule ne fonctionne que si le déterminant de A est non nul. Si $\det(A)=0$, la matrice n’est pas inversible.
Exemple 1 : Matrice inversible
Inversons la matrice A : $$ A = \begin{pmatrix} 1 & 2 & 0 \\ 2 & 1 & -1 \\ 0 & 1 & 1 \end{pmatrix} $$
Étape 1 : Calculer le déterminant
On utilise la règle de Sarrus : $$ \det(A) = (1 \cdot 1 \cdot 1) + (2 \cdot -1 \cdot 0) + (0 \cdot 2 \cdot 1) – (0 \cdot 1 \cdot 0) – (1 \cdot -1 \cdot 1) – (2 \cdot 2 \cdot 1) $$ $$ \det(A) = 1 + 0 + 0 – 0 – (-1) – 4 = -2 $$ Le déterminant est non nul, donc la matrice est bien inversible.
Étape 2 : Calculer la comatrice
La comatrice, $\text{com}(A)$, est la matrice des cofacteurs $C_{ij} = (-1)^{i+j} \det(A_{ij})$.
$$ \text{com}(A) = \begin{pmatrix} \begin{vmatrix} 1 & -1 \\ 1 & 1 \end{vmatrix} & -\begin{vmatrix} 2 & -1 \\ 0 & 1 \end{vmatrix} & \begin{vmatrix} 2 & 1 \\ 0 & 1 \end{vmatrix} \\ -\begin{vmatrix} 2 & 0 \\ 1 & 1 \end{vmatrix} & \begin{vmatrix} 1 & 0 \\ 0 & 1 \end{vmatrix} & -\begin{vmatrix} 1 & 2 \\ 0 & 1 \end{vmatrix} \\ \begin{vmatrix} 2 & 0 \\ 1 & -1 \end{vmatrix} & -\begin{vmatrix} 1 & 0 \\ 2 & -1 \end{vmatrix} & \begin{vmatrix} 1 & 2 \\ 2 & 1 \end{vmatrix} \end{pmatrix} = \begin{pmatrix} 2 & -2 & 2 \\ -2 & 1 & -1 \\ -2 & 1 & -3 \end{pmatrix} $$Étape 3 : Transposer la comatrice
$$ \text{com}(A)^T = \begin{pmatrix} 2 & -2 & -2 \\ -2 & 1 & 1 \\ 2 & -1 & -3 \end{pmatrix} $$Étape 4 : Appliquer la formule
$$ A^{-1} = \frac{1}{-2} \begin{pmatrix} 2 & -2 & -2 \\ -2 & 1 & 1 \\ 2 & -1 & -3 \end{pmatrix} = \begin{pmatrix} -1 & 1 & 1 \\ 1 & -1/2 & -1/2 \\ -1 & 1/2 & 3/2 \end{pmatrix} $$Exemple 2 : Un autre cas inversible
Soit la matrice B :
$$ B = \begin{pmatrix} 0 & 1 & 2 \\ 1 & 0 & 3 \\ 4 & -3 & 8 \end{pmatrix} $$1. Déterminant :
$$ \det(B) = (0) + (1 \cdot 3 \cdot 4) + (2 \cdot 1 \cdot -3) – (4 \cdot 0 \cdot 2) – (-3 \cdot 3 \cdot 0) – (8 \cdot 1 \cdot 1) = 12 – 6 – 8 = -2 $$2. Comatrice et transposée :
$$ \text{com}(B) = \begin{pmatrix} 9 & 4 & -3 \\ -14 & -8 & 4 \\ 3 & 2 & -1 \end{pmatrix} \quad \implies \quad \text{com}(B)^T = \begin{pmatrix} 9 & -14 & 3 \\ 4 & -8 & 2 \\ -3 & 4 & -1 \end{pmatrix} $$3. Inverse :
$$ B^{-1} = \frac{1}{-2} \begin{pmatrix} 9 & -14 & 3 \\ 4 & -8 & 2 \\ -3 & 4 & -1 \end{pmatrix} = \begin{pmatrix} -9/2 & 7 & -3/2 \\ -2 & 4 & -1 \\ 3/2 & -2 & 1/2 \end{pmatrix} $$Exemple 3 : Matrice non-inversible (singulière)
Soit la matrice C :
$$ C = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 1 & 3 & 7 \end{pmatrix} $$Calculons le déterminant :
$$ \det(C) = (1 \cdot 1 \cdot 7) + (2 \cdot 4 \cdot 1) + (3 \cdot 0 \cdot 3) – (1 \cdot 1 \cdot 3) – (3 \cdot 4 \cdot 1) – (7 \cdot 0 \cdot 2) $$ $$ \det(C) = 7 + 8 + 0 – 3 – 12 – 0 = 0 $$Comme le déterminant est nul, on ne peut pas diviser par $\det(C)$. La matrice C n’admet donc pas d’inverse. On dit qu’elle est singulière.
Cette méthode est très efficace pour les matrices 3×3. La première étape cruciale est toujours de calculer le déterminant. S’il est non nul, vous pouvez poursuivre le calcul. S’il est nul, la matrice n’est pas inversible et le calcul s’arrête là.