WEBVTT

00:00:06.364 --> 00:00:07.280
MARTINA BALAGOVIC: Hi.

00:00:07.280 --> 00:00:08.760
Welcome to recitation.

00:00:08.760 --> 00:00:11.920
Today's problem is about
positive definite matrices.

00:00:11.920 --> 00:00:14.560
And it's asking us: for
which values of the parameter

00:00:14.560 --> 00:00:19.500
c, which is sitting here in the
matrix, is the matrix B-- 2,

00:00:19.500 --> 00:00:25.640
minus 1, minus 1; minus 1, 2,
minus 1; minus 1, minus 1, 2

00:00:25.640 --> 00:00:29.250
plus c-- positive definite,
and for which values of c

00:00:29.250 --> 00:00:30.593
is it positive semidefinite?

00:00:30.593 --> 00:00:32.509
I'm going to leave you
alone with the problem.

00:00:32.509 --> 00:00:33.967
You should pause
the video and then

00:00:33.967 --> 00:00:36.080
come back and compare
your solution with mine.

00:00:42.850 --> 00:00:44.254
And we're back.

00:00:44.254 --> 00:00:45.670
As you remember
from the lectures,

00:00:45.670 --> 00:00:48.820
there are several tests that you
can do on matrices to find out

00:00:48.820 --> 00:00:50.740
if they're positive
definite and if they're

00:00:50.740 --> 00:00:52.110
positive semidefinite.

00:00:52.110 --> 00:00:53.940
And I'm going to
demonstrate three to you.

00:00:53.940 --> 00:00:57.200
First, I'm going to do the
one that you should do in case

00:00:57.200 --> 00:00:58.700
you have very little
time and you're

00:00:58.700 --> 00:01:02.700
asked to do a problem like
this on the test, which is

00:01:02.700 --> 00:01:05.181
of course the determinant test.

00:01:13.540 --> 00:01:16.740
The determinant test
asks us to compute

00:01:16.740 --> 00:01:22.700
determinants of the matrices
in the upper left corner

00:01:22.700 --> 00:01:24.396
of all sizes.

00:01:24.396 --> 00:01:26.520
And it says that it's going
to be positive definite

00:01:26.520 --> 00:01:29.600
if they're all greater than
0 and positive semidefinite

00:01:29.600 --> 00:01:32.730
if some 0's sneak
into that sequence.

00:01:32.730 --> 00:01:34.860
So let's calculate
the determinants.

00:01:34.860 --> 00:01:39.060
The first determinant is the
determinant of this tiny matrix

00:01:39.060 --> 00:01:39.930
here.

00:01:39.930 --> 00:01:43.400
So it's just 2.

00:01:43.400 --> 00:01:49.140
The next one is the determinant
of this two by two submatrix,

00:01:49.140 --> 00:01:56.790
2, minus 1; minus 1, 2; which is
equal to 4 minus 1, which is 3.

00:01:59.310 --> 00:02:04.330
And finally, we
have the determinant

00:02:04.330 --> 00:02:08.880
of B, which I'm going
to calculate for you.

00:02:08.880 --> 00:02:11.610
I'm going to calculate
it, I'm going

00:02:11.610 --> 00:02:15.810
to decompose it along the
first line, first row.

00:02:15.810 --> 00:02:25.870
So it's 2 times the determinant
of this submatrix, 2, minus 1;

00:02:25.870 --> 00:02:32.970
minus 1, 2 plus c; minus
minus 1, this one here,

00:02:32.970 --> 00:02:39.390
times this determinant,
which is minus 1, minus 1;

00:02:39.390 --> 00:02:43.340
minus 1, 2 plus c.

00:02:43.340 --> 00:02:52.360
And then plus minus 1, this one
here, times this determinant,

00:02:52.360 --> 00:02:58.280
which is minus 1,
2; minus 1, minus 1.

00:02:58.280 --> 00:03:13.390
And in total, that's 2 times
4 plus 2c minus 1 plus minus 2

00:03:13.390 --> 00:03:25.440
minus c minus 1
and minus 1 plus 2.

