LESSON 2-Solving-Systems-of-Linear-Eq.-with-3-or-more-unknowns
LESSON 2-Solving-Systems-of-Linear-Eq.-with-3-or-more-unknowns
LESSON 2-Solving-Systems-of-Linear-Eq.-with-3-or-more-unknowns
Solving Systems
of Linear Eq. with
3 or more unknowns
Buaya Guirigay
Pondias Villanueva
Pescadero, A. Pescadero, J.
Lesson 2:
Solving Systems of Linear
Equations with three or more
unknowns
𝟗𝒙 − 𝟑𝒚 − 𝟐𝒛 = −𝟖 𝟒𝒙 + 𝟐𝒚 + 𝒛 = −𝟒
−𝟑𝒙 + 𝟓𝒚 − 𝟐𝐳 = 𝟏𝟐 𝟐𝒙 + 𝟒𝒚 + 𝟑𝐳 = −𝟒
𝒙 + 𝟓𝒚 + 𝟖𝒛 = −𝟏𝟐
𝒙 + 𝒚 + 𝟓𝒛 = −𝟏𝟎
Swap (interchange of rows)
𝟒 𝟔 𝟔 𝟏𝟔
𝟓 −𝟑 −𝟐 −𝟓
𝟑𝟗 𝟎 𝟔 𝟗
Swap (interchange of rows)
Equivalent Systems
𝟒 𝟔 𝟔 𝟏𝟔 𝟑𝟗 𝟎 𝟔 𝟗
𝟓 −𝟑 −𝟐 −𝟓 𝟒 𝟔 𝟔 𝟏𝟔
𝟑𝟗 𝟎 𝟔 𝟗 𝟓 −𝟑 −𝟐 −𝟓
Scale (multiply a row by a number)
𝟒 𝟔 𝟔 𝟏𝟔 ×𝟐
𝟓 −𝟑 −𝟐 −𝟓
𝟑𝟗 𝟎 𝟔 𝟗
𝟐𝑹𝟏 → 𝑹𝟏
Scale (multiply a row by a number)
𝟒 𝟔 𝟔 𝟏𝟔 𝟖 𝟏𝟐 𝟏𝟐 𝟑𝟐
𝟓 −𝟑 −𝟐 −𝟓 𝟐𝑹𝟏 → 𝑹𝟏 𝟓 −𝟑 −𝟐 −𝟓
𝟑𝟗 𝟎 𝟔 𝟗 𝟑𝟗 𝟎 𝟔 𝟗
𝟖 𝟏𝟐 𝟏𝟐 𝟑𝟐 −𝟏 𝟖 𝟏𝟐 𝟏𝟐 𝟑𝟐
𝟓 −𝟑 −𝟐 −𝟓 𝑹𝟑 → 𝑹𝟑 𝟓 −𝟑 −𝟐 −𝟓
𝟑
𝟑𝟗 𝟎 𝟔 𝟗 −𝟏𝟑 𝟎 −𝟐 −𝟑
𝟏 𝟏 𝟏 𝟏
− (𝟑𝟗) − (𝟎) − (𝟔) − (𝟗)
𝟑 𝟑 𝟑 𝟑
Scale (multiply a row by a number)
Equivalent Systems
𝟒 𝟔 𝟔 𝟏𝟔 𝟖 𝟏𝟐 𝟏𝟐 𝟑𝟐
𝟓 −𝟑 −𝟐 −𝟓 𝟓 −𝟑 −𝟐 −𝟓
𝟑𝟗 𝟎 𝟔 𝟗 −𝟏𝟑 𝟎 −𝟐 −𝟑
Pivot (add a multiple of a row to another row)
𝟔 𝟒 −𝟑 𝟐𝟕
+
𝟐 𝟒 𝟏 𝟏𝟓 × (−𝟑)
𝟐 −𝟑 −𝟏𝟖 𝟏𝟑
𝑹𝟏 − 𝟑𝑹𝟐 → 𝑹𝟏
Pivot (add a multiple of a row to another row)
𝟔 𝟒 −𝟑 𝟐𝟕 𝟎 −𝟖 −𝟔 −𝟏𝟖
𝟐 𝟒 𝟏 𝟏𝟓 𝑹𝟏 − 𝟑𝑹𝟐 → 𝑹𝟏 𝟐 𝟒 𝟏 𝟏𝟓
𝟐 −𝟑 −𝟏𝟖 𝟏𝟑 𝟐 −𝟑 −𝟏𝟖 𝟏𝟑
𝟔 𝟒 −𝟑 𝟐𝟕 𝟔 𝟒 −𝟑 𝟐𝟕
−𝟑(𝟐) −𝟑(𝟒) −𝟑(𝟏) −𝟑(𝟏𝟓) −𝟔 −𝟏𝟐 −𝟑 −𝟒𝟓
𝟎 −𝟖 −𝟔 −𝟏𝟖
Pivot (add a multiple of a row to another row)
𝟔 𝟒 −𝟑 𝟐𝟕
𝟐 𝟒 𝟏 𝟏𝟓
𝟐 −𝟑 −𝟏𝟖 𝟏𝟑
𝟎 −𝟖 −𝟔 −𝟏𝟖
𝟐 𝟒 𝟏 𝟏𝟓
𝟐 −𝟑 −𝟏𝟖 𝟏𝟑
Pivot (add a multiple of a row to another row)
Equivalent Systems
𝟔 𝟒 −𝟑 𝟐𝟕 𝟎 −𝟖 −𝟔 −𝟏𝟖
𝟐 𝟒 𝟏 𝟏𝟓 𝟐 𝟒 𝟏 𝟏𝟓
𝟐 −𝟑 −𝟏𝟖 𝟏𝟑 𝟐 −𝟑 −𝟏𝟖 𝟏𝟑
1. Interchange of two rows
𝟏 𝟐 𝟑 𝟒 𝟓 𝟓 𝟏 𝟎
𝟐 𝟏 𝟐 𝟑 𝟐 𝟏 𝟐 𝟑
𝟓 𝟓 𝟏 𝟎 𝟏 𝟐 𝟑 𝟒
2. Multiplication of a row by a non-zero number
𝟏 𝟐 𝟑 𝟒 𝟓 𝟓 𝟏 𝟎
𝟐 𝟏 𝟐 𝟑 -3 −𝟔 −𝟑 −𝟔 −𝟗
𝟓 𝟓 𝟏 𝟎 𝟏 𝟐 𝟑 𝟒
3. Addition of a multiple of one row to another row
𝟏 𝟐 𝟑 𝟒 𝟏 𝟐 𝟑 𝟒
𝟐 𝟏 𝟐 𝟑 -2 𝟐 𝟏 𝟐 𝟑
𝟓 𝟓 𝟏 𝟎 𝟕 𝟗 𝟕 𝟖
What ERO applied to the given matrix −𝟐 𝟏 −𝟏 𝟐
that will yield the ff. matrix?
Provide the notation. 𝟏 −𝟐 𝟑 𝟎
𝟑 𝟏 −𝟏 𝟐
𝟏 −𝟐 𝟑 𝟎 −𝟐 𝟏 −𝟏 𝟐
1. −𝟐 𝟏 −𝟏 𝟐 3. 𝟏 −𝟐 𝟑 𝟎
𝟑 𝟏 −𝟏 𝟐 𝟎 𝟕 −𝟏𝟎 𝟐
𝟎 −𝟑 𝟓 𝟐 −𝟐 𝟏 −𝟏 𝟐
2. 𝟏 −𝟐 𝟑 𝟎 4. 𝟏 −𝟐 𝟑 𝟎
𝟑 𝟏 −𝟏 𝟐 𝟎. 𝟕𝟓 𝟎. 𝟐𝟓 −𝟎. 𝟐𝟓 𝟎. 𝟓
Gaussian Elimination
(With Back Substitution)
PRESENTER: PETRONIO BUAYA
4
1 # # #
0 1 # #
0 0 1 #
1 # # #
0 1 # #
0 0 1 #
1 # # #
0 1 # #
0 0 1 #
4
x + y - z = 9
y + 3z = 3
-x – 2z = 2
1 1 −1 9
0 1 3 3
−1 0 −2 2
1 1 −1 9
0 1 3 3
−1 0 −2 2
𝑅1
1 1 −1 9
0 1 3 3
−1 0 −2 2
𝑅1
1 1 −1 9
0 1 3 3
−1 0 −2 2
𝑅1 𝑅3
1 1 −1 9
0 1 3 3
−1 0 −2 2
𝑅1 𝑅3 𝑅3
1 1 −1 9
0 1 3 3
𝟎 𝟏 −𝟑 𝟏𝟏
1 1 −1 9
0 1 3 3
0 1 −3 11
−1 • 𝑅2
1 1 −1 9
0 1 3 3
0 1 −3 11
−1 • 𝑅2
1 1 −1 9
0 1 3 3
0 1 −3 11
−1 • 𝑅2 𝑅3
1 1 −1 9
0 1 3 3
0 1 −3 11
−1 • 𝑅2 𝑅3 𝑅3
1 1 −1 9
0 1 3 3
𝟎 𝟎 −𝟔 𝟖
1 1 −1 9
0 1 3 3
0 0 −6 8
𝟏
−
𝟔
• 𝑅3
1 1 −1 9
0 1 3 3
0 0 −6 8
1
−
6
• 𝑅3 𝑅3
1 1 −1 9
0 1 3 3
0 0 1 − 4
3
x y z constants
1 1 −1 9
0 1 3 3
0 0 1 − 4
3
4
x + y - z = 9
y + 3z = 3
4
z = −
3
4
y + 3z = 3
4
y + 3(− ) = 3
3
y + (−4) = 3
y = 7
x + y - z = 9
x + 7-(− 3) = 9
4
x + 7 + 3 = 9
4
3•(x + 7+ 4
3 ) = (9)•3
3x + 21 + 4 = 27
3x + 25 = 27
3x = 2
x = 2
3
Therefore, the solution is:
(x, y, z) = (2/3, 7, -4/3)
Example 2
x + y + z = 3
x + 2y + 3z = 0
x + 3y + 2z = 3
1 1 1 3
1 2 3 0
1 3 2 3
1 1 1 3
1 2 3 0
1 3 2 3
𝑅2
1 1 1 3
1 2 3 0
1 3 2 3
𝑅2
1 1 1 3
1 2 3 0
1 3 2 3
𝑅2 𝑅1
1 1 1 3
1 2 3 0
1 3 2 3
𝑅2 𝑅1 𝑅2
1 1 1 3
𝟎 𝟏 𝟐 −𝟑
1 3 2 3
1 1 1 3
0 1 2 −3
1 3 2 3
𝑅3
1 1 1 3
0 1 2 −3
1 3 2 3
𝑅3 𝑅1
1 1 1 3
0 1 2 −3
1 3 2 3
𝑅3 𝑅1 𝑅3
1 1 1 3
0 1 2 −3
𝟎 𝟐 𝟏 𝟎
1 1 1 3
0 1 2 −3
0 2 1 0
2 • 𝑅2
1 1 1 3
0 1 2 −3
0 2 1 0
2 • 𝑅2 𝑅2
1 1 1 3
𝟎 𝟐 𝟒 −𝟔
0 2 1 0
1 1 1 3
0 2 4 −6
0 2 1 0
𝑅3
1 1 1 3
0 2 4 −6
0 2 1 0
𝑅3
1 1 1 3
0 2 4 −6
0 2 1 0
𝑅3 𝑅2
1 1 1 3
0 2 4 −6
0 2 1 0
𝑅3 𝑅2 𝑅3
1 1 1 3
0 2 4 −6
0 0 −3 6
x y z constants
1 1 1 3
0 2 4 −6
0 0 −3 6
4
x + y + z = 3
2y + 4z = -6
-3z = 𝟔
-3z = 6
4
-1/3(-3z)=(6)-1/3
z = -2
4
2y + 4z = -6
2y + 4(-2) = -6
2y - 8 = -6
y = 1
4
x + y + z = 3
x + 1 + (-2) = 3
x - 1 = 3
x = 4
Therefore, the solution is:
(x, y, z) = (4, 1, -2)
Your Turn!
-3x + 2y - 6z = 6
5x + 7y - 5z = 6
x + 4y - 2z = 8
GAUSS-
JORDAN
REDUCTION
METHOD
76
Hello!
I am JEANNELYN V. PONDIAS
I am here to discuss how to solve System of Linear
Equation using Gauss-Jordan Reduction Method
for the subject MATH 102 (Advance Linear
Algebra) with the code (1798) S.Y. 2021-2022 1 st
sem
77
What is GAUSS-JORDAN ELIMINATION?
➜ A matrix in row-echelon form is said to be in Gauss-Jordan
form, if all the entries above leading entries are zero.
➜ The method of Gaussian elimination with back substitution to
solve system of linear equations can be refined by, first further
reducing the augmented matrix to a Gauss-Jordan form and
work with the system corresponding to it. This method is called
Gauss-Jordan elimination method of solving linear systems.
➜ The Gauss-Jordan elimination method starts the same way that
the Gauss elimination method does, but then instead of back
substitution, the elimination continues.
➜ The Gauss-Jordan method consists of:
-Creating the augmented matrix [A|b]
-Forward elimination by applying EROs (Elementary Row Operations)
to get an upper triangular form
-Back elimination to a diagonal form that yields the solution
For a 2 × 2 system, this
method would yield
Example:
X+2y=2
-2y=2 Now, to continue
with back
elimination, we
need a 0 in the
𝒂𝟏𝟐 position
Here is an example of
a 3 × 3 system:
𝑥 + 3𝑦 = 1
2𝑥 + 𝑦 + 3𝑧 = 6 Thus,
X = -2
4𝑥 + 2𝑦 + 3𝑧 = 3
In matrix form, the -5y = -5
augmented matrix [A|b] y=1
is -3z = -9
z=3
80
“
**Once the values
are found we can
always check by
plugging back into
original equation.**
81
Let’s try another example
X - 2y + 3z = 9
- x + 3y = - 4
2x - 5y + 5z = 17
Let’s try another example Answer 82
:
X - 2y + 3z = 9
- x + 3y = - 4
2x - 5y + 5z = 17
X=1
Y=-1
Z=2
83
You try!
2X + y-z = 1
3x +2y + z = 10
2x – y + 2z = 6
84
Thanks!
Jester E. Pescadero
Suppose we have the system of equations
AX = B.
A = LU
where L is a lower triangular matrix and
U is an upper triangular matrix.
Our aim is to find L and U and once we
have done so we have found an LU
decomposition of A.
An LU decomposition of a
matrix A is the product of a
lower triangular matrix and an
upper triangular matrix that is
equal to A.
Find the LU decomposition of
1 2 4
3 8 14
2 6 13
SOLUTION:
Always remember that LU = A therefore the given matrix is assume to be A.
It turns out that we need only consider lower triangular matrices L that have 1s down
the diagonal. Thus, we have
1 0 0 𝑈11 𝑈12 𝑈13
L= 𝐿21 1 0 U= 0 𝑈22 𝑈23
𝐿31 𝐿32 1 0 0 𝑈33
Using the idea that LU = A, we have
1 0 0 𝑈11 𝑈12 𝑈13 1 2 4
𝐿21 1 0 0 𝑈22 𝑈23 = 3 8 14
𝐿31 𝐿32 1 0 0 𝑈33 2 6 13
Solving for the right side of the equation using rules of multiplying matrices, we have
𝐿31 𝑈11 = 2 𝐿31 𝑈12 + 𝐿32 𝑈22 = 6 𝐿31 𝑈13 + 𝐿32 𝑈23 + 𝑈33 = 13
𝐿31 1 = 2 (2)(2) + 𝐿32 (2) = 6 (2)(4) + (1)(2) + 𝑈33 = 13
𝐿31 = 2 2 𝐿32 = 6 − 4 𝑈33 = 13 − 8 − 2
2
𝐿32 = 𝑈33 = 3
2
𝐿32 =1
Substituting the value we just solve to each L and U matrix earlier, makes it as,
1 0 0 1 0 0
L= 𝐿21 1 0 = 3 1 0
𝐿31 𝐿32 1 2 1 1
1 2 4 1 0 0 1 2 4
3 8 14 = 3 1 0 0 2 2
2 6 13 2 1 1 0 0 3
Applying LU Decomposition in solving System of Linear Equation,
SOLUTION:
The first step is to calculate the LU decomposition of the coefficient matrix on
the left-hand side. In this case that job has already been done since this is the matrix
we considered earlier. We found that
The next step is to solve LY = B for the vector That is we consider
which can be solved by forward substitution. From the top equation we see that y1 =
3. The middle equation states that 3y1 + y2 = 13 and hence y2 = 4. Finally the bottom
line says that 2y1 + y2 + y3 = 4 from which we see that y3 = −6.
Now that we have found Y we finish the procedure by solving UX = Y for X. That is we
solve
by using back substitution. Starting with the bottom equation we see that 3x3 = −6 so
clearly x3 = −2. The middle equation implies that 2x2 + 2x3 = 4 and it follows that x2
= 4. The top equation states that x1 + 2x2 + 4x3 = 3 and consequently x1 = 3.
Therefore we have found that the solution to the system of simultaneous equations
GAUSS-SEIDEL
ELIMINATION
ALGORITHM
GAUSS-SEIDEL METHOD EXAMPLE