Welcome back for a second lesson
on matrix LU decomposition.
In this video, we'll use Gaussian elimination
and a shortcut, to determine the LU decomposition.
The goal of LU decomposition, is to write a square matrix a
as the product of matrix L and matrix U.
Where matrix L is a lower triangular matrix,
and matrix U is an upper triangular matrix.
For the shortcut method, our lower triangular matrix L,
will have a main diagonal, consisting of ones,
and all elements above the main diagonal must be zero.
For the upper triangular matrix,
all the elements below the main diagonal must be zero.
Notice for the upper triangular matrix,
the main diagonal does not have to consist of ones.
In order for this decomposition to be possible,
matrix A, must be able to be reduced
to the row-echelon form,
which would be matrix U, without interchanging any rows.
Also, matrix L and matrix U are not unique.
And because we're using the shortcut method,
we're going to be using the opposites of the multipliers
used in the row operations to obtain U, to build matrix L.
So, let's take a look at an example.
We want to determine the LU decomposition
of the given, three-by-three square matrix.
So, we want to perform row operations on this matrix
to obtain a upper triangular matrix,
which means we need a zero in this position,
this position, and this position.
Let's start by obtaining a zero in this position here.
We want to add some multiple of another row, to row two,
to obtain a zero in this position here.
So we can replace row two with, two times row one,
plus row two, to obtain a zero
in this position.
Let's go ahead and do that.
First row stays the same.
Second row would be,
two times one, plus negative two, that's zero.
Two times four, plus eight, that's 16.
And two times negative three, plus five is negative one.
Third row stays the same.
Now to perform this row operation,
we say our multiplier was this positive two.
This positive two, helped us to obtain a zero
in row two, column one of this matrix.
If you look at our lower triangular matrix,
here's row-two, column-one.
This element is going to be the opposite of our multiplier.
Well, the opposite of positive two, is negative two.
This is how we're going to build
our lower triangular matrix.
We'll always use the opposite of the multiplier used,
to obtain the zero, in this specific position.
Now that we have this matrix,
let's obtain a zero in this position here.
So again, we want to add a multiple of another row
to row three, to obtain a zero here.
Let's replace row three with negative three times row one,
plus row three.
First two rows stay the same.
The third row will have negative three times one
plus three, that's zero.
Here, we have negative three times four,
that's negative twelve, plus four, that's negative eight.
And then here we would have, negative three
times negative three, that's positive nine,
plus seven, that's 16.
For this row operation, our multiplier was negative three.
Negative three, helped us obtain
a zero in row three column one.
Here's row three, column one,
of our lower triangular matrix.
The opposite of negative three is positive three.
So this element is positive three.
Now, let's obtain a zero in this position here,
which is row three, column two.
We need to add a multiple of row two, to row three,
to obtain a zero.
Well, half of 16, would be, positive eight.
So, let's replace row three with 1/2
times row two, plus row three.
Again, our multiplier is a multiple of another row
that we have to add to the given row, to obtain our zero.
So here, the first two rows stay the same.
1/2 times row two, plus row three.
1/2 times zero, plus zero, is still zero.
1/2 times 16 is eight.
Eight plus negative eight is zero.
Now here we have, 1/2 times negative one,
that's negative 1/2,
plus 16, that would be 15 and a half.
Well, let's say 15 point five.
Notice how, we now have an upper triangular matrix.
We'll call this matrix U.
And then, to complete our lower triangular matrix,
notice how our multiplier in this case,
was positive 1/2,
to obtain a zero in row three, column two,
or this position here.
The opposite of positive 1/2, is negative 1/2.
So now we have our LU decomposition.
Here's matrix L, and here's matrix U.
So we put the pieces together.
We know A equals L times U.
Here's matrix A, the given matrix.
Here's the lower triangular matrix,
and here's our upper triangular matrix.
Let's go ahead and take a look at a second example.
Let's start by obtaining a zero in this position here.
Again, we need to add a multiple of another row
to this row, to obtain a zero here.
So we're going to replace row two with negative 1/2,
times row one, plus row two.
The first row stays the same.
For the second row, negative 1/2 times two,
that's negative one plus one, that's zero.
Negative 1/2 times four is negative two,
plus negative four, that's negative six.
Negative 1/2 times negative four
is positive two plus three, that's five.
Third row stays the same.
Our multiplier is negative 1/2.
So, we're going to put a positive 1/2
in row two, column one of our lower triangular matrix,
which is here.
So this element is positive 1/2.
To obtain a zero here, let's replace row three with
three times row one, plus row three.
First two rows stay the same,
and for the third row we have,
three times two, plus negative six, that's zero.
Three times four, plus negative nine, or 12
plus negative nine is positive three.
And three times negative four
is negative 12 plus five, is negative seven.
Our multiplier is positive three,
which helped us to obtain a zero in row three, column one.
So, this position here, in the lower triangular matrix,
would be the opposite of positive three or negative three.
And then for the last step.
To obtain a zero here,
we'll need to add half of row two, to row three.
First two rows stay the same.
So, 1/2 of zero, plus zero, is zero.
1/2 of negative six, is negative three
plus positive three, that's zero.
And then we'll have 1/2 times five, that's five halves,
plus negative seven, which is negative 14 halves,
which would be negative nine halves.
So, this element here is negative nine halves.
Notice our multiplier here was positive one 1/2,
to obtain a zero in row three, column two.
So, row three, column two of our lower triangular matrix,
we'll have an element that's
the opposite of positive 1/2, or negative 1/2.
So, here's our upper triangular matrix.
And here's our lower triangular matrix,
for our LU decomposition.
So, putting the pieces together.
We know that, A, equals L times U.
So, A, is the given matrix.
L was our lower triangular matrix,
which we built using the shortcuts,
and u, was the upper triangular matrix,
which we found by performing row operations.
Okay, I hope you found this helpful.