00:03:25.440 --> 00:03:27.880
And in total, this
should give us

00:03:27.880 --> 00:03:40.030
6 plus 4c minus 3 minus
c minus 3, which is 3c.

00:03:43.530 --> 00:03:45.030
So let's look at
the determinants.

00:03:45.030 --> 00:03:46.130
2 is positive.

00:03:46.130 --> 00:03:47.440
3 is positive.

00:03:47.440 --> 00:03:49.080
3c is positive.

00:03:49.080 --> 00:03:51.930
So the answer is: the
matrix is positive definite

00:03:51.930 --> 00:03:58.500
if c is bigger than 0, and
it's positive semidefinite

00:03:58.500 --> 00:04:01.970
if it's either strictly
bigger than 0 or equal to 0.

00:04:01.970 --> 00:04:02.770
And that's all.

00:04:02.770 --> 00:04:06.160
If you're on the test, this is
everything that you should do.

00:04:06.160 --> 00:04:09.350
Now let me show
you two more tests

00:04:09.350 --> 00:04:13.700
to demonstrate that first, they
take longer, and second, to see

00:04:13.700 --> 00:04:16.090
these numbers and
their quotients show up

00:04:16.090 --> 00:04:17.940
in other tests and to
try to convince you

00:04:17.940 --> 00:04:20.295
that these tests
really are equivalent.

00:04:20.295 --> 00:04:22.060
Let me do the
pivots test for you.

00:04:28.990 --> 00:04:34.160
So we take our matrix B, 2,
minus 1, minus 1; minus 1, 2,

00:04:34.160 --> 00:04:39.520
minus 1; minus 1,
minus 1, 2 plus c.

00:04:39.520 --> 00:04:43.570
And let's pretend we're
solving a system that

00:04:43.570 --> 00:04:45.550
has this as a matrix.

00:04:45.550 --> 00:04:48.930
So we multiply the
first row by 1/2,

00:04:48.930 --> 00:04:53.120
and we add it to the second
and to the third row.

00:04:53.120 --> 00:05:08.630
We get 2, minus 1, minus 1; 0,
3/2, minus 3/2; 0, minus 3/2,

00:05:08.630 --> 00:05:12.400
3/2 plus c.

00:05:12.400 --> 00:05:14.450
So the first column is good.

00:05:14.450 --> 00:05:19.270
And then we just
replace the third column

00:05:19.270 --> 00:05:22.330
with the third column
plus the second column.

00:05:22.330 --> 00:05:36.450
And we get 2, minus 1, minus 1;
0, 3/2, minus 3/2; 0, 0, and c.

00:05:36.450 --> 00:05:44.920
And so the pivots
are 2, 3/2, and c.

00:05:44.920 --> 00:05:47.730
And again, the
answer is as before.

00:05:47.730 --> 00:05:50.460
It's positive definite if c
is strictly bigger than 0,

00:05:50.460 --> 00:05:53.880
and it's positive semidefinite
if c is greater or equal to 0.

00:05:53.880 --> 00:05:55.950
But I want you to notice
something else here.

00:05:55.950 --> 00:06:00.670
So before, we had 2, 3, and 3c.

00:06:00.670 --> 00:06:02.630
And now for determinants,
as these pivots,

00:06:02.630 --> 00:06:07.350
we have 2, 3/2, which is
the second determinant

00:06:07.350 --> 00:06:10.760
over the first
determinant, and c,

00:06:10.760 --> 00:06:13.510
which can be thought
of as 3c over 3,

00:06:13.510 --> 00:06:16.180
so the third determinant
over the second determinant.

00:06:16.180 --> 00:06:19.310
And something like this
is always going to happen.

00:06:19.310 --> 00:06:29.450
And finally, let me do the
energy test, or completing

00:06:29.450 --> 00:06:30.050
the square.

00:06:38.030 --> 00:06:42.850
So one of the definitions
of positive definite,

00:06:42.850 --> 00:06:44.350
one could say the
definition because

