You are on page 1of 53

G a u s s Elimination:

Solving a System of Linear Equations


Course Overview
⦁ How to solve a system of linear equations
⦁ Vector Spaces
⦁ LinearTransformations
⦁ Eigenvalues and eigenvectors
⦁ Orthogonality

2 S.H.K
Solving a System of Linear Equations
⦁ What is a system of linear equations?

x + y +z =3
x – y + 2z = 2
3x – 2y – z = 0

⦁ Solution:(x, y, z) = (1, 1, 1)

3 S.H.K
Solving a System of Linear Equations
a11x1  a12 x2 ...  a1n xn  b1
a21x1  a22 x2 ...  a2n xn  b2

am1 x1  an2 x2 ...  amn xn  bm

4 S.H.K
Solving a System of Linear Equations

Coefficient Vector of
Matrix Vector of FreeTerms
mxn Unknowns
mx1
nx1
5 S.H.K
Solving a System of Linear Equations

Types of Solutions

Consistent System Inconsistent System

Unique Infinite Number NO


Solution of Solutions Solution

The system has


a solution
6 S.H.K
Solving a System of Linear Equations
⦁ Unique Solution:

7 S.H.K
Solving a System of Linear Equations
⦁ Infinite Number of Solutions:

8 S.H.K
Solving a System of Linear Equations
⦁ N O Solution (Inconsistent System):

Impossible!

9 S.H.K
Solving a System of Linear Equations
⦁ The Augmented Matrix

⦁ Elementary Row Operations:


1. Interchange two rows
2. Multiply a row by a scalar
3. Add two rows (multiply by a scalar and add
to another)
10 S.H.K
G a u s s Elimination

12 S.H.K
G a u s s Elimination
⦁ In the Gauss elimination method, we use
elementary row operations to reduce the system
to a simpler form

⦁ STEPS:
1. Forward elimination
2. Backward substitution
?
12 S.H.K
G a u s s Elimination
⦁ Simple Example: Forward Elimination
pivot
x y  2
x y 0 (1)
1 1 2
 
and add
1 1 0

13 S.H.K
G a u s s Elimination
⦁ Simple Example: Forward Elimination

x y  2 -1 -1 -2
x y 0 1 1 2
1 
 1 0 

14 S.H.K
G a u s s Elimination
⦁ Simple Example: Forward Elimination

x y  2 -1 -1 -2
x y 0 1 1 2
 
x y  2 10 -2 -20

 2y  2
1
Backward Substitution y 1
x  2  y 1
15 S.H.K
G a u s s Elimination
⦁ Example:1: x  2y  z  0
2y  8z  8
 4x  5y  9z  9
Ax  B Augmented
Matrix

 1  2 1  x   0   1 -2 1 0 
0 8  y    8   
 2      0 2 -8 8 
4 5 9   z   9 -4 5 9 -9
16 S.H.K
G a u s s Elimination
⦁ Example 1:
x  2y  z  0
2y 8z  8
 4x  5y  9z  9

pivot 1 -2 1 0
0 
 2 -8 8
-4 5 9 -9
17 S.H.K
G a u s s Elimination
⦁ Example 1:
x  2y  z  0
2y 8z  8
 4x  5y  9z  9

1 -2 1 0
row1 4  
and add  0 2 -8 8
-4 5 9 -9
18 S.H.K
G a u s s Elimination
⦁ Example 1:
x  2y  z  0
2y 8z  8
 4x  5y  9z  9

1 -2 1 0 Equivalent
(row1) 4 0  System
and add  2 -8 8

0 -3 13 -9 

19 S.H.K
G a u s s Elimination
⦁ Example:
x  2y  z  0
2y 8z  8
 4x  5y  9z  9

1 -2 1 0

 0 
2  2 -8 8
0 -3 13 -9 
20 S.H.K
G a u s s Elimination
⦁ Example:
x  2y  z  0
2y 8z  8
 4x  5y  9z  9

1 -2 1 0
 4

(row2)3  0 1 -4
0 -9 
and add
-3 13
21 S.H.K
G a u s s Elimination
⦁ Example:
x  2y  z  0
2y 8z  8
 4x  5y  9z  9

1 -2 1 0
 
(row2)3  0 1 -4 4
 End of Forward
