Lec 3 - Solving System of Linear Equation With Voice
Lec 3 - Solving System of Linear Equation With Voice
Lec 3 - Solving System of Linear Equation With Voice
Lecture 2:
Solving system of linear equation
Gaussian Elimination.
Instructor
Dr. Safaa Amin
Linear System of Equations
• A system of m-linear equations in n
variables x1, x2, ..., xn has the general form
(1)
Matrix Representation of a
Linear System of Equations
• With
AX = B
Can be represented as
0 1 3 4 − 1 2 0 3
− 1 2 0 3 0 1 3 4
2 − 3 4 1 2 − 3 4 1
2 − 4 6 − 2
1 − 2 3 − 1
1 3 − 3 0 1 3 − 3 0
5 − 2 1 2 5 − 2 1 2
1 2 − 4 3 1 2 − 4 3
0 3 − 2 − 1 0 3 − 2 − 1
0 − 3 13 − 8
2 1 5 − 2
Use Elementary Row Operations
3 2 −5 2R1 + R2 → R2
1 −2 10
multiply row 1 by 2,
add it to row 2, and
then replace row 2
by the result
1. Write an Augmented Matrix
2. Use Elementary Row Operations
3. Row Echelon Form/Reduced Row
Echelon Form
• Row-echelon form: (1, 2, 3)
◼ Reduced row-echelon form: (1, 2, 3, 4)
1 −2 5 53 1 2 12 70
0 1 4 −8 0 1 −3 −6
0 0 1 12 0 0 0 0
Reduced row-echelon form:
The matrix is in row-echelon form with the
added condition that each row with a leading
entry of 1 has zeros above the leading 1.
Examples:
1 0 0 12.6 1 0 0 −5
0 1 0 −4 0 1 14 28
0 0 1 −3.8 0 0 0 0
• Ex 4: (Row-echelon form or reduced row-echelon form)
1 − 5 2 − 1 3 1 0 0 − 1
0 0 1 3 − 2 (row - echelon 0 1 0 2 (reduced row -
0 0 0 1 4 form) 0 0 1 3 echelon form)
0 0 0 0 1 0 0 0 0
18/39
◼ Gauss-Jordan elimination:
The procedure for reducing a matrix to a
reduced row-echelon form.
◼ Notes:
(1) Every matrix has an unique reduced row echelon form.
Produce leading 1
0 0 − 2 0 8 12 2 8 − 6 4 12 28
2 8 − 6 4 12 28 0 0 − 2 0
8 12
2 4 − 5 6 − 5 4 2 4 − 5 6 − 5 4
The first nonzero column
20/39
leading 1
( − 12 ) 1 4 − 3 2 6 14 1 4 − 3 2 6 14
r2 0 0 1 0 − 4 − 6 0 0 1 0 − 4 − 6
0 0 5 0 − 17 − 24 0 0 0 0 3 6
Zeros elements below leading 1 Submatrix
Produce leading 1
1 4 − 3 2 6 14
0 0 1 0 − 4 − 6
0 0 0 0 1 2
To complete Using Gauss-
Jordan
22
Example1: Unique Solution
• Use Gaussian elimination to solve the
system
Step 1
The augmented matrix
• The augmented matrix of the system is:
Step 2
Elementary row operations
We use elementary row operations to transform
the augmented matrix into row-reduced form
as follows,
This is a Row Echelon Form
Back
Substitution
Example2: Unique Solution
• Use Gauss elimination method to solve
the linear system of equations
• Solving the last system by
back substitution, we get the
solution
• x = 1 and y = 1
Example3: Infinite Solutions
• Use Gauss elimination method to solve
the linear system of equations
30
Writing the Resulting System
Important Note
• Since the final system has the number of
variables (4) greater than the number of
equations (3),
• Then,
Example 4 : No Solution
• Ex 5: Using elementary row
operations to solve a system
Associated
Linear System Augemented Matrix Elementary
Row Operation
x − 2 y + 3z = 9 1 −2 3 9
− 1 (1)
− x + 3y = −4 3 0 − r
412 : (1) R1 + R2 → R2
2 x − 5 y + 5 z = 17 2 − 5 5 17
1 −2 3 r913( −2) : (−2) R1 + R3 → R3
0 1 3 5
2 −5 5 17
1 −2 3 9
0 1 3 5r23(1) : (1) R2 + R3 → R3
0 −1 −1 − 1
1 − 2 3 91
0 ( ) 1 1 − 2 3 9
1 3 r3 : ( ) R3 → R3
5 2 0 1 3 5
2
0 0 2 4 0 0 1 2
System of Linear Equation cases
Special Cases: After application of the Gauss-Jordan method, linear systems
having no solution or infinite number of solutions can be recognized.
Unique Infinite
Solution Solutions
Homogeneous systems of linear equations:
x1 − x2 + 3 x3 = 0
2 x1 + x2 + 3 x3 = 0
Sol: augmented matrix
1 − 1 3 0 1 0 2 0
2 1 3 0 0 1 − 1 0
(reduced row -
leading variable :x1 , x2 echelon form)
free variable : x3
Let x3 = t
x1 = −2t , x2 = t , x3 = t , t R
When t = 0, x1 = x2 = x3 = 0 (trivial solution)
• Trivial solution: x1 = x2 = x3 = = xn = 0
◼ Nontrivial solution:
other solutions
◼ Notes:
43
GUC - Spring 2012 44