5.3. SOLVING LINEAR SYSTEMS USING AN LU FACTORIZATION 131

5.3 Solving Linear Systems Using an LU Factorization

The reason people care about the LU factorization is it allows the quick solution of systemsof equations. Here is an example.

Example 5.3.1 Suppose you want to find the solutions to

 1 2 3 2

4 3 1 1

1 2 3 0



x

y

z

w

 =

 1

2

3

 .

Of course one way is to write the augmented matrix and grind away. However, thisinvolves more row operations than the computation of an LU factorization and it turns outthat an LU factorization can give the solution quickly. Here is how. The following is an LUfactorization for the matrix. 1 2 3 2

4 3 1 1

1 2 3 0

 =

 1 0 0

4 1 0

1 0 1

 1 2 3 2

0 −5 −11 −7

0 0 0 −2

 .

Let Ux = y and consider Ly = b where in this case, b =(1, 2, 3)T. Thus 1 0 0

4 1 0

1 0 1

 y1

y2

y3

 =

 1

2

3



which yields very quickly that y =

 1

−2

2

 . Now you can find x by solving Ux = y. Thus

in this case,  1 2 3 2

0 −5 −11 −7

0 0 0 −2



x

y

z

w

 =

 1

−2

2

which yields

x =

− 3

5 + 75 t

95 − 11

5 t

t

−1

 , t ∈ R.

Work this out by hand and you will see the advantage of working only with triangularmatrices.

It may seem like a trivial thing but it is used because it cuts down on the number ofoperations involved in finding a solution to a system of equations enough that it makes adifference for large systems.