Vous êtes sur la page 1sur 9

Corrigés des exercices du chapitre 2 : Méthodes directes de

résolution de systèmes linéaires


Exercice 1 : Méthode de Gauss
Résoudre par la méthode de Gauss le système linéaire suivant :


 x1 − 3x2 − x3 = 2

− x1 + x2 + 2x4 = 3

 x2 − x 3 = 1

2x1 + x2 − x4 = 0

On fait d’abord L2 ← L1 + L2 et L4 ← L4 − 2L1 pour éliminer x1 dans les lignes 2, 3 et 4.


On obtient :


 x1 − 3x2 − x3 = 2

− 2x2 − x3 + 2x4 = 5

 x2 − x3 = 1

7x2 + 2x3 − x4 = −4
1
On fait ensuite L4 ← L4 + L2 :
2


 x1 − 3x2 − x3 = 2

 − 2x2 − x3 + 2x4 = 5
 x2 − x3 = 1

 3 3
 6x + x3 = −
2
2 2
puis L4 ← L4 − 6L3 :


 x1 − 3x2 − x3 = 2

 − 2x2 − x3 + 2x4 = 5
 x2 − x3 = 1 .

 15 15
 + x3 = −
2 2


 x3 = −1

 x2 = 1 + x3 = 0
On a alors 5 + 2x2 + x3 , soit (x1 , x2 , x3 , x4 ) = (1, 0, −1, 2) .

 x4 = =2

 2
x1 = 2 + 3x2 + x3 = 1
Exercice 2 : Décomposition LU

On pose  
−2 1 −1 1
 2 0 4 −3 
A=
 −4 −1 −12
.
9 
−2 1 1 −4

1
1) Donner la décomposition LU de la matrice A (i.e. A = LU avec L triangulaire inférieure et
U triangulaire supérieure).

t

2) En déduire la solution du système linéaire Ax = b où b = 1.5 4 −14 −6.5 .

3) Soit B = tU A tL. Sans calculs supplémentaires, donner une décomposition LU de la matrice


B.

1) Vérifions tout d’abord que, ∀ k = 1, . . . , 4, det ∆k 6= 0 :

det ∆1 = −2 6= 0 ;

−2 1
det ∆2 = = 0 − 2 = −2 6= 0 ;
2 0


−2 1 −1
0 4 2 4
det ∆3
= 2 0
4 = −2 − 1 − 1 2 0
−1 −12 −4 −12 −4 −1
−4 −1 −12
= −2(4) − 1(−24 + 16) − 1(−2) = 2 6= 0;


−2 1 −1 1
2 4 −3
2 0 4 −3

det ∆4 = det A =
= −1 −6 −13 10
−6 0 −13 10 0 2 −5
0 0 2 −5

2 4 −3

= −1 0 −1 1 = −2(5 − 2) = −6 6= 0.
0 2 −5

Maintenant, obtenons la décomposition LU par la méthode du pivot de Gauss :


→ Étape 1 :
     
-2 1 −1 1 1 0 0 0 1 0 0 0
 2 0 4 −3   1 1 0 0  
-1 1 0 0 
A=

 E1 =   L1 =  
-4 −1 −12 9  
-2 0 1 0   2 0 1 0 
-2
1 1 −4 -1
0 0 1 1 0 0 1

et  
−2 1 −1 1
 0 1 3 −2 
E1 A = 
 0

-3 −10
7 
0 0 2 −5

→Étape 2 :
   
1 0 0 0 1 0 0 0
 0 1 0 0   0 1 0 0 
E2 = 
 0
 L2 =  
3 1 0   0 −3 1 0 
0 0 0 1 0 0 0 1

2
et  
−2 1 −1 1
 0 1 3 −2 
E 2 E1 A = 
 0

0 -1 1 
0 0 2 −5

→ Étape 3 :
   
1 0 0 0 1 0 0 0
 0 1 0 0   0 1 0 0 
E3 = 
 0 0 1 L3 =  
0   0 0 1 0 
0 0 2 1 0 0 -2 1
   
−2 1 −1 1 1 0 0 0
 0 1 3 −2   −1 1 0 0 
d’où U = E3 E2 E1 A = 
 0 0 −1
 et L = L1 L2 L3 =  .
