APPLIED NUMERICAL METHODS
Dr. Khaled Ahmida Ashouri
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
GAUSS ELIMINATION: LDU DECOMPOSITION
If matrix A is a non-singular, then A can be decomposed into LDU
decomposition (factorization):
A = LDU
Once we have LDU, Ax=b becomes LDUx=b, which must be easier to solve.
Ax LDUx LD(Ux)
LDz L(Dz)
Ly=b
Ax=b Ly=b
𝑙 ⋯ 0 𝑦 𝑏
⋮ ⋱ ⋮ ⋮ ⋮
𝑙 ⋯ 𝑙 𝑦 𝑏
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
LDU: HOW TO!
Consider the matrix:
We want to make this = zero
To introduce zero in (3,1), we subtract 3*(line1) from (line3). This is equivalent
to multiplying by the following lower triangular matrix
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
LDU: HOW TO!
Thus:
Since
Thus
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
LDU: HOW TO!
(1)
Now, L2-L1 in last matrix results in, analogously: to make equal to zero
1 0 0 1 1 1 1 1 1
1 1 0 1 2 4 0 1 3
0 0 1 0 6 24 0 6 24
Again multiply by inverse
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
LDU: HOW TO!
Substituting in (1):
Simplifying:
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
LDU: HOW TO!
(2)
Now, L3-6L2, which is equivalent to:
Make = 0
1 0 0 1 1 1 1 1 1
0 1 0 0 1 3 0 1 3
0 6 1 0 6 24 0 0 6
Again multiply by inverse
Substitute in (2)
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
LDU: HOW TO!
Thus, finally,
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
LDU: HOW TO!
Why we need LDU and not only LU?
Because LDU usually is guaranteed to be well-conditioned
Numerical Analysis Course/Academia
Pseudo algorithm Dr. Khaled M. Ahmida
LDU: ALGORITHM
This algorithm creates L, D, U
Matrix D can be modified to look
like that of last slide
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
LU: ALGORITHM
If [D] is the Identity matrix, then we can consider the system as LU
decomposition.
It also facilitates its computation in special cases.
For Ax=b LUx=b Ly=b
Then 1- solve the system Ly=b
2- solve the system Ux=y
It facilitates dense matrix computations.
Numerical Analysis Course/Academia
Dr. Khaled M. Ahmida
NUMERICAL STABILITY
How to Ensure Numerical Stability
System of equations must be well conditioned
Investigate condition number – if matrix is diagonally dominant or not
Consistent with physics
e.g. do not couple domains that are physically uncoupled or unrelated
Consistent units
e.g. do not mix known units with unknown units
If Dimensions are unknown
Normalize all unknowns consistently