00:06:44.350 --> 00:06:49.650
of which we are really
interested in such matrices,

00:06:49.650 --> 00:06:50.910
is the following.

00:06:50.910 --> 00:06:57.540
It's positive definite
if, when we consider

00:06:57.540 --> 00:07:00.880
this quadratic form,
so a form that maps

00:07:00.880 --> 00:07:04.080
x, y, and z to this
expression here that's

00:07:04.080 --> 00:07:09.950
going to be quadratic in
x, y, and z, it's positive

00:07:09.950 --> 00:07:14.480
semidefinite if this is always
greater or equal than 0.

00:07:14.480 --> 00:07:17.330
And it's positive
definite if, when

00:07:17.330 --> 00:07:21.810
we have an expression like this
and try to solve this equals 0,

00:07:21.810 --> 00:07:25.470
the only solution is that x,
y, and z all have to be 0.

00:07:28.500 --> 00:07:30.790
So let's try
calculating this form,

00:07:30.790 --> 00:07:33.380
completing the squares on
it, and seeing these numbers

00:07:33.380 --> 00:07:35.890
show up again.

00:07:35.890 --> 00:07:39.510
So when I multiply this
like this, put in a B,

00:07:39.510 --> 00:07:42.415
do the multiplication, we
get something like this.

00:07:42.415 --> 00:07:53.740
2 x squared plus 2 y squared
plus 2 plus c z squared minus

00:07:53.740 --> 00:07:58.290
2x*y minus 2x*z minus 2y*z.

00:08:02.850 --> 00:08:07.620
And now let's try completing
the squares using the formulas

00:08:07.620 --> 00:08:10.000
that I prepared for you up
here in this pop-up window

00:08:10.000 --> 00:08:11.430
in the corner.

00:08:11.430 --> 00:08:13.600
So let's try
completing-- we have

00:08:13.600 --> 00:08:15.880
a formula for the
square of a plus

00:08:15.880 --> 00:08:20.150
b plus c and the
square of a plus b.

00:08:20.150 --> 00:08:26.870
So first, we try to get
something squared so that this

00:08:26.870 --> 00:08:29.910
something has all the
x's that appear here,

00:08:29.910 --> 00:08:32.929
so that we get something squared
plus some expression that only

00:08:32.929 --> 00:08:36.010
takes y's and z's.

00:08:36.010 --> 00:08:38.299
I'm not going to do the
calculation in front of you

00:08:38.299 --> 00:08:40.490
to further embarrass
myself with it.

00:08:40.490 --> 00:08:42.610
But let me tell you
that what you get

00:08:42.610 --> 00:08:52.890
is 2 times x minus 1/2
y minus 1/2 z squared.

00:08:52.890 --> 00:08:55.320
And this ate all the
x's that showed up here.

00:08:55.320 --> 00:08:58.160
The remainder only
has y's and z's.

00:08:58.160 --> 00:09:00.910
When you use the second of those
formulas in a pop-up window

00:09:00.910 --> 00:09:03.830
to complete the square
of y's and z's, you

00:09:03.830 --> 00:09:12.230
get 3/2 times y minus z squared.

00:09:12.230 --> 00:09:14.940
So this took up all
the y's, and we're

00:09:14.940 --> 00:09:22.900
left just with a z that
comes as c times z squared.

00:09:22.900 --> 00:09:24.990
And now, let's look
at the following.

00:09:24.990 --> 00:09:28.760
This is a square of
some real number.

00:09:28.760 --> 00:09:30.560
So that's positive.

00:09:30.560 --> 00:09:33.580
This is a square of some real
number, so that's positive.

00:09:33.580 --> 00:09:35.430
And this is a square
of some real number,

00:09:35.430 --> 00:09:36.800
so that's positive.

00:09:36.800 --> 00:09:40.480
They're all multiplied by
positive numbers, 2, 3/2,

00:09:40.480 --> 00:09:44.540
and c, which we've
already seen here.

00:09:44.540 --> 00:09:48.000
And so if c is bigger
or equal than 0,

