0% found this document useful (0 votes)
34 views

Week 5

The document discusses Gaussian elimination and LU decomposition methods for solving systems of linear equations. Gaussian elimination transforms the matrix of coefficients into row echelon form using elementary row operations. LU decomposition factors the matrix as the product of a lower triangular matrix and an upper triangular matrix.

Uploaded by

Elsa Morillo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Week 5

The document discusses Gaussian elimination and LU decomposition methods for solving systems of linear equations. Gaussian elimination transforms the matrix of coefficients into row echelon form using elementary row operations. LU decomposition factors the matrix as the product of a lower triangular matrix and an upper triangular matrix.

Uploaded by

Elsa Morillo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

NUMERICAL

ANALYSIS
JOSEL L. DIZON, MAEd-Math
SOLUTIONS OF LINEAR
SYSTEMS

Week 5 & 6
Desired Learning Outcomes
• Verify the correctness of a solution;
• Produce alternative solutions and make connections
among concepts;
• Solve advanced (Olympiad level) multi-step problems
GAUSSIAN ELIMINATION
Gauss elimination method is used to solve a system of
linear equations. Let’s recall the definition of these
systems of equations. A system of linear equations is a
group of linear equations with various unknown factors.
As we know, unknown factors exist in multiple equations.
Solving a system involves finding the value for the
unknown factors to verify all the equations that make up
the system.
GAUSSIAN ELIMINATION
If there is a single solution that means one value for
each unknown factor, then we can say that the given
system is a consistent independent system. If multiple
solutions exist, the system has infinitely many solutions;
then we say that it is a consistent dependent system. If
there is no solution for unknown factors, and this will
happen if there are two or more equations that can’t be
verified simultaneously, then we say that it’s an
inconsistent system.
GAUSSIAN ELIMINATION
Name of the system of Number of solutions
equations
Consistent independent 1
system
Consistent dependent Multiple or Infinitely many
system
Inconsistent system 0
What is the Gauss Elimination Method?
• In mathematics, the Gaussian elimination method is known as
the row reduction algorithm for solving linear equations
systems. It consists of a sequence of operations performed on
the corresponding matrix of coefficients. We can also use this
method to estimate either of the following:
• The rank of the given matrix
• The determinant of a square matrix
• The inverse of an invertible matrix
What is the Gauss Elimination Method?
• To perform row reduction on a matrix, we have to complete a
sequence of elementary row operations to transform the matrix till
we get 0s (i.e., zeros) on the lower left-hand corner of the matrix as
much as possible. That means the obtained matrix should be an
upper triangular matrix. There are three types of elementary row
operations; they are:
• Swapping two rows and this can be expressed using the notation ↔,
for example, R2 ↔ R3
• Multiplying a row by a nonzero number, for example, R1 → kR2 where
k is some nonzero number
• Adding a multiple of one row to another row, for example, R2 → R2 +
3R1
What is the Gauss Elimination Method?
• The obtained matrix will be in row echelon form. The matrix is
said to be in reduced row-echelon form when all of the leading
coefficients equal 1, and every column containing a leading
coefficient has zeros elsewhere. This final form is unique; that
means it is independent of the sequence of row operations
used. We can understand this in a better way with the help of
the example given below.
Example 1
Solve the following system of equations using Gauss elimination method.
x+y+z=9
2x + 5y + 7z = 52
R2 - 2R1 → R2
2x + y – z = 0 (multiply 1 row by 2 and R2 / 3 → R2
subtract it from 2 row); (divide the 2 row by 3)
Rewrite the system in matrix form and
R3 - 2 R1 → R3 (multiply
solve it by Gaussian Elimination
(Gauss-Jordan elimination) 1 row by 2 and subtract
it from 3 row)
R2 / 3 → R2 R1 - 1 R2 → R1 R3 / -4/3 → R3
(divide the 2 row by 3) (multiply 2 row by 1 and subtract it from (divide the 3 row by -4/3)
1 row); R3 + 1 R2 → R3 (multiply 2 row
by 1 and add it to 3 row)
R1 + 2/3 R3 → R1 (multiply 3 row by 2/3 and add it to 1 row);
R3 / -4/3 → R3
R2 - 5/3 R3 → R2 (multiply 3 row by 5/3 and subtract it from 2 row)
(divide the 3 row by -4/3)