1   2 −3 1 0 
0 0 0 −3 1 0 −2 1

2) Résolvons successivement les systèmes Lx̃ = b et U x = x̃ :

→ Système Lx̃ = b :
 

 x̃1 = 1.5 
 x̃1 = 1.5
 
− x̃1 +x̃2 = 4 x̃2 = 4 + x̃1 = 5.5


 2x̃1 −3x2 +x̃3 = −14 
 x̃ = −14 − 3 + 16.5 = −0.5
  3
x̃1 −2x̃3 +x̃4 = −6.5 x̃4 = −6.5 − 1.5 − 1 = −9

→ Système U x = x̃ :
 
 −2x1 + x2 − x3 + x4 = 1.5 
 x4 = 3

 
 x3 = 0.5 + x4 = 3.5
x2 + 3x3 − 2x4 = 5.5
⇔ x2 = 5.5 + 2x4 − 3x3 = 1

 − x3 + x4 = −0.5 

 
 x = − 1 (1.5 − x + x − x ) = −0.5
− 3x4 = −9 1 2 3 4
2
3) B = tU (LU ) tL = (tU L)(U tL). U est triangulaire supérieure et L triangulaire inférieure
donc tU est triangulaire inférieure et tL triangulaire supérieure. Ainsi, tU L est triangulaire in-
férieure et U tL est triangulaire supérieure et on a bien B = L0 U 0 avec L0 = tU L et U 0 = U tL.

Exercice 3 : Décomposition LU

1) Réaliser la décomposition LU de la matrice :


 
−1 1 −3 0
 1 1 3 8 
A=  −2 2 −5 −1
.

3 1 8 13

2) En déduire la solution du système linéaire Ax = b avec b = t(0, 2, −1, 5).

3) Sans calculer A2 , résoudre le système linéaire A2 x = b.

3
1) Vérifions tout d’abord que, ∀ k = 1, . . . , 4, det ∆k 6= 0 :

det ∆1 = −1 6= 0 ;

−1 1
det ∆2 = = −1 − 1 = −2 6= 0 ;

1 1


−1 1 −3
1 3 1 1
det ∆3 = 1 1 3 = −1 − 1 1 3 −3
2 −5 −2 −5 −2 2
−2 2 −5
= −(−11) − 1 − 3 × 4 = −2 6= 0;


1 3 8 1 3 8 1 1 8


det ∆4 = det A = −1 2 −5 −1 − 1 −2 −5 −1 − 3 −2 2 −1

1 8 13 3 8 13 3 1 13
= − [−5 × 13 + 8 − 3 × (2 × 13 + 1) + 8 × (2 × 8 + 5)]
− [−5 × 13 + 8 − 3 × (−2 × 13 + 3) + 8 × (−2 × 8 + 3 × 5)]
−3 [2 × 13 + 1 − (−2 × 13 + 3) + 8 × (−2 − 3 × 2)]
= −(−57 − 81 + 168) − (−57 + 69 − 8) − 3(27 + 23 − 64)
= −30 − 4 + 3 × 14 = 8 6= 0.

Maintenant, obtenons la décomposition LU par la méthode du pivot de Gauss :

→ Étape 1 :
     
-1 1 −3 0 1 0 0 0 1 0 0 0
 1 1 3 8   1 1 0 0  
-1 1 0 0 
A=

 E1 =   L1 =  
-2 2 −5 −1  
-2 0 1 0   2 0 1 0 
3 1 8 13 3 0 0 1 -3
0 0 1

et  
−1 1 −3 0
 0 2 0 8 
E1 A = 
 0

0 1 −1 
0 4 −1 13

→ Étape 2 :
   
1 0 0 0 1 0 0 0
 0 1 0 0   0 1 0 0 
E2 = 
 0
 L2 =  
0 1 0   0
0 1 0 
-2 0
0 1 2 0
0 1
et  
−1 1 −3 0
 0 2 0 8 
E2 E1 A = 
 0

0 1 −1 
0 -1 −3
0

4
→ Étape 3 :
   
1 0 0 0 1 0 0 0
 0 1 0 0   0 1 0 0 
E3 = 
 0 0 1
 L3 =  
0   0 0 1 0 
1
0 0 1 0 0 -1 1
   
