Systèmes linéaires

Introduction

Motivation

Le trafic routier

L1_1.png

But

Trouver x1,x2,,x5x_1,x_2,\ldots,x_5

Contraintes

En A:x2+x4entrant=300+x3sortantEn B:100+400=x4+x5En C:300+500=x1+x2En D:x1+x5=600\begin{alignedat}{2} &\text{En }A: \overbrace{x_2+x_4}^{\text{entrant}}&&=\overbrace{300+x_3}^{\text{sortant}}\\ &\text{En }B: 100+400&&=x_4+x_5\\ &\text{En }C: 300+500&&=x_1+x_2\\ &\text{En }D: x_1+x_5&&=600\\ \end{alignedat}

Questions

Définitions

Exemples

  1. (m=2,n=2)(m=2,n=2)

    (){x1x2=1droite α2x1+3x2=8droite β(*) \begin{cases} x_1-x_2 &= -1 &&\color{Blue}\text{droite }\alpha\\ 2x_1+3x_2 &= 8 &&\color{red}\text{droite }\beta \end{cases}
    L1_2.png
  2. (m=2,n=2)(m=2,n=2)

    (){x1x2=1droite α2x12x2=2droite β(*) \begin{cases} x_1-x_2 &= -1 &&\color{Blue}\text{droite }\alpha\\ 2x_1-2x_2 &= -2 &&\color{red}\text{droite }\beta \end{cases}
    L1_3.png
  3. (m=2,n=2)(m=2,n=2)

    (){x1x2=1droite αx1x2=0droite β(*) \begin{cases} x_1-x_2 &= -1 &&\color{Blue}\text{droite }\alpha\\ x_1-x_2 &= 0 &&\color{red}\text{droite }\beta \end{cases}
    L1_4.png
  4. (m=2,n=3)(m=2,n=3)

    (){x1+x2+x3=1plan α2x1x2=0plan β(*) \begin{cases} x_1+x_2+x_3 &= 1 &&\color{Blue}\text{plan }\alpha\\ 2x_1-x_2 &= 0 &&\color{red}\text{plan }\beta \end{cases}
    L1_5.png
  5. (m=2,n=3)(m=2,n=3)

    (){x1+x2+x3=1plan αx1+x2+x3=7plan β(*) \begin{cases} x_1+x_2+x_3 &= 1 &&\color{Blue}\text{plan }\alpha\\ x_1+x_2+x_3 &= 7 &&\color{red}\text{plan }\beta \end{cases}
    L1_6.png
  6. (m=3,n=3)(m=3,n=3)

    (){x1+x2+x3=12x1x2=0x13x3=0(*) \begin{cases} x_1+x_2+x_3 &&= 1 \\ 2x_1-x_2 &&= 0 \\ x_1-3x_3 &&= 0 \end{cases}
    unique solution !\rightarrow \text{unique solution !}

Sur le nombre de solutions d'un système linéaire

Théorème

Tout système linéaire m×nm\times n (du type ()(*) vu plus haut) possède

  1. Soit aucune solution,

  2. Soit exactement une solution,

  3. Soit une infinité de solutions.

Compatibilité et incompatibilité

Le premier cas, lorsqu'il n'y a aucune solution, les équations sont dites "incompatible". Lorsqu'il y a au moins une solution, à savoir dans les deux autres cas, les équations sont dites "compatibles"

Proposition

L1_7.png

Supposons que le système

(){a11x1+a12x2+a13x3++a1nxn=b1a21x1+a22x2+a23x3++a2nxn=b2am1x1+am2x2+am3x3++amnxn=bm(*) \begin{cases} a_{11}x_1+a_{12}x_2+a_{13}x_3+\ldots+a_{1n}x_n &= b_1 \\ a_{21}x_1+a_{22}x_2+a_{23}x_3+\ldots+a_{2n}x_n &= b_2 \\ \vdots \\ a_{m1}x_1+a_{m2}x_2+a_{m3}x_3+\ldots+a_{mn}x_n &= b_m \\ \end{cases}

possède deux solutions distinctes (c'est-à-dire qu'il existe au moins un k{1,2,,n}k\in \{ 1,2,\ldots,n \} tel que xkykx_k≠y_k), que l'on note (x1,x2,,xn)(x_1,x_2,\ldots,x_n) et (y1,y2,,yn)(y_1,y_2,\ldots,y_n).

On a donc

j=1,2,,maj1x1+aj2x2++ajnxnaj1y1+aj2y2++ajnyn\begin{aligned} \forall j=1,2,\ldots,m\\&&a_{j1}x_1+a_{j2}x_2+\ldots + a_{jn}x_n\\ &&a_{j1}y_1+a_{j2}y_2+\ldots + a_{jn}y_n \end{aligned}

Soit (z1,z2,,zn)(z_1,z_2,\ldots,z_n) définie comme suit :

k=1,2,,mzkxk+t(ykxk) ouˋ tR est fixeˊ, arbitraire.\begin{aligned} &\forall k=1,2,\ldots,m\\ &\boxed{z_k\coloneqq x_k+t(y_k-x_k)}\\ &\text{ où }t\in\R^* \text{ est fixé, arbitraire.} \end{aligned}

Notation : le signe \coloneqq signifie "est défini par".

Remarque : si t0t≠0 et t1t≠1, (z1,z2,,zn)(z_1,z_2,\ldots,z_n) est distincte de (x1,x2,,xn)(x_1,x_2,\ldots,x_n) et (y1,y2,,yn)(y_1,y_2,\ldots,y_n) !

(z1,z2,,zn)(z_1,z_2,\ldots,z_n) est aussi solution de ()(*).

Preuve

j=1,2,,m\forall j = 1,2,\ldots,m on calcule :

aj1z1α+aj2z2β++ajkzk++ajnznγ=aj1(x1+t(y1x1))α+aj2(x2+t(y2x2))β++ajn(xn+t(ynxn))γ\begin{aligned} &a_{j1}\underbrace{z_1}_{\alpha}+a_{j2}\underbrace{z_2}_{\beta}+\ldots + a_{jk}z_k+\ldots + a_{jn}\underbrace{z_n}_{\gamma}\\ =&\color{blue}{a_{j1}}\color{black}\underbrace{(\color{blue}x_1\color{black} +\color{green}\underline{\color{black}t(y_1}\color{red}\overline{\color{black}-x_1}\color{black}))}_{\alpha} +\color{blue}a_{j2}\color{black}\underbrace{(\color{blue}x_2\color{black} +\color{green}\underline{\color{black}t(y_2}\color{red}\overline{\color{black}-x_2}\color{black}))}_{\beta}+\ldots +\color{blue}a_{jn}\color{black}\underbrace{(\color{blue}x_n\color{black} +\color{green}\underline{\color{black}t(y_n}\color{red}\overline{\color{black}-x_n}\color{black}))}_{\gamma}\\ \end{aligned}

On réarange les termes pour obtenir

=(aj1x1++ajnxn)+t(aj1y1++ajnyn)t(aj1x1++ajnxn)\begin{aligned} =&\color{blue}(a_{j1}x_1+\ldots + a_{jn}x_n)\color{black} \color{green}+t(a_{j1}y_1+\ldots + a_{jn}y_n) \color{red}-t(a_{j1}x_1+\ldots+a_{jn}x_n)\\ \end{aligned}

Constat

(aj1x1++ajnxn)=bj car (x1,x2,xn) est solution.(aj1y1++ajnyn)=bj car (y1,y2,yn) est solution.(aj1x1++ajnxn)=bj.\begin{aligned} &\color{blue}(a_{j1}x_1+\ldots + a_{jn}x_n)=b_j\text{ car }(x_1,x_2,\ldots x_n) \text{ est solution.}\\ &\color{green}(a_{j1}y_1+\ldots + a_{jn}y_n)= b_j\text{ car }(y_1,y_2,\ldots y_n) \text{ est solution.}\\ &\color{red}(a_{j1}x_1+\ldots+a_{jn}x_n)=b_j. \end{aligned}
=bj+tbjtbj=bj Donc (z1,z2,,zn) est solution de ().Comme tR est arbitraire, on peut donc construire une infiniteˊ desolutions pour ().\begin{aligned} &=b_j+tb_j-tb_j\\ &=b_j\\ &\Rightarrow\text{ Donc }(z_1,z_2,\ldots,z_n)\text{ est solution de }(*). \end{aligned} \\ \begin{array}{r} \begin{aligned} &\text{Comme } t\in\R \text{ est arbitraire, on peut donc construire une infinité de} \\ &\text{solutions pour }(*). \end{aligned} \\ \square \end{array}

Notation : "\square" signifie "C.Q.F.D."

Remarque : géométriquement, voici ce que l'on a fait :

L1_8.png

Sur la méthode générale de résolution (d'un système m×nm \times n )

Soit un système m×nm \times n

(){a11x1+a12x2+a13x3++a1nxn=b1a21x1+a22x2+a23x3++a2nxn=b2am1x1+am2x2+am3x3++amnxn=bm(*) \begin{cases} a_{11}x_1+a_{12}x_2+a_{13}x_3+\ldots+a_{1n}x_n &= b_1 \\ a_{21}x_1+a_{22}x_2+a_{23}x_3+\ldots+a_{2n}x_n &= b_2 \\ \vdots \\ a_{m1}x_1+a_{m2}x_2+a_{m3}x_3+\ldots+a_{mn}x_n &= b_m \\ \end{cases}

But

Définir un algorithme qui fonctionne toujours :

{aij}+{bj}"    {0solution ?1solution ?solutions ?\text{\textquotedblleft}\{a_{ij}\} + \{b_{j}\}" \implies \begin{cases} 0 &\text{solution ?}\\ 1 &\text{solution ?}\\ \infty &\text{solutions ?} \end{cases}

Remarque

Les systèmes "triangulaires" sont très simples à résoudre (même si mm et nn sont grands). Par exemple :

{x1x2+2x3=4L1x23x3=5L25x3=10L3\begin{cases} \begin{alignedat}{2} x_1-x_2+2x_3 &=4 \qquad && L_1 \\ x_2-3x_3 &=-5 && L_2\\ 5x_3&=10 && L_3\\ \end{alignedat} \end{cases}

De L3L_3, on tire : x3x_3 = 2 \rightarrow Injecte dans L2L_2 : x2=5+3x3=1x_2 = -5 + 3x_3 = 1 \rightarrow x1=4+x22x3=1x_1 = 4+x_2-2x_3 =1. \rightarrow Unique solution : (x1,x2,x3)=(1,1,2)(x_1,x_2,x_3) = (1,1,2) .

Idée

Pour le cas général, on essaiera de se ramener à un système aussi "triangulaire que possible".

Opérations élémentaires

Définition

Deux systèmes m×nm\times n, ()(*) et ()(*)', sont dits équivalents s'ils possèdent le même ensemble de solutions.

Définiton

Un système ()~\tilde{(*)} est obtenu à partir d'un système ()(*) par une transformation élémentaire :

Proposition

Si ()(*)' est obtenu à partir de ()(*) par un suite finie de transformations élémentaires, alors ()(*)' et ()(*) sont éqivalents.

Exemple 1

(){2x13x2+5x3=8x1+x23x3=74x1+2x2+2x3=0(L1L2){x1+x23x3=72x13x2+5x3=84x1+2x2+2x3=0(L312L3){x1+x23x3=72x13x2+5x3=82x1+x2+x3=0(L2L22L1){x1+x23x3=75x2+11x3=222x1+x2+x3=0(L2L32L1){x1+x23x3=75x2+11x3=22x2+7x3=14(L2L3){x1+x23x3=7x2+7x3=145x2+11x3=22(L2L35L2)(){x1+x23x3=7x2+7x3=145x2+11x3=22\begin{array}{rcl} (*)&\begin{cases} \begin{alignedat}{2} 2x_1&-3x_2&+5x_3 &=8 \\ x_1&+x_2&-3x_3 &=-7\\ 4x_1&+2x_2&+2x_3&=0 \\ \end{alignedat} \end{cases}&\\ & & \darr (L_1 \longleftrightarrow L_2)\\ &\begin{cases} \begin{alignedat}{2} x_1&+x_2&-3x_3 &=-7 \\ 2x_1&-3x_2&+5x_3 &=8\\ 4x_1&+2x_2&+2x_3&=0 \\ \end{alignedat} \end{cases}&\\ & & \darr (L_3 \leftarrow \frac{1}{2} L_3)\\ &\begin{cases} \begin{alignedat}{2} x_1&+x_2&-3x_3 &=-7 \\ 2x_1&-3x_2&+5x_3 &=8\\ 2x_1&+x_2&+x_3&=0 \\ \end{alignedat} \end{cases}&\\ & & \darr (L_2 \leftarrow L_2 - 2L_1)\\ &\begin{cases} \begin{alignedat}{2} x_1&+x_2&-3x_3 &=-7 \\ &-5x_2&+11x_3 &=22\\ 2x_1&+x_2&+x_3&=0 \\ \end{alignedat} \end{cases}&\\ & & \darr (L_2 \leftarrow L_3 - 2L_1)\\ &\begin{cases} \begin{alignedat}{2} x_1&+x_2&-3x_3 &=-7 \\ &-5x_2&+11x_3 &=22\\ &-x_2&+7x_3&=14 \\ \end{alignedat} \end{cases}&\\ & & \darr (L_2 \longleftrightarrow L_3)\\ &\begin{cases} \begin{alignedat}{2} x_1&+x_2&-3x_3 &=-7 \\ &-x_2&+7x_3&=14 \\ &-5x_2&+11x_3 &=22\\ \end{alignedat} \end{cases}&\\ & & \darr (L_2 \leftarrow L_3-5L_2)\\ (*)'&\begin{cases} \begin{alignedat}{2} x_1&+x_2&-3x_3 &=-7 \\ &-x_2&+7x_3&=14 \\ &-5x_2&+11x_3 &=22\\ \end{alignedat} \end{cases}& \end{array}

En procédant comme avant, on trouve l'unique solution: (1,0,2)(-1,0,2)\leftarrow solution de ()(*)'. Par la propostion, c'est également la solution de ()(*).

Exemple 2

{x1+x22x3=12x1+x2+x3=4(L1L2+2L1){x1+x22x3=13x23x3=6(L1L23){x1+x22x3=1x2x3=2(L1L1+2x3)(L2L2+x3){x1+x2=1+2x3x2=2+x3\begin{array}{ll} \begin{cases} \begin{alignedat}{3} x_1&+x_2&-2x_3 &=1 \\ -2x_1&+x_2&+x_3 &=4\\ \end{alignedat} \end{cases}&\\ &\darr (L_1 \leftarrow L_2+2L_1)\\ \begin{cases} \begin{alignedat}{3} x_1&+x_2&-2x_3 &=1 \\ & 3x_2&-3x_3 &=6\\ \end{alignedat} \end{cases}&\\ &\darr (L_1 \leftarrow \frac{L_2}{3})\\ \begin{cases} \begin{alignedat}{3} x_1&+x_2&-2x_3 &=1 \\ &x_2&-x_3 &=2\\ \end{alignedat} \end{cases}&\\ &\darr \begin{array}{l} (L_1 \leftarrow L_1 + 2x_3)\\ (L_2 \leftarrow L_2 + x_3) \end{array}\\ \begin{cases} \begin{alignedat}{3} x_1&+x_2 &=1 &+2x_3 \\ &x_2&=2 &+x_3 \\ \end{alignedat} \end{cases} \end{array}

On remarque qu'on peut faire un choix : on peut choisir x3x_3 , puis résoudre un système en {}x1x_1,x2x_2, où x1x_1 et x2x_2 vont dépendre de x3x_3.

On appelle x3x_3 une variable libre (ou "paramètre").

Notation : si x3x_3 = t R\in \mathbb{R}, toute solution de ()(*) est de la forme (x1,x2,x3)(x_1,x_2,x_3), où

x1=1+tx2=2+tx3=t\boxed{\begin{aligned} x_1 & = -1 + t \\ x_2 & = 2 + t \\ x_3 & = t \end{aligned}}

Titre provisoire: Résolution sous forme matricielle

(){a11x1+a12x2+a13x3++a1nxn=b1a21x1+a22x2+a23x3++a2nxn=b2am1x1+am2x2+am3x3++amnxn=bm(*) \begin{cases} a_{11}x_1+a_{12}x_2+a_{13}x_3+\ldots+a_{1n}x_n &= b_1 \\ a_{21}x_1+a_{22}x_2+a_{23}x_3+\ldots+a_{2n}x_n &= b_2 \\ \vdots \\ a_{m1}x_1+a_{m2}x_2+a_{m3}x_3+\ldots+a_{mn}x_n &= b_m \\ \end{cases}

Matrice associée :

ji[a11a1naijam1amn]tableau m×n\begin{array}{cc} & \color{blue}j \\ \color{orange}i & \begin{bmatrix} a_{11} & \cdots & a_{1n} \\ \vdots & a_{\color{orange}i\color{blue}j} & \vdots \\ a_{m1} & \cdots & a_{mn} \end{bmatrix} \end{array} \quad\text{tableau $m \times n$}

Matrice augmentée :

[a11a1nb1am1amnbm]tableau m×(n+1)\left[\begin{array}{ccc:c} a_{11}&\cdots&a_{1n}&b_{1} \\ \vdots & &\vdots&\vdots \\ a_{m1}&\cdots&a_{mn}&b_{m} \\ \end{array}\right] \quad\text{tableau $m \times (n+1)$}

Définition (pour des matrices m×nm\times n)

  1. Le coefficient principal d'une ligne (non-nulle) est le premier coeficient aija_{ij} non-nul rencontré en partant depuis la gauche.

  2. Une matrice est échalonnée si

    • toutes les lignes nulles sont tout en bas,
    • sur chaque ligne non-nulle, le coefficient principal est strictement à droite du coefficient princpal de laligne du dessus.

Exemple

(123045067) n’est pas eˊchelonneˊe\begin{pmatrix} \color{blue}1 & 2 & 3 \\ 0 & \color{blue}4 & 5 \\ 0 & \color{blue}6 & 7 \end{pmatrix} \text{$\leftarrow$ n'est pas échelonnée}
(312070043100000)est eˊchelonneˊe\begin{pmatrix} \color{blue}3 & 1 & 2 & 0 & 7 \\ 0 & 0 & \color{blue}4 & 3 & 1 \\ 0 & 0 & 0 & 0 & 0 \\ \end{pmatrix} \text{$\leftarrow$est échelonnée}\\

Les coefficients principaux sont en bleu.

Définiton (pour une matrice m×nm \times n)

Une matrice est échelonnée réduite si elle est échelonnée, et si de plus

Exemple

(19040017001200900001020000010) est eˊchelonneˊe reˊduite\begin{pmatrix} \color{blue}1 & 9 & 0 & 4 & 0 & 0 & 17 \\ 0 & 0 & \color{blue}1 & 2 & 0 & 0 & 9 \\ 0 & 0 & 0 & 0 & \color{blue}1 & 0 & 2 \\ 0 & 0 & 0 & 0 & 0 & \color{blue}1 & 0 \end{pmatrix} \text{$\leftarrow$ est échelonnée réduite}

Théorème

Exemples 1

(){3x13x22x3=14x1x2+3x3=1x1+2x2+2x3=3(matrice augmenteˊe)M=[332141311223](comme avant)[1223095130033]C’est une version eˊchelonneˊe.L3L33[1223095130011]L2L2+5L3[1223090180011]L2L29[122301020011]L1L12L3[120501020011]L1L12L2[100101020011]C’est la reˊduite de ML1L12L2(){x1=1x2=2x3=1\begin{array}{rll} (*)&\begin{cases} \begin{alignedat}{2} 3x_1&-3x_2&-2x_3 &=-1 \\ 4x_1&-x_2&+3x_3 &=-1\\ x_1&+2x_2&+2x_3&=3 \\ \end{alignedat} \end{cases}&\\ & &\downarrow \text {(matrice augmentée)}\\ M = & \left[\begin{array}{rrr:r} 3 &-3 &-2 &-1 \\ 4 &-1 & 3 &-1 \\ 1 & 2 & 2 & 3 \\ \end{array}\right]&\\ & & \downarrow \text{(comme avant)}\\ & \left[\begin{array}{rrr:r} 1 & 2 & 2 &3 \\ 0 &-9 &-5 &-13 \\ 0 & 0 & -3 & 3 \\ \end{array}\right] &\text{C'est \textbf{une} version échelonnée.}\\ & & \downarrow L_3 \leftarrow \frac{L_3}{-3}\\ & \left[\begin{array}{rrr:r} 1 & 2 & 2 &3 \\ 0 &-9 &-5 &-13 \\ 0 & 0 & 1 & -1 \\ \end{array}\right] &\\ & & \downarrow L_2 \leftarrow L_2 + 5L_3\\ & \left[\begin{array}{rrr:r} 1 & 2 & 2 &3 \\ 0 &-9 & 0 &-18 \\ 0 & 0 & 1 & -1 \\ \end{array}\right] &\\ & & \downarrow L_2 \leftarrow \frac{L_2}{-9}\\ & \left[\begin{array}{rrr:r} 1 & 2 & 2 & 3 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & -1 \\ \end{array}\right] &\\ & & \downarrow L_1 \leftarrow L_1-2L_3\\ & \left[\begin{array}{rrr:r} 1 & 2 & 0 & 5 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & -1 \\ \end{array}\right] &\\ & & \downarrow L_1 \leftarrow L_1-2L_2\\ & \left[\begin{array}{rrr:r} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & -1 \\ \end{array}\right] & \text{C'est \textbf{la} réduite de M}\\ & & \downarrow L_1 \leftarrow L_1-2L_2\\ (*)'&\begin{cases} \begin{alignedat}{3} x_1& & &=1 \\ &x_2& &=2\\ & &x_3&=-1 \\ \end{alignedat} \end{cases}& \end{array}

Exemple 2

(){x1+x2=52x1+2x2=11(matrice augmenteˊe)[1152211](reˊduction)[115001](systeˋme d’eˊquations)(){x1+x2=50x1+0x2=1\begin{array}{rll} (*)&\begin{cases} \begin{alignedat}{2} x_1&+x_2 &= 5 \\ 2x_1&+2x_2 &= 11 \\ \end{alignedat} \end{cases}&\\ & &\downarrow \text {(matrice augmentée)}\\ & \left[\begin{array}{cc:c} 1 & 1 & 5 \\ 2 & 2 & 11 \\ \end{array}\right]&\\ & &\downarrow \text {(réduction)}\\ & \left[\begin{array}{cc:c} 1 & 1 & 5 \\ 0 & 0 & 1 \\ \end{array}\right]&\\ & &\downarrow \text {(système d'équations)}\\ (*)&\begin{cases} \begin{alignedat}{2} x_1&+x_2 &= 5 \\ 0x_1&+0x_2 &= 1 \\ \end{alignedat} \end{cases}&\\ \end{array}

()(*)' n'as pas de solution, donc ()(*) n'en a pas non plus.

Exemple 3

[03664537858939129615](reˊduction aˋ faire en exercice)[1023024012207000014](systeˋme d’eˊquaitons){x1x3+3x4=24x22x3+2x4=7x5=4{x1=24+x33x4x2=7+2x32x4x5=4\begin{array}{ll} \left[\begin{array}{rrrrr:r} 0 & 3 & -6 & 6 & 4 &-5 \\ 3 & -7 & 8 & -5 & 8 & 9 \\ 3 & -9 & 12 & -9 & 6 &15 \\ \end{array}\right]&\\ &\downarrow \text {(réduction à faire en exercice)}\\ \left[\begin{array}{rrrrr:r} 1 & 0 & -2 & 3 & 0 &-24 \\ 0 & 1 & -2 & 2 & 0 & -7 \\ 0 & 0 & 0 & 0 & 1 &4 \\ \end{array}\right]&\\ &\downarrow \text {(système d'équaitons)}\\ \begin{cases} \begin{alignedat}{5} x_1& &-x_3 &+3x_4 & &= -24 \\ & x_2 &-2x_3 &+2x_4 & &= -7 \\ & & & & x_5 & = 4 \end{alignedat} \end{cases}&\\ &\downarrow \text {}\\ \begin{cases} \begin{alignedat}{3} x_1&= -24 &+x_3 &-3x_4\\ x_2 &= -7 & +2x_3 &-2x_4 \\ x_5 & = 4 \end{alignedat} \end{cases}& \end{array}

    x3,x4\implies x_3, x_4 sont libres et les autres sont liéesx3x_3 et x4x_4)