0 3
and add

Elimination
0 1
23 S.H.K
G a u s s Elimination
⦁ Example 1:
x  2y  z  0
2y 8z  8
 4x  5y  9z  9

1 -2 1 0
0 
 1 -4 4
0 0 1 3

23 S.H.K
G a u s s Elimination
⦁ Example 1:
x  2y  z  0
2y 8z  8 Unique
 4x  5y  9z  9 Solution

1 -2 1 0 x  2y  z  0  x  29
0 
y  4z  4  y 16
 1 -4 4
0 0 1 3
 z 3 Backward
Substitution
24 S.H.K
G a u s s Elimination
⦁ The Echelon Form:
1. Leading entries move to the right
2. Elements below leading entries = 0
3. Leading entries = 1
4. Zero rows at the bottom 1 -2 1 0
0 
 1 -4 4

0 0 1 3 

25 S.H.K
G a u s s Elimination
⦁ The Echelon Form:
1. Leading entries move to the right
2. Elements below leading entries = 0
3. Leading entries = 1
4. Zero rows at the bottom

26 S.H.K
G a u s s Elimination
⦁ The Echelon Form:
1. Leading entries move to the right
2. Elements below leading entries = 0
3. Leading entries = 1
4. Zero rows at the bottom

27 S.H.K
G a u s s Elimination
⦁ The Echelon Form:
1. Leading entries move to the right
2. Elements below leading entries = 0
3. Leading entries = 1
4. Zero rows at the bottom

28 S.H.K
G a u s s Elimination
⦁ The Echelon Form:
1. Leading entries move to the right
2. Elements below leading entries = 0
3. Leading entries = 1
4. Zero rows at the bottom

29 S.H.K
G a u s s Elimination
⦁ The Echelon Form:
1. Leading entries move to the right
2. Elements below leading entries = 0
3. Leading entries = 1
4. Zero rows at the bottom

30 S.H.K
G a u s s Elimination
⦁ The Echelon Form:
1. Leading entries move to the right
2. Elements below leading entries = 0
3. Leading entries = 1
4. Zero rows at the bottom

31 S.H.K
G a u s s Elimination
x  2y  z  0
⦁ Example 2:  4x  5y  9z  9
5x  7 y  8z  9
2y  8z  8

1 -2 1 0
-4 5 9 -9 
5 -7 -8 9
(row1) 4  (row2)
(row1) 5  (row3)  0 2 -8 8
32 S.H.K
1 -2 1 0
-4 5 9 -9 
5 -7 -8 9
 0 2 -8 8
33 S.H.K
4 -8 4 0

1 -2 1 0 1 -2 1 0
-4 5 9 -9 
 0 -3 13 -9 
5 -7 -8 9  5 -7 -8 9 
0 2 -8 8  0 2 -8 8 

(row1) 4  (row2)
(row1) 5  (row3)
34 S.H.K
-5 10 -5 0

1 -2 1 0 1 -2 1 0
-4 5 9 -9 
  0 -3 13 -9 
5 -7 -8 9 5 -7 -8 9 
0 2 -8 8  0 2 -8 8 

(row1) 4  (row2)
(row1) 5  (row3)
35 S.H.K
-5 10 -5 0

1 -2 1 0 1 -2 1 0
-4 5 9 -9 
  0 -3 13 -9 
5 -7 -8 9 0 3 -13 9 
0 2 -8 8  0 2 -8 8 
(row1) 4  (row2)
(row1) 5  (row3)
36 S.H.K
-5 10 -5 0

1 -2 1 0 1 -2 1 0
-4 5 9 -9 
  0 -3 13 -9 
5 -7 -8 9 0 3 -13 9 
0 2 -8 8  0 2 -8 8 
(row1) 4  (row2)
(row1) 5  (row3)
37 S.H.K
1 -2 1 0 1 -2 1 0
0 -3 13 -9   0 -3 13 -9
0 3 -13 9  0 0 0 0
0 2 -8 8  0 2 -8 8 

1 -2 1 0
  0 -3 13 -9
0 2 -8 8
0 0 0 0

38 S.H.K
1 -2 1 0  Just to make

0 -3 13 -9 
calculations easier

0 2 -8 8 
0 0 0 0