Therefore
x1 = 1, x2 = 3, x3 = 5
Checking
x1 = 1, x2 = 3, x3 = 5
x+y+z=9
2x + 5y + 7z = 52
2x + y – z = 0

1+3+5=1+3+5=9
2·1 + 5·3 + 7·5 = 2 + 15 + 35 = 52
2·1 + 3 - 5 = 2 + 3 - 5 = 0
Example 2 Solution
Let us write these equations in matrix form
• Solve the following
system of
equations:
x+y+z=2
x + 2y + 3z = 5
2x + 3y + 4z = 11
Solution Subtracting R1 from R2 to get the new Let us make another operation as
Let us write these elements of R2, i.e. R2 → R2 – R1.
equations in matrix form R3 → R3 – 2R1
Solution
Let us make another operation as Subtract R2 from R1 to get the new Now, subtract R2 from R3 to
R3 → R3 – 2R1 get the new elements of R3, i.e.
elements of R1, i.e. R1 → R1 – R2.
R3 → R3 – R2.

Here,
x – z = -1
y + 2z = 3
0=4
That means, there is no solution for the given system of equations.
LU-Decomposition
• In linear algebra, LU Decomposition, i.e., lower–
upper (LU) decomposition or factorization of a matrix, can
be defined as the product of a lower and an upper
triangular matrices. This product sometimes comprises a
permutation matrix as well. We can relate the LU
decomposition method with the matrix form of
the Gaussian elimination method of solving a system of
linear equations.
LU Decomposition Method or Factorisation
• Consider the system of These can be written in
equations in three variables: the form of AX = B as:
a11x1 + a12x2 + a13x3 = b1
a21x1 + a22x2 + a23x3 = b2
a31x1 + a32x2 + a33x3 = b3
Steps to solve system of linear equations
by LU Decomposition method.
Step 1: Generate a matrix A = LU such that L is the lower triangular
matrix with principal diagonal elements being equal to 1 and U is the
upper triangular matrix.
Steps to solve system of linear equations
by LU Decomposition method.
• Step 2: Now, we can write AX = B as:
LUX = B….(1)
• Step 3: Let us assume UX = Y….(2)
Steps to solve system of linear equations
by LU Decomposition method.
• Step 4: From equations (1) and (2), we have;
LY = B
• On solving this equation, we get y1, y2, y3.
• Step 5: Substituting Y in equation (2), we get UX = Y
By solving equation, we get X, x1, x2, x3.
The above process is also called the Method of
Triangularisation.
Example 1
Solve the system of equations using LU decomposition
method.
x1 + x2 + x3 = 1,
3x1 + x2 – 3x3 = 5
x1 – 2x2 – 5x3 = 10
Solution:
Given system of equations are:
x1 + x2 + x3 = 1
3x1 + x2 – 3x3 = 5
x1 – 2x2 – 5x3 = 10
These equations are written in the form of AX = B as:
Step 1: Let us write the above matrix as LU = A.

By expanding the left side matrices, we get;


Equating the corresponding elements, Solving these equations,
we get; we get;
u11 = 1, u12 = 1, u13 = 1 u22 = -2, u23 = -6, u33 = 3
l21u11 = 3, l21 = 3, l31 = 1, l32 = 3/2
l21u12 + u22 = 1,
l21u13 + u23 = -3
l31u11 = 1,
l31u12 + l32u22 = -2,
l31u13 + l32u23 + u33 = -5
Step 2: LUX = B
Step 3: Let UX = Y
Step 4: From the previous two steps, we have LY = B

y1 = 1
3y1 + y2 = 5
y1 + (3/2)y2 + y3 = 10
Solving these equations, we get;
y1 = 1, y2 = 2, y3 = 6
Step 5: Now, consider UX = Y.
By expanding this equation, we get;
x1 + x2 + x3 = 1
-2x2 – 6x3 = 2
3x3 = 6

Solving these equations, we can get;


x3 = 2, x2 = -7 and x1 = 6

Therefore, the solution of the given system of equations is (6, -7, 2).
Example 1
Solve the following equations by LU decomposition method.
6x1 + 18x2 + 3x3 = 3
2x1 + 12x2 + x3 = 19
4x1 + 15x2 + 3x3 = 0

Solution
LU decomposition : If we have a square matrix A, then an upper triangular matrix U can be
obtained without pivoting under Gaussian Elimination method, and there exists lower triangular
matrix L such that A=LU.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy