Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

3.2: LU Decomposition

( \newcommand{\kernel}{\mathrm{null}\,}\)

The process of Gaussian Elimination also results in the factoring of the matrix A to

A=LU,

where L is a lower triangular matrix and U is an upper triangular matrix. Using the same matrix A as in the last section, we show how this factorization is realized. We have

(321667344)(321025023)=M1 A

where

M1 A=(100210101)(321667344)=(321025023)

Note that the matrix M1 performs row elimination on the first column. Two times the first row is added to the second row and one times the first row is added to the third row. The entries of the column of M1 come from 2=(6/3) and 1=(3/3) as required for row elimination. The number 3 is called the pivot.

The next step is

(321025023)(321025002)=M2(M1 A)

where

M2(M1 A)=(100010011)(321025023)=(321025002)

Here, M2 multiplies the second row by 1=(2/2) and adds it to the third row. The pivot is 2.

We now have

M2M1 A=U

or

A=M11M12U

The inverse matrices are easy to find. The matrix M1 multiples the first row by 2 and adds it to the second row, and multiplies the first row by 1 and adds it to the third row. To invert these operations, we need to multiply the first row by 2 and add it to the second row, and multiply the first row by 1 and add it to the third row. To check, with

M1M11=I

we have

(100210101)(100210101)=(100010001)

Similarly,

M12=(100010011)

Therefore,

L=M11M12

is given by

L=(100210101)(100010011)=(100210111)

which is lower triangular. The off-diagonal elements of M11 and M12 are simply combined to form L. Our LU decomposition is therefore

(321667344)=(100210111)(321025002).

Another nice feature of the LU decomposition is that it can be done by overwriting A, therefore saving memory if the matrix A is very large.

The LU decomposition is useful when one needs to solve Ax=b for x when A is fixed and there are many different b’s. First one determines L and U using Gaussian elimination. Then one writes

(LU)x=L(Ux)=b.

We let

y=Ux

and first solve

Ly=b

for y by forward substitution. We then solve

Ux=y

for x by backward substitution. When we count operations, we will see that solving (LU)x=b is significantly faster once L and U are in hand than solving Ax=b directly by Gaussian elimination.

We now illustrate the solution of LUx=b using our previous example, where

L=(100210111),U=(321025002),b=(176)

With y=Ux, we first solve Ly=b, that is

(100210111)(y1y2y3)=(176)

Using forward substitution

y1=1y2=7+2y1=9y3=6+y1y2=2

We now solve Ux=y, that is

(321025002)(x1x2x3)=(192)

Using backward substitution,

2x3=2x3=12x2=95x3=4x2=23x1=12x2+x3=6x1=2

and we have once again determined

(x1x2x3)=(221)


This page titled 3.2: LU Decomposition is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Jeffrey R. Chasnov via source content that was edited to the style and standards of the LibreTexts platform.

  • Was this article helpful?

Support Center

How can we help?