WEBVTT
00:00:05.965 --> 00:00:06.590
BEN HARRIS: Hi.
00:00:06.590 --> 00:00:08.220
I'm Ben.
00:00:08.220 --> 00:00:12.440
Today we are going to do an
LU decomposition problem.
00:00:12.440 --> 00:00:14.900
Here's the problem right here.
00:00:14.900 --> 00:00:18.830
Find that LU decomposition
of this matrix A.
00:00:18.830 --> 00:00:22.020
Now notice that this matrix
A has variables, as well
00:00:22.020 --> 00:00:23.180
as numbers.
00:00:23.180 --> 00:00:28.612
So the sentence
ends: when it exists.
00:00:28.612 --> 00:00:30.070
And the second part
of the question
00:00:30.070 --> 00:00:33.510
asks you: for which
real numbers a and b
00:00:33.510 --> 00:00:38.240
does the LU decomposition of
this matrix actually exist?
00:00:38.240 --> 00:00:43.650
Now, you can hit pause now and
I'll give you a few seconds.
00:00:43.650 --> 00:00:45.940
You can try to solve
this on your own,
00:00:45.940 --> 00:00:48.245
and then we'll be back
and we can do it together.
00:00:58.320 --> 00:01:00.740
And we're back.
00:01:00.740 --> 00:01:04.480
Now, what do you have to
remember when doing an LU
00:01:04.480 --> 00:01:07.760
decomposition problem?
00:01:07.760 --> 00:01:11.310
Well, we do elimination
in the same way
00:01:11.310 --> 00:01:18.830
that we did before in order to
find U. But with this question
00:01:18.830 --> 00:01:20.940
we need to find L as well.
00:01:20.940 --> 00:01:23.100
So we need to do
elimination, but we also
00:01:23.100 --> 00:01:25.540
need to keep track of
the elimination matrices
00:01:25.540 --> 00:01:27.440
along the way.
00:01:27.440 --> 00:01:28.150
Good.
00:01:28.150 --> 00:01:30.350
So let's do that.
00:01:30.350 --> 00:01:32.780
So let me put my matrix up here.
00:01:42.090 --> 00:01:44.320
And we want to do elimination.
00:01:44.320 --> 00:01:47.719
So which entry do
we eliminate first?
00:01:47.719 --> 00:01:48.260
That's right.
00:01:48.260 --> 00:01:52.320
It's this (2, 1) entry.
00:01:52.320 --> 00:01:55.890
So we replace the second
row by the second row
00:01:55.890 --> 00:02:00.240
minus a times the first
row, and we get this.
00:02:09.810 --> 00:02:12.000
But we're not just
doing elimination,
00:02:12.000 --> 00:02:14.180
we're finding an
LU decomposition.
00:02:14.180 --> 00:02:16.800
So we need to keep
track of the matrix
00:02:16.800 --> 00:02:20.880
that I multiplied the
elimination matrix, that I
00:02:20.880 --> 00:02:24.980
multiplied this matrix A by on
the left to get this matrix.
00:02:24.980 --> 00:02:26.800
So what is that?
00:02:26.800 --> 00:02:28.950
That's this E_(2,1).
00:02:28.950 --> 00:02:33.720
Since I eliminated the (2, 1)
entry, I'll call it E_(2,1).
00:02:33.720 --> 00:02:37.280
And it's this matrix.
00:02:37.280 --> 00:02:38.840
Why is it this matrix?
00:02:38.840 --> 00:02:41.970
Well, remember how
multiplication on the left
00:02:41.970 --> 00:02:43.000
works.
00:02:43.000 --> 00:02:47.190
I replaced the first row
by just the first row.
00:02:47.190 --> 00:02:50.270
I replaced the second
row by the second row
00:02:50.270 --> 00:02:53.110
minus a times the first row.
00:02:53.110 --> 00:02:55.440
So you can just read
off from these rows
00:02:55.440 --> 00:02:59.010
which operations I did.
00:02:59.010 --> 00:03:01.620
Now, which entries
should we eliminate next?
00:03:01.620 --> 00:03:03.750
We need to eliminate this b.
00:03:03.750 --> 00:03:09.090
So we will replace the
third row by the third row
00:03:09.090 --> 00:03:11.500
minus b times the first row.
00:03:18.680 --> 00:03:20.945
And which elimination
matrix did we use?
00:03:28.330 --> 00:03:31.620
Well, note, we
replaced the third row
00:03:31.620 --> 00:03:34.950
by the third row minus
b times the first row.
00:03:34.950 --> 00:03:37.350
That's exactly what you should
read off this elimination
00:03:37.350 --> 00:03:39.470
matrix.
00:03:39.470 --> 00:03:40.400
Good.
00:03:40.400 --> 00:03:43.220
Now, we only have one step left.
00:03:43.220 --> 00:03:45.550
We only need to
eliminate one last entry.
00:03:45.550 --> 00:03:50.960
But this one's a little
tricky, so let's be careful.
00:03:50.960 --> 00:03:55.730
In order to eliminate this
b, we need a to be a pivot.
00:03:55.730 --> 00:03:59.670
In particular, we
need a to be nonzero.
00:03:59.670 --> 00:04:01.330
If a were zero
here, then we would
00:04:01.330 --> 00:04:03.610
have to do a row exchange.
00:04:03.610 --> 00:04:05.220
And that's no good.
00:04:05.220 --> 00:04:07.540
You can't find an
LU decomposition
00:04:07.540 --> 00:04:11.100
if you have to do a row
exchange in elimination.
00:04:11.100 --> 00:04:18.579
So we need to assume
that a is non-zero
00:04:18.579 --> 00:04:22.470
in order to keep going.
00:04:22.470 --> 00:04:26.070
So let's just assume
there that a is non-zero.
00:04:26.070 --> 00:04:28.960
Now, what do we do?
00:04:28.960 --> 00:04:31.600
Well we can replace
the third row
00:04:31.600 --> 00:04:38.040
by the third row minus b
over a times the second row.
00:04:38.040 --> 00:04:43.600
And we just get this.
00:04:43.600 --> 00:04:46.020
a minus b.
00:04:46.020 --> 00:04:49.130
And let's write down
our elimination matrix.
00:04:49.130 --> 00:04:52.980
E_(3,2) now.
00:04:59.340 --> 00:05:00.910
There's our elimination matrix.
00:05:00.910 --> 00:05:04.180
We replaced the third row
by the third row minus b
00:05:04.180 --> 00:05:06.191
over a times the second row.
00:05:06.191 --> 00:05:06.690
Good.
00:05:10.630 --> 00:05:13.130
So we found our U matrix.
00:05:13.130 --> 00:05:16.000
That's what elimination does,
it gives us our U matrix.
00:05:16.000 --> 00:05:17.210
So let me write it up here.
00:05:20.300 --> 00:05:28.050
1, 0, 1; 0, a, 0;
0, 0, a minus b.
00:05:35.130 --> 00:05:37.140
Good.
00:05:37.140 --> 00:05:38.825
Now we have to
find our L matrix,
00:05:38.825 --> 00:05:41.330
and we need to use these
elimination matrices
00:05:41.330 --> 00:05:46.440
that we've been recording along
the way in order to do that.
00:05:46.440 --> 00:05:53.580
So remember that we started
with A, and we got U.
00:05:53.580 --> 00:05:54.660
And how did we do that?
00:05:54.660 --> 00:05:58.270
Well we multiplied on the left
by all of these elimination
00:05:58.270 --> 00:06:05.770
matrices, E_(2,1),
E_(3,1) and E_(3,2).
00:06:05.770 --> 00:06:08.870
Sorry if that's
scrunching together there.
00:06:08.870 --> 00:06:11.200
Now, if we move these
elimination matrices
00:06:11.200 --> 00:06:17.220
to the other side then we'll
get L. So what do we have?
00:06:17.220 --> 00:06:26.180
We have A equals E_(2,1)
inverse, E_(3,1) inverse,
00:06:26.180 --> 00:06:33.770
E_(3,2) inverse times
U. And this is our L,
00:06:33.770 --> 00:06:37.570
this product of
these three matrices.
00:06:37.570 --> 00:06:38.430
Good.
00:06:38.430 --> 00:06:40.610
So let's compute it now.
00:06:43.190 --> 00:06:45.170
So L is the product
of three matrices.
00:06:45.170 --> 00:06:49.340
I need to get them by going
back and looking at these three
00:06:49.340 --> 00:06:52.110
elimination matrices and
taking their inverses.
00:06:52.110 --> 00:06:54.860
Well the nice thing
about taking an inverse
00:06:54.860 --> 00:06:58.080
of an elementary
matrix like this is we
00:06:58.080 --> 00:07:02.150
just make a minus a
plus or a plus a minus.
00:07:02.150 --> 00:07:06.470
So that's easy enough.
00:07:06.470 --> 00:07:08.480
We just change the
off-diagonal entries,
00:07:08.480 --> 00:07:09.605
we just change their signs.
00:07:12.860 --> 00:07:17.232
You can check that that
does what we wanted it to.
00:07:17.232 --> 00:07:20.450
It gives us the inverse.
00:07:20.450 --> 00:07:21.720
Good.
00:07:21.720 --> 00:07:24.410
And the last comment is
that multiplying these three
00:07:24.410 --> 00:07:26.970
matrices is really
easy in this order.
00:07:26.970 --> 00:07:31.290
Turns out all you do is you just
plop these entries right in.
00:07:35.030 --> 00:07:36.040
1, 1.
00:07:36.040 --> 00:07:36.860
Good.
00:07:36.860 --> 00:07:38.065
So this is our L matrix.
00:07:41.780 --> 00:07:45.600
So now we have our U
matrix and our L matrix,
00:07:45.600 --> 00:07:49.110
and we're done with the
first part of the question.
00:07:49.110 --> 00:07:52.850
The second part asks us for
which real numbers a and b
00:07:52.850 --> 00:07:55.350
does this decomposition exist?
00:07:55.350 --> 00:07:58.660
Now let's go back and
remember that at one point
00:07:58.660 --> 00:08:01.400
we had to assume
that A was non-zero.
00:08:01.400 --> 00:08:03.810
That was the only
assumption we had to make
00:08:03.810 --> 00:08:06.030
to get this decomposition.
00:08:06.030 --> 00:08:10.840
So it exists-- it being
this decomposition--
00:08:10.840 --> 00:08:11.825
when a is non-zero.
00:08:14.792 --> 00:08:16.500
And that's the answer
to the second part.
00:08:19.630 --> 00:08:24.750
So we have our LU decomposition,
and we know when it exists.
00:08:24.750 --> 00:08:27.920
Before I end, two comments.
00:08:27.920 --> 00:08:30.810
First, always check your work.
00:08:30.810 --> 00:08:33.880
Always go back and
multiply L times U
00:08:33.880 --> 00:08:35.580
and make sure it's
A, because it's
00:08:35.580 --> 00:08:38.270
easy to screw up the
elimination process
00:08:38.270 --> 00:08:41.360
and it's easy to
check your work.
00:08:41.360 --> 00:08:46.300
So if you go back and make sure
things are as they should be.
00:08:46.300 --> 00:08:50.320
Second comment is that
you might be worried
00:08:50.320 --> 00:08:55.990
when you do this elimination
process that-- well OK, we
00:08:55.990 --> 00:08:58.860
had to assume a is
non-zero because we
00:08:58.860 --> 00:09:01.164
wanted a non-zero pivot.
00:09:01.164 --> 00:09:02.580
You might worry
that we might have
00:09:02.580 --> 00:09:05.290
to have a minus b be non-zero.
00:09:05.290 --> 00:09:09.660
But in fact, a minus b can be 0.
00:09:09.660 --> 00:09:14.420
It's not a problem
for this entry
00:09:14.420 --> 00:09:20.670
to be 0 because we don't have
to do a row exchange to get
00:09:20.670 --> 00:09:24.280
U. That's the only time when we
can't do the LU decomposition.
00:09:24.280 --> 00:09:29.146
In particular, singular matrices
can have LU decompositions.
00:09:29.146 --> 00:09:29.646
Good.
00:09:32.660 --> 00:09:34.210
Thanks.