Professional Documents
Culture Documents
LEC5 - ENNUMA20-Gauss Elimination
LEC5 - ENNUMA20-Gauss Elimination
MATRIX
Recall: SYSTEMS OF LINEAR EQUATION
+This involves the collection of one or more linear equations that
has the same variables.
+Method of Matrices
+A matrix is a rectangular array of numbers arranged in rows
and columns.
+The size of a matrix is given by 𝑚 × 𝑛 where ‘m’ is the
number of rows and ‘n’ is the number of columns
+Each number in the matrix is called an entry or an element.
Converting Systems of Linear Equations to Matrix
1 𝑎 𝑏
0 1 𝑐
0 0 1
Gauss Elimination Example
Find the augmented matrix form of the equation and determine
the values of 𝑥, 𝑦, 𝑎𝑛𝑑 𝑧
2𝑥 − 5𝑦 + 3𝑧 = 8
ቐ 3𝑥 − 𝑦 + 4𝑧 = 7
𝑥 + 3𝑦 + 2𝑧 = −3
Gauss Elimination Example
Step 1: Determine its augmented matrix
2𝑥 − 5𝑦 + 3𝑧 = 8
ቐ 3𝑥 − 𝑦 + 4𝑧 = 7
𝑥 + 3𝑦 + 2𝑧 = −3
Gauss Elimination Example
Step 1: Determine its augmented matrix
2𝑥 − 5𝑦 + 3𝑧 = 8
ቐ 3𝑥 − 𝑦 + 4𝑧 = 7
𝑥 + 3𝑦 + 2𝑧 = −3
The augmented matrix is:
2 −5 3 8
3 −1 4 7
1 3 2 −3
Gauss Elimination Example
Step 2: Find a way so that its leading element on first row is 1
2 −5 3 8
3 −1 4 7
1 3 2 −3
Gauss Elimination Example
Step 2: Find a way so that its leading element on first row is 1
2 −5 3 8
3 −1 4 7
1 3 2 −3
For this case, Row 3 (𝑅3 ) is swapped with Row 1 (𝑅1 ).
2 −5 3 8 1 3 2 −3
3 −1 4 7 𝑅3 ↔ 𝑅1 3 −1 4 7
1 3 2 −3 2 −5 3 8
Gauss Elimination Example
Step 3: Find a way so that the leading element on row 2 is zero
and 1 on main diagonal
1 3 2 −3
3 −1 4 7
2 −5 3 8
Gauss Elimination Example
Step 3: Find a way so that the leading element on row 2 is zero
1 3 2 −3
3 −1 4 7
2 −5 3 8
Subtract the second row (𝑅2 ) by thrice the first row (𝑅1 )
1 3 2 −3 1 3 2 −3
3 −1 4 7 𝑅2 − 3𝑅1 → 𝑅2 0 −10 −2 16
2 −5 3 8 2 −5 3 8
Gauss Elimination Example
Step 4: Find a way so that the diagonal element is one
1 3 2 −3
0 −10 −2 16
2 −5 3 8
Gauss Elimination Example
Step 4: Find a way so that the diagonal element is one
1 3 2 −3
0 −10 −2 16
2 −5 3 8
Divide 𝑅2 by −10
1 3 2 −3 1 3 2 −3
𝑅2
0 −10 −2 16 → 𝑅2 0 1 0.2 −1.6
10
2 −5 3 8 2 −5 3 8
Gauss Elimination Example
Step 5: Find a way so that the first element on third row is zero
1 3 2 −3
0 1 0.2 −1.6
2 −5 3 8
Gauss Elimination Example
Step 5: Find a way so that the first element on third row is zero
1 3 2 −3
0 1 0.2 −1.6
2 −5 3 8
Subtract 𝑅3 by twice 𝑅1
1 3 2 −3 1 3 2 −3
0 1 0.2 −1.6 𝑅3 − 2𝑅1 → 𝑅3 0 1 0.2 −1.6
2 −5 3 8 0 −11 −1 14
Gauss Elimination Example
Step 6: Find way so that the second element on third row be zero
1 3 2 −3
0 1 0.2 −1.6
0 −11 −1 14
Gauss Elimination Example
Step 6: Find way so that the second element on third row be zero
1 3 2 −3
0 1 0.2 −1.6
0 −11 −1 14
Add 𝑅3 by 11 times 𝑅2
1 3 2 −3 1 3 2 −3
0 1 0.2 −1.6 𝑅3 + 11𝑅2 → 𝑅3 0 1 0.2 −1.6
0 −11 −1 14 0 0 1.2 −3.6
Gauss Elimination Example
Step 7: Find way so that the third element on third row be one
1 3 2 −3
0 1 0.2 −1.6
0 0 1.2 −3.6
Gauss Elimination Example
Step 7: Find way so that the third element on third row be one
1 3 2 −3
0 1 0.2 −1.6
0 0 1.2 −3.6
Divide 𝑅3 by 1.2
1 3 2 −3 1 3 2 −3
𝑅3
0 1 0.2 −1.6 → 𝑅3 0 1 0.2 −1.6
1.2
0 0 1.2 −3.6 0 0 1 −3
Gauss Elimination Example
Step 8: Solve the system by backward substitution
1 3 2 −3
0 1 0.2 −1.6
0 0 1 −3
Gauss Elimination Example
Step 8: Solve the system by backward substitution
1 3 2 −3
0 1 0.2 −1.6
0 0 1 −3
Think this augmented matrix as
𝑥 + 3𝑦 + 2𝑧 = −3
ቐ 𝑦 + 0.2𝑧 = −1.6
𝑧 = −3
Gauss Elimination Example
This means that the solution of the systems of linear equations is
𝑥 + 3𝑦 + 2𝑧 = −3
ቐ 𝑦 + 0.2𝑧 = −1.6
𝑧 = −3
Gauss Elimination Example
This means that the solution of the systems of linear equations is
𝑥 + 3𝑦 + 2𝑧 = −3
ቐ 𝑦 + 0.2𝑧 = −1.6
𝑧 = −3
𝑧 = −3
Gauss Elimination Example
This means that the solution of the systems of linear equations is
𝑥 + 3𝑦 + 2𝑧 = −3
ቐ 𝑦 + 0.2𝑧 = −1.6
𝑧 = −3
𝑧 = −3
Substitute z on the second row and solve for y
Gauss Elimination Example
This means that the solution of the systems of linear equations is
𝑥 + 3𝑦 + 2𝑧 = −3
ቐ 𝑦 + 0.2𝑧 = −1.6
𝑧 = −3
𝑧 = −3
Substitute z on the second row and solve for y
𝑦 + 0.2 −3 = −1.6
𝑦 = −1
Gauss Elimination Example
This means that the solution of the systems of linear equations is
𝑥 + 3𝑦 + 2𝑧 = −3
ቐ 𝑦 + 0.2𝑧 = −1.6
𝑧 = −3
𝑧 = −3
𝑦 = −1
Substitute y and z on the first row and solve for x
Gauss Elimination Example
This means that the solution of the systems of linear equations is
𝑥 + 3𝑦 + 2𝑧 = −3
ቐ 𝑦 + 0.2𝑧 = −1.6
𝑧 = −3
𝑧 = −3
𝑦 = −1
Substitute y and z on the first row and solve for x
𝑥 + 3 −1 + 2 −3 = −3
𝑥=6
Gauss Elimination Example
This means that the solution of the systems of linear equations is
𝑥 + 3𝑦 + 2𝑧 = −3
ቐ 𝑦 + 0.2𝑧 = −1.6
𝑧 = −3
𝑧 = −3
𝑦 = −1
𝑥=6