1 -2 1 0 1 -2 1 0
  0 2 -8 8  0 1 -4 4
0 -3 13 -9 0 -3 13 -9
0 0 0 0  0 0 0 0

39 S.H.K
1 -2 1 0  1 -2 1 0
0 1 -4 4  0 1 -4 4 
0 -3 13 -9
 0 0 1 3
0 0 0 0
 0 0 0 0 
x  2y  z  0 z 3 y 16 x  29
 4x  5y  9z  9
5x  7y  8z  9
2y  8z  8
40 S.H.K
G a u s s Elimination
⦁ Example 3: x  2y  z  0
 4x  5y  9z  9
5x  7 y 8z  9

1 -2 1 0
-4 
 5 9 -9 
5 -7 -8 9
41 S.H.K
1 -2 1 0 1 -2 1 0
   0 -3 13 
-9
 -4 5 9 -9  
5 -7 -8 9  
 0 3 -13 9
1 -2 1 0 
0  Infinite
  -3 13 -9 Number of
Solutions
0 0 0 0 
42 S.H.K
1 -2 1 0
0 
 -3 13 -9
0 0 0 0
z t x  2y  z  0
 3y 13z  9 FREE
VARIA BLE x  2(3 13 t)  t
 3y  9 13t 3
13 23
y  3 t x  6 t
3 3
43 S.H.K
G a u s s Elimination
⦁ Some possible solutions:

z t z6
23 23
x  6 t For example x  6 (6)  52
3 t=6 3
13 13
y  3 t y  3  (6)  29
3 3

z0
t=0
x6
y3
44 S.H.K
G a u s s Elimination
⦁ How to write the solution in vector form:

23 13
z t x  6 t y  3 t
3 3

45 S.H.K
G a u s s Elimination
⦁ Example 4: x  2y  z  0
 4x  5y  9z  9
5x  7 y  8z 1

1 -2 1 0
-4 
 5 9 -9 
5 -7 -8 1
46 S.H.K
1 -2 1 0  1 -2 1 0
   0 -3 13 
-9
 -4 5 9 -9  
5 -7 -8 1  0 3 -13 1
1 -2 1 0 
0 -3 13 -9  NO
   S O L UT IO N
(Inconsistent System)
0 0 0 -8 0  8 ???
47 S.H.K
G a u s s Elimination
⦁ The different types of solutions:
x y z x y z x y z
1 -2 1 0 
0 1 -4 4  1 -2 1 0  1 -2 1 0
0  0 -3 13 -9
 
- 13 -9
0 0 1 3   3
  
0 0 0 0  0 0 0 -8

Unique Infinite Number NO


Solution of Solutions Solution
Unknowns = Pivots Unknowns > Pivots Pivot in Last col.of augA

48 S.H.K
Rank and Types of Solutions
⦁ The Rank of a Matrix
⦁ Definition:

(A)
⦁ What you probably know already  The size of the
largest non-zero sub-determinant

⦁ What’s new  The number of pivots in the Echelon form

We want to classify the types of solutions based on


the relation between ρ(A) and ρ(augA)

49 S.H.K
Rank and Types of Solutions

Unique Infinite Number NO


Solution of Solutions Solution
x y z x y z x y z
1 -2 1 0  1 -2 1 0 
0 1 -4 4  1 -2 1 0 
0 - 13 -9 0 -3 13 -9
 
0 0 1 3   3   
0 0 0 0  0 0 0 -8
 (A)  n  (A)  n
 (augA)   (A)
 (augA)   (A)
50 S.H.K
Rank and Types of Solutions

Types of Solutions

Consistent System Inconsistent System


 (augA)   (A)  (augA)   (A)
Unique Infinite Number NO
Solution of Solutions Solution

 (A)  n  (A)  n
n  number of unknowns
51 S.H.K
Review Questions
⦁ Which of these statements are true?
⦁ A system of four equations and three unknowns
can never have a unique solution

⦁ If the augmented matrix of a system of linear


equations has a zero row at the bottom then it has
an infinite number of solutions

⦁ A system of linear equations has no solution if the


rank of the augmented matrix is less than that of
the coefficient matrix

52 S.H.K
See you next
lecture!

53 S.H.K

You might also like