−1 1 −3 0 1 0 0 0
 0 2 0 8   −1 1 0 0 
d’où U = E3 E2 E1 A = 
 0 0 1
 et L = L1 L2 L3 = 
 
.
−1 2 0 1 0 
0 0 0 −4 −3 2 −1 1

2) Résolvons successivement les systèmes Lx̃ = b et U x = x̃ :

→ Système Lx̃ = b :
 

 x̃1 = 0 
 x̃1 =0
 
− x̃1 + x̃2 = 2 x̃2 = 2 + x̃1 = 2


 2x̃1 + x̃3 = −1 
 x̃ = −1 − 2x̃1 = −1
  3
− 3x̃1 + 2x̃2 − x̃3 + x̃4 = 5 x̃4 = 5 + 3x̃1 − 2x̃2 + x̃3 = 5 − 4 − 1 = 0

→ Système U x = x̃ :
 
 − x1 + x2 − 3x3 = 0 
 x4 = 0

 
 x3 = −1 + x4 = −1
2x2 + 8x4 = 2
⇔ 1

 x3 − x4 = −1 
 x2 = (2 − 8x4 ) = 1
 
 2
− 4x4 = 0 x1 = x2 − 3x3 = 4

3) A2 x = b ⇔ A(Ax) = b ⇔ Ax = t 4 1 −1 0 ; résolvons ce système par la méthode
utilisée à la question 2) 
→ Système Lx̃ = t 4 1 −1 0 :
 

 x̃1 = 4 
 x̃1 =4
 
− x̃1 + x̃2 = 1 x̃2 = 1 + x̃1 = 1 + 4 = 5


 2x̃1 + x̃3 = −1 
 x̃ = −1 − 2x̃1 = −1 − 8 = −9
  3
− 3x̃1 + 2x̃2 − x̃3 + x̃4 = 0 x̃4 = 3x̃1 − 2x̃2 + x̃3 = 12 − 10 − 9 = −7

→ Système U x = x̃ :

 7
 
 x4 = = 1, 75
− x1 + x2 − 3x3 = 4 
 4
 

  x3 = −9 + x4 = − 29 = −7, 25

2x2 + 8x4 = 5 4
⇔ 1 9

 x3 − x4 = −9 
 x2 = (5 − 8x4 ) = − = −4, 5
 

− 4x4 = −7 
 2 2

 x1 = 4 + x2 − 3x3 = 53 = 13, 25
4

Exercice 4 : Décomposition de Cholesky.


Donner la factorisation de Cholesky des matrices :

5
 
1 −2 0
1) A1 =  −2 8 −6 
0 −6 25
 
4 0 12 −6
 0 1 2 1 
2) A2 = 

.

12 2 49 −4
−6 1 −4 51

 
b11 0 0
1) Posons B =  b21 b22 0 . A = B tB s’écrit
b31 b32 b33
    
b11 0 0 b11 b21 b31 1 −2 0
 b21 b22 0   0 b22 b32  =  −2 8 −6 
b31 b32 b33 0 0 b33 0 −6 25

ce qui donne les relations suivantes :

b21,1 = 1 ⇒ b1,1 = 1
b1,1 × b2,1 = −2 ⇒ b2,1 = −2
b1,1 × b3,1 = 0 ⇒ b3,1 = 0
b22,1 + b22,2 = 8 ⇒ b2,2 = 2
−6 − (−2) × 0
b2,1 × b3,1 + b2,2 × b3,2 = −6 ⇒ b3,2 = = −3
√ 2 √
b23,1 + b23,2 + b23,3 = 25 ⇒ b3,3 = 25 − 9 = 16 = 4
 
1 0 0
Ainsi, B =  −2 1 0 .
0 2 4
Posons  
b1,1 0 0 0
 b2,1 b2,2 0 0 
B=
 b3,1 b3,2 b3,3 0  ;

b4,1 b4,2 b4,3 b4,4

6
ce qui donne les relations suivantes :

b21,1 = 4 ⇒ b1,1 = 2
b1,1 × b2,1 = 0 ⇒ b2,1 = 0
12
b1,1 × b3,1 = 12 ⇒ b3,1 = =6
2
−6
b1,1 × b4,1 = −6 ⇒ b4,1 = = −3
2

b22,1 + b22,2 = 1 ⇒ b2,2 = 1


2−0
b2,1 × b3,1 + b2,2 × b3,2 = 2 ⇒ b3,2 = =2
1
1−0
b2,1 × b4,1 + b2,2 × b4,2 = 1 ⇒ b4,2 = =1
1
√ √
b23,1 + b23,2 + b23,3 = 49 ⇒ b3,3 = 49 − 36 − 4 = 9=3
−4 − 6 × (−3) − 2 × 1 12
b3,1 b4,1 + b3,2 b4,2 + b3,3 b4,3 = −4 ⇒ b4,3 = = =4
3 3
√ √
b24,1 + b24,2 + b24,3 + b24,4 = 51 ⇒ b4,4 = 51 − 9 − 1 − 16 = 25 = 5
 
2 0 0 0
 0 1 0 0 
Ainsi, B = 
 6
.
2 3 0 
−3 1 4 5

Exercice 5 : Décompositon QR
Chercher la décomposition QR de la matrice
 
1 −46/5 −43/5
A= 2 8 23 
−2 −28/5 26/5
t

En déduire la solution du système Ax = 1 1 1 .

→ 1ère étape : Posons a1 = t (1, 2, −2). Alors,


√ √
• k a1 k2 = 1 + 4 + 4 = 9 = 3 et eiα1 = 11 ;

• v1 = t (−2, 2, −2) ;
 
−1
 1  (−1, 1, −1)  
−1 1/3 2/3 −2/3
• H1 = 1I3 − 2   =  2/3 1/3 2/3 .
−1 −2/3 2/3 1/3
(−1, 1, −1)  1 
−1

7
 
3 6 9
• H1 A =  0 −36/5 27/5 .
0 48/5 114/5

→ 2ème étape : Posons a2 = t (−36/5, 48/5). Alors,



1√ 3600 60
k a2 k2 = 1296 + 2304 = = = 12 et eiα2 = −1 ;
5 5 5
v2 = t (24/5,48/5) ;
1  
(1, 2)   1 0 0
2 3/5 −4/5
H̃2 = I2 − 2  = et H2 =  0 3/5 −4/5  ;
1 −4/5 −3/5
(1, 2) 0 −4/5 −3/5
2
 
3 6 9
H2 H1 A = R =  0 −12 −15  ;
0 0 −18
 
5 14 −2
1 
et Q = (H2 H1 )−1 = H1−1 H2−1 = H1 H2 = 10 −5 −10  .
15
−10 2 −11
On a les équivalences :
   
1 1
Ax =  1  ⇔ QRx =  1 
1 1
 
1
⇔ Rx = t Q  1  car Q est unitaire
1

 1

 3x1 +6x2 +9x3 = (5 + 10 − 10)

 15
1
⇔ −12x2 −15x3 = (14 − 5 + 2)

 15

 1
 −18x3 = (−2 − 10 − 11)
15
 1 23

 x3 = − (−23) =

 15 ×
 18  270

 1 11 23 181
⇔ x2 = − + =−

 12
 15 18  1080

 1 1 181 23 103

 x1 = + − =
3 3 180 30 540
 
t t 103 181 23
La solution du système Ax = (1, 1, 1) est x = , , .
540 1080 270
Exercice 6 : Calcul de déterminant et décomposition LU

1) Expliquer comment on peut calculer le déterminant d’une matrice A d’ordre n à partir de sa


factorisation LU .
 
2 1 3
2) Appliquer cette méthode à la matrice A =  −4 1 −4 .
−2 2 4

8
n
Y n
Y
1) A = LU donc det A = det L × det U avec det L = `ii = 1 et det U = uii . Ainsi,
i=1 i=1
n
Y
det A = uii .
i=1

2) Le calcul direct donne det A = 30.

    
1 0 0 1 0 0 2 1 3
E1 =  2 1 0  , L1 =  −2 1 0  et E1 A =  0 3 2 .
1 0 1 −1 0 1 0 3 7
     
1 0 0 1 0 0 2 1 3
E2 =  0 1 0  , L2 =  −0 1 0  et E2 E1 A =  0 3 2  = U.
0 −1 1 0 1 1 0 0 5
On a alors det A = det U = 2 × 3 × 5 = 30.

Vous aimerez peut-être aussi