00:09:48.000 --> 00:09:51.250
this is certainly always
bigger or equal than 0.

00:09:51.250 --> 00:09:56.910
Now to the question of if this
can be equal to 0 without x, y,

00:09:56.910 --> 00:10:02.640
and z all being 0, well,
let's look at two cases.

00:10:02.640 --> 00:10:04.650
If c is strictly
bigger than 0, then

00:10:04.650 --> 00:10:16.370
let me write this matrix
here as 2, 3/2 and c times 1,

00:10:16.370 --> 00:10:26.370
minus 1/2, minus 1/2; 0,
1, minus 1; and 0, 0, 1.

00:10:26.370 --> 00:10:28.440
Let's imagine c is
strictly bigger than 0.

00:10:28.440 --> 00:10:32.050
And let's see when can this
expression be equal to 0.

00:10:32.050 --> 00:10:36.460
Well, as we said, it's a
sum of certain squares.

00:10:36.460 --> 00:10:37.940
They're all greater
or equal to 0,

00:10:37.940 --> 00:10:41.150
so they all have to be equal to
0 for this expression to be 0.

00:10:41.150 --> 00:10:44.300
In other words, z
needs to be equal to 0.

00:10:44.300 --> 00:10:47.430
y minus z needs
to be equal to 0.

00:10:47.430 --> 00:10:55.030
And x minus 1/2 y minus 1/2 z
also needs to be equal to 0.

00:10:55.030 --> 00:10:58.940
And since this matrix
has all the pivots,

00:10:58.940 --> 00:11:04.700
this can only happen if x,
y, and z are all equal to 0.

00:11:04.700 --> 00:11:10.640
On the other hand,
if c is equal to 0,

00:11:10.640 --> 00:11:13.220
then let me write this
matrix here again.

00:11:13.220 --> 00:11:14.860
Take 2 out here.

00:11:14.860 --> 00:11:16.750
Take 3/2 out here.

00:11:16.750 --> 00:11:25.420
And write again 1, minus 1/2,
minus 1/2; 0, 1, minus 1;

00:11:25.420 --> 00:11:27.130
and 0, 0, 0.

00:11:29.660 --> 00:11:33.080
And so imagining that c is 0,
when can this whole expression

00:11:33.080 --> 00:11:33.970
be equal to 0?

00:11:33.970 --> 00:11:37.630
Well, the last bit is already 0.

00:11:37.630 --> 00:11:40.850
We need to have y
minus z equal to 0.

00:11:40.850 --> 00:11:46.510
And we need to have 1 times
x minus 1/2 times y minus 1/2

00:11:46.510 --> 00:11:48.820
times z also equal to 0.

00:11:48.820 --> 00:11:52.505
So we need to have x, y, z
in the kernel of this matrix.

00:11:52.505 --> 00:11:54.790
But this matrix
only has two pivots.

00:11:54.790 --> 00:11:56.710
It has one free variable.

00:11:56.710 --> 00:11:59.805
So we can find a
solution to this times x,

00:11:59.805 --> 00:12:02.890
y, z equals 0
that's not 0 itself.

00:12:02.890 --> 00:12:06.620
Namely, if you remember how
to solve systems like this,

00:12:06.620 --> 00:12:08.370
we set z equal to 1.

00:12:14.580 --> 00:12:18.080
From this, we calculate
that y has to be 1.

00:12:18.080 --> 00:12:22.170
And then from this, we
calculate that x has to be 1.

00:12:22.170 --> 00:12:28.180
And you can check that for
in case c is 0, this thing

00:12:28.180 --> 00:12:35.360
here, when you plug it in
here, you really get 0.

00:12:35.360 --> 00:12:37.410
In fact, this thing
here is in the kernel

00:12:37.410 --> 00:12:41.327
of the matrix B.
In fact, in case c

00:12:41.327 --> 00:12:45.600
is 0, the columns of matrix
B sum up to 0 because of this

00:12:45.600 --> 00:12:47.240
here.

00:12:47.240 --> 00:12:50.230
And that's all I wanted
to say for today.