Module for PA = LU Factorization with Pivoting
Check out the new Numerical Analysis Projects page.
LU Factorization
with NO
pivoting To
construct the
factorization
of the non-singular matrix
.
Remark 1. This is not
a linear system.
Remark 2. The easy way
uses row vectors and is a modification the code for limited Gauss
Jordan elimination.
Mathematica
Subroutine (Limited Gauss-Jordan
Elimination).
Mathematica Subroutine (LandU).
![[Graphics:Images/LUfactorMod_gr_4.gif]](Images/LUfactorMod_gr_4.gif)
Example 1.
Given
. Find
matrices L and U so that LU =
A.
Solution
1.
Example 2.
Given
. Find
matrices L and U so that LU =
A.
Solution
2.
A =
LU; Factorization with NO
pivoting (a.k.a. LU
Decomposition) To
construct the solution to the linear
system
,
assuming that
. The
solution
is
found in three steps:
1. Construct
the matrices
,
if possible.
2. Solve
for
using
forward substitution.
3. Solve
for
using
back substitution.
PA =
LU; Factorization with Pivoting To
construct the solution to the linear
system
,
where
is
a nonsingular matrix.
The
solution
is
found in four steps:
1. Construct
the matrices
.
2. Compute
the column vector
.
3. Solve
for
using
forward substitution.
4. Solve
for
using
back substitution.
Remark. The
matrix A is a global variable and
elements are changed when the LUfactor subroutine
is executed. Hence, it is important to save a copy
of A in the
variable A0.
Use one of the following two versions of
the LUfactor subroutine
and the SolveLU subroutine. The
first version of LUfactor uses
parallel programming and "row operations" instead of
loops.
Mathematica Subroutine (LUfactor).
![[Graphics:Images/LUfactorMod_gr_45.gif]](Images/LUfactorMod_gr_45.gif)
This is the second version of LUfactor and it uses more loops and traditional programming.
Mathematica Subroutine (LUfactor).
![[Graphics:Images/LUfactorMod_gr_46.gif]](Images/LUfactorMod_gr_46.gif)
Use the subroutine SolveLU which is similar to the forward substitution and back substitution subroutines.
Mathematica Subroutine (SolveLU).
![[Graphics:Images/LUfactorMod_gr_47.gif]](Images/LUfactorMod_gr_47.gif)
Remark. Everything
has been carefully set up so
that L, U,
and P can all be studied.
Example 3. Use PA = LU factorization with pivoting to solve the linear system AX = B, where
and
.
Solution
3.
Example 4. Use PA = LU factorization with pivoting to solve the linear system AX = B, where
and
.
Solution
4.
Old Lab Project (LU
Factorization LU
Factorization).
Internet hyperlinks to an old lab project.
Research Experience for Undergraduates
LU
Factorization LU
Factorization
Internet hyperlinks to web sites and a bibliography of
articles.
Downloads (LU
Factorization LU
Factorization).
Download this Mathematica notebook.
(c) John H. Mathews 2003