WEBVTT
00:00:07.977 --> 00:00:08.560
PROFESSOR: Hi.
00:00:08.560 --> 00:00:10.010
Welcome to recitation.
00:00:10.010 --> 00:00:12.480
My name is Martina, and I'll
be your recitation instructor
00:00:12.480 --> 00:00:14.940
for some of these
linear algebra videos.
00:00:14.940 --> 00:00:16.740
Today's problem is
a straightforward
00:00:16.740 --> 00:00:18.580
solve the following
linear system
00:00:18.580 --> 00:00:20.600
with four equations
and four unknowns,
00:00:20.600 --> 00:00:22.270
using the method of elimination.
00:00:22.270 --> 00:00:28.220
The system is x minus y minus
z plus u equals 0, 2x plus 2z
00:00:28.220 --> 00:00:32.290
equals 8, minus y
minus 2z equals -8,
00:00:32.290 --> 00:00:36.560
and 3x minus 3y minus
2z plus 4u equals 7.
00:00:36.560 --> 00:00:38.310
And although you might
know different ways
00:00:38.310 --> 00:00:39.984
to solve the system
at this point,
00:00:39.984 --> 00:00:41.400
the method of
elimination is going
00:00:41.400 --> 00:00:45.562
to show up a million
times during these videos,
00:00:45.562 --> 00:00:47.270
so it's really important
to get it right.
00:00:47.270 --> 00:00:50.180
So I suggest you try solving
this system now, using
00:00:50.180 --> 00:00:52.584
the method of elimination as
it was described in class.
00:00:52.584 --> 00:00:54.500
I'm going to leave you
alone with the problem.
00:00:54.500 --> 00:00:56.860
You should pause the
video, solve it yourself,
00:00:56.860 --> 00:00:59.452
and then come back and compare
your solution with mine.
00:01:06.750 --> 00:01:07.890
And we're back.
00:01:07.890 --> 00:01:11.560
So the method of elimination,
if you remember it from class,
00:01:11.560 --> 00:01:14.410
consisted of replacing this
system with an equivalent
00:01:14.410 --> 00:01:17.390
system-- equivalent meaning
they have the same solution--
00:01:17.390 --> 00:01:19.360
by a series of row operations.
00:01:19.360 --> 00:01:22.060
Row operations are not
supposed to change the solution
00:01:22.060 --> 00:01:23.000
to the system.
00:01:23.000 --> 00:01:24.860
And they're, for
example, exchange
00:01:24.860 --> 00:01:26.320
the order of two equations.
00:01:26.320 --> 00:01:29.000
Multiply an equation
with a nonzero number,
00:01:29.000 --> 00:01:32.310
and add a nonzero multiple
of one equation to the other.
00:01:32.310 --> 00:01:33.950
So let's do that.
00:01:33.950 --> 00:01:36.537
As we're going to do this
series of arithmetic operations,
00:01:36.537 --> 00:01:38.120
we don't really want
to copy the names
00:01:38.120 --> 00:01:41.060
of the variables and the
equality signs every time.
00:01:41.060 --> 00:01:43.680
So we're going to keep the
important information which
00:01:43.680 --> 00:01:45.380
are these numbers.
00:01:45.380 --> 00:01:46.940
these coefficients
here, we're going
00:01:46.940 --> 00:01:48.650
to keep that
information in a matrix.
00:01:52.250 --> 00:01:54.520
So let's write a matrix.
00:01:54.520 --> 00:01:56.930
Each row is going to
correspond to an equation,
00:01:56.930 --> 00:01:59.850
and each column is going to
correspond to an unknown.
00:01:59.850 --> 00:02:09.220
So the first row
is 1, -1, -1, 1.
00:02:13.190 --> 00:02:15.625
The second row, corresponding
to the second equation,
00:02:15.625 --> 00:02:24.450
is 2, 0, 2, 0.
00:02:24.450 --> 00:02:27.080
And you want to be very careful
to put 0's on the right spots
00:02:27.080 --> 00:02:28.560
here.
00:02:28.560 --> 00:02:31.550
The third equation is
0-- I haven't left myself
00:02:31.550 --> 00:02:38.840
enough room-- 0, -1, -2, 0.
00:02:38.840 --> 00:02:41.480
And the fourth
row, corresponding
00:02:41.480 --> 00:02:49.990
to the fourth equation,
is 3, -3, -2, 4.
00:02:49.990 --> 00:02:52.360
And as we care about the
right-hand side as well,
00:02:52.360 --> 00:02:54.770
we're going to copy this
information as well,
00:02:54.770 --> 00:02:57.230
and get the augmented
matrix of the system.
00:02:57.230 --> 00:03:01.100
0, 8, -8, 7.
00:03:03.620 --> 00:03:05.686
OK, and now let's try
reducing this matrix
00:03:05.686 --> 00:03:06.810
to an upper triangular one.
00:03:10.102 --> 00:03:11.810
We start with the
first column, and we're
00:03:11.810 --> 00:03:14.070
going to use this
number, called a pivot,
00:03:14.070 --> 00:03:15.860
to get rid of all
the numbers under it,
00:03:15.860 --> 00:03:18.650
so to get 0's here and here.
00:03:18.650 --> 00:03:23.230
A way to do it is-- well,
to get rid of this 2,
00:03:23.230 --> 00:03:26.400
I have to multiply
the first row by -2,
00:03:26.400 --> 00:03:29.050
and add it to the second one.
00:03:29.050 --> 00:03:30.990
Writing this here is
not strictly necessary,
00:03:30.990 --> 00:03:32.600
but I like to do a
bit of bookkeeping,
00:03:32.600 --> 00:03:35.040
because I'm prone to
make a lot of errors
00:03:35.040 --> 00:03:37.200
while doing this simple
arithmetic operations.
00:03:37.200 --> 00:03:38.930
And then if I get
to the end, figure
00:03:38.930 --> 00:03:41.110
out I made a mistake
somewhere, this bookkeeping
00:03:41.110 --> 00:03:43.680
makes it easier to
backtrack and find the place
00:03:43.680 --> 00:03:45.416
where I made this mistake.
00:03:45.416 --> 00:03:48.650
So we replace this matrix
with another matrix.
00:03:48.650 --> 00:03:51.020
The first row stays the same.
00:03:51.020 --> 00:03:57.480
1, -1, -1, 1, 0.
00:03:57.480 --> 00:04:01.500
The second row gets replaced
by the second row minus 2 times
00:04:01.500 --> 00:04:02.580
the first row.
00:04:02.580 --> 00:04:06.000
The aim of that is to get
a 0 here, so that's good.
00:04:06.000 --> 00:04:09.720
Next, on this position
here, we get -2 times -1,
00:04:09.720 --> 00:04:13.640
which is 2, plus 0 which is 2.
00:04:13.640 --> 00:04:20.339
-1 times -2, which is
2, plus 2, which is 4.
00:04:20.339 --> 00:04:23.700
-2 plus 0 which is -2.
00:04:23.700 --> 00:04:27.512
And 8 minus 2
times 0 which is 8.
00:04:27.512 --> 00:04:29.630
The third row
already has a 0 here,
00:04:29.630 --> 00:04:31.360
so I can just copy it over.
00:04:31.360 --> 00:04:37.380
0, -1, -2, 0, -8.
00:04:37.380 --> 00:04:42.940
And to get a 0 here, I'm going
to multiply the first row by -3
00:04:42.940 --> 00:04:50.560
and add it to the fourth row
and get 0, -3 times -1 is 3,
00:04:50.560 --> 00:04:53.880
minus 3 is 0.
00:04:53.880 --> 00:05:04.100
-3 minus 1-- oh, sorry-- 3 minus
2 is 1, and -3 plus 4 is 1.
00:05:09.524 --> 00:05:10.190
And there we go.
00:05:10.190 --> 00:05:12.280
The first column looks
like a first column
00:05:12.280 --> 00:05:14.200
of an upper triangular matrix.
00:05:14.200 --> 00:05:16.950
Now let's do the same
to the second column.
00:05:16.950 --> 00:05:19.340
This is going to be our
pivot, the number that we use
00:05:19.340 --> 00:05:21.220
to get rid of numbers under it.
00:05:21.220 --> 00:05:23.540
And we see that to
get rid of this number
00:05:23.540 --> 00:05:28.270
here, we will need to
multiply it with 1/2.
00:05:28.270 --> 00:05:30.220
So multiply the whole
second row with 1/2,
00:05:30.220 --> 00:05:31.830
and add it to the third row.
00:05:31.830 --> 00:05:38.370
The matrix that we get will
have the first row the same.
00:05:38.370 --> 00:05:39.910
It stays the same.
00:05:39.910 --> 00:05:48.360
1, -1, -1, 1, 0.
00:05:48.360 --> 00:05:50.360
The second row stays the same.
00:05:50.360 --> 00:05:56.510
0, 2, 4, -2, 8.
00:05:59.100 --> 00:06:01.720
The third row gets
replaced by the third row
00:06:01.720 --> 00:06:10.180
plus 1/2 times the second row
and becomes 0, 0, 2 minus 2
00:06:10.180 --> 00:06:22.970
which is 0, -1 plus 0 which is
-1, and 4 minus 8 which is -4.
00:06:22.970 --> 00:06:28.230
And the fourth row already has
a 0 here so I just copy it over.
00:06:28.230 --> 00:06:34.544
0, 0, 1, 1, 7.
00:06:34.544 --> 00:06:35.960
And now let's look
at this matrix.
00:06:35.960 --> 00:06:39.310
It has the first two columns
as they're supposed to be,
00:06:39.310 --> 00:06:41.010
0's under the diagonal.
00:06:41.010 --> 00:06:43.480
And now we want to get a 0 here.
00:06:43.480 --> 00:06:47.120
Normally what I would do is
to circle this number here,
00:06:47.120 --> 00:06:50.330
multiply it by something
so that I get a -1,
00:06:50.330 --> 00:06:53.440
and add it to this
row to get a 0 here.
00:06:53.440 --> 00:06:54.870
But that's not going to work.
00:06:54.870 --> 00:06:58.310
You might remember from lecture
that 0's can never be pivots.
00:06:58.310 --> 00:07:01.020
Or you can just try finding
a number such that 0
00:07:01.020 --> 00:07:03.296
times this number
equals -1, and seeing
00:07:03.296 --> 00:07:04.670
that such a number
doesn't exist,
00:07:04.670 --> 00:07:06.500
because you're always
going to get 0.
00:07:06.500 --> 00:07:09.390
So we can proceed
as we did until now.
00:07:09.390 --> 00:07:12.920
But is there another
way to get a 0 here?
00:07:12.920 --> 00:07:17.690
There is a very
simple row operation,
00:07:17.690 --> 00:07:20.820
which consists just of switching
the third and the fourth row.
00:07:20.820 --> 00:07:23.380
It certainly doesn't change
the solution of the system.
00:07:23.380 --> 00:07:25.930
So let's do that.
00:07:25.930 --> 00:07:35.770
And let's get the next matrix
which is 1, -1, -1, 1, 0.
00:07:35.770 --> 00:07:42.250
0, 2, 4, -2, 8.
00:07:42.250 --> 00:07:43.790
Then we put the fourth row here.
00:07:43.790 --> 00:07:47.920
0, 0, 1, 1, 7.
00:07:47.920 --> 00:07:54.050
And we put the third row
here, 0, 0, 0, -1, -4.
00:07:59.740 --> 00:08:01.590
And there it is.
00:08:01.590 --> 00:08:03.830
This is an upper
triangular matrix.
00:08:03.830 --> 00:08:06.560
So in the same way as at the
beginning, we had a system
00:08:06.560 --> 00:08:08.600
and then wrote the
matrix representing it,
00:08:08.600 --> 00:08:11.010
this matrix also
represents a system.
00:08:11.010 --> 00:08:13.740
And this system has the same
solutions as the initial system
00:08:13.740 --> 00:08:15.400
but is much easier to solve.
00:08:15.400 --> 00:08:18.257
Now let's write this
back as a system,
00:08:18.257 --> 00:08:20.590
and let me do that not starting
from the first equation,
00:08:20.590 --> 00:08:23.900
but starting from
the last equation.
00:08:23.900 --> 00:08:30.030
So the last equation
here reads -u
00:08:30.030 --> 00:08:36.770
equals -4, which
is, as equations go,
00:08:36.770 --> 00:08:39.530
a pretty easy one to solve.
00:08:39.530 --> 00:08:41.734
The solution is u equals 4.
00:08:41.734 --> 00:08:43.400
Now let's go back to
the third equation.
00:08:43.400 --> 00:08:47.360
The third equation
reads y-- no, I'm
00:08:47.360 --> 00:08:57.670
sorry-- z-- the third column
corresponds to z-- plus u
00:08:57.670 --> 00:08:59.410
equals 7.
00:08:59.410 --> 00:09:01.690
But we know what's u now.
00:09:01.690 --> 00:09:13.980
So, it reads z plus 4 equals 7,
which just becomes z equals 3.
00:09:13.980 --> 00:09:22.100
The second equation is 2
times y plus 4 times z,
00:09:22.100 --> 00:09:33.160
but z is 3, minus 2 times
u, but u is 4, equals 8.
00:09:33.160 --> 00:09:37.870
And from this, one can easily
compute that y is equal to 2.
00:09:37.870 --> 00:09:52.200
And finally, the first equation
reads x minus y minus z plus u
00:09:52.200 --> 00:09:58.770
equals 0, or x equals 1.
00:09:58.770 --> 00:09:59.980
And this is our solution.
00:09:59.980 --> 00:10:04.884
x, y, z, and u equal
1, 2, 3, and 4.
00:10:04.884 --> 00:10:07.050
This finishes the problem,
but I would very strongly
00:10:07.050 --> 00:10:09.610
encourage you now to
take this solution
00:10:09.610 --> 00:10:11.510
and plug it back into
the original system
00:10:11.510 --> 00:10:13.300
and check if it's
really a solution.
00:10:13.300 --> 00:10:15.960
And that's all I
wanted to say today.