1
00:00:06,364 --> 00:00:07,280
MARTINA BALAGOVIC: Hi.
2
00:00:07,280 --> 00:00:08,760
Welcome to recitation.
3
00:00:08,760 --> 00:00:11,920
Today's problem is about
positive definite matrices.
4
00:00:11,920 --> 00:00:14,560
And it's asking us: for
which values of the parameter
5
00:00:14,560 --> 00:00:19,500
c, which is sitting here in the
matrix, is the matrix B-- 2,
6
00:00:19,500 --> 00:00:25,640
minus 1, minus 1; minus 1, 2,
minus 1; minus 1, minus 1, 2
7
00:00:25,640 --> 00:00:29,250
plus c-- positive definite,
and for which values of c
8
00:00:29,250 --> 00:00:30,593
is it positive semidefinite?
9
00:00:30,593 --> 00:00:32,509
I'm going to leave you
alone with the problem.
10
00:00:32,509 --> 00:00:33,967
You should pause
the video and then
11
00:00:33,967 --> 00:00:36,080
come back and compare
your solution with mine.
12
00:00:42,850 --> 00:00:44,254
And we're back.
13
00:00:44,254 --> 00:00:45,670
As you remember
from the lectures,
14
00:00:45,670 --> 00:00:48,820
there are several tests that you
can do on matrices to find out
15
00:00:48,820 --> 00:00:50,740
if they're positive
definite and if they're
16
00:00:50,740 --> 00:00:52,110
positive semidefinite.
17
00:00:52,110 --> 00:00:53,940
And I'm going to
demonstrate three to you.
18
00:00:53,940 --> 00:00:57,200
First, I'm going to do the
one that you should do in case
19
00:00:57,200 --> 00:00:58,700
you have very little
time and you're
20
00:00:58,700 --> 00:01:02,700
asked to do a problem like
this on the test, which is
21
00:01:02,700 --> 00:01:05,181
of course the determinant test.
22
00:01:13,540 --> 00:01:16,740
The determinant test
asks us to compute
23
00:01:16,740 --> 00:01:22,700
determinants of the matrices
in the upper left corner
24
00:01:22,700 --> 00:01:24,396
of all sizes.
25
00:01:24,396 --> 00:01:26,520
And it says that it's going
to be positive definite
26
00:01:26,520 --> 00:01:29,600
if they're all greater than
0 and positive semidefinite
27
00:01:29,600 --> 00:01:32,730
if some 0's sneak
into that sequence.
28
00:01:32,730 --> 00:01:34,860
So let's calculate
the determinants.
29
00:01:34,860 --> 00:01:39,060
The first determinant is the
determinant of this tiny matrix
30
00:01:39,060 --> 00:01:39,930
here.
31
00:01:39,930 --> 00:01:43,400
So it's just 2.
32
00:01:43,400 --> 00:01:49,140
The next one is the determinant
of this two by two submatrix,
33
00:01:49,140 --> 00:01:56,790
2, minus 1; minus 1, 2; which is
equal to 4 minus 1, which is 3.
34
00:01:59,310 --> 00:02:04,330
And finally, we
have the determinant
35
00:02:04,330 --> 00:02:08,880
of B, which I'm going
to calculate for you.
36
00:02:08,880 --> 00:02:11,610
I'm going to calculate
it, I'm going
37
00:02:11,610 --> 00:02:15,810
to decompose it along the
first line, first row.
38
00:02:15,810 --> 00:02:25,870
So it's 2 times the determinant
of this submatrix, 2, minus 1;
39
00:02:25,870 --> 00:02:32,970
minus 1, 2 plus c; minus
minus 1, this one here,
40
00:02:32,970 --> 00:02:39,390
times this determinant,
which is minus 1, minus 1;
41
00:02:39,390 --> 00:02:43,340
minus 1, 2 plus c.
42
00:02:43,340 --> 00:02:52,360
And then plus minus 1, this one
here, times this determinant,
43
00:02:52,360 --> 00:02:58,280
which is minus 1,
2; minus 1, minus 1.
44
00:02:58,280 --> 00:03:13,390
And in total, that's 2 times
4 plus 2c minus 1 plus minus 2
45
00:03:13,390 --> 00:03:25,440
minus c minus 1
and minus 1 plus 2.
46
00:03:25,440 --> 00:03:27,880
And in total, this
should give us
47
00:03:27,880 --> 00:03:40,030
6 plus 4c minus 3 minus
c minus 3, which is 3c.
48
00:03:43,530 --> 00:03:45,030
So let's look at
the determinants.
49
00:03:45,030 --> 00:03:46,130
2 is positive.
50
00:03:46,130 --> 00:03:47,440
3 is positive.
51
00:03:47,440 --> 00:03:49,080
3c is positive.
52
00:03:49,080 --> 00:03:51,930
So the answer is: the
matrix is positive definite
53
00:03:51,930 --> 00:03:58,500
if c is bigger than 0, and
it's positive semidefinite
54
00:03:58,500 --> 00:04:01,970
if it's either strictly
bigger than 0 or equal to 0.
55
00:04:01,970 --> 00:04:02,770
And that's all.
56
00:04:02,770 --> 00:04:06,160
If you're on the test, this is
everything that you should do.
57
00:04:06,160 --> 00:04:09,350
Now let me show
you two more tests
58
00:04:09,350 --> 00:04:13,700
to demonstrate that first, they
take longer, and second, to see
59
00:04:13,700 --> 00:04:16,090
these numbers and
their quotients show up
60
00:04:16,090 --> 00:04:17,940
in other tests and to
try to convince you
61
00:04:17,940 --> 00:04:20,295
that these tests
really are equivalent.
62
00:04:20,295 --> 00:04:22,060
Let me do the
pivots test for you.
63
00:04:28,990 --> 00:04:34,160
So we take our matrix B, 2,
minus 1, minus 1; minus 1, 2,
64
00:04:34,160 --> 00:04:39,520
minus 1; minus 1,
minus 1, 2 plus c.
65
00:04:39,520 --> 00:04:43,570
And let's pretend we're
solving a system that
66
00:04:43,570 --> 00:04:45,550
has this as a matrix.
67
00:04:45,550 --> 00:04:48,930
So we multiply the
first row by 1/2,
68
00:04:48,930 --> 00:04:53,120
and we add it to the second
and to the third row.
69
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,
70
00:05:08,630 --> 00:05:12,400
3/2 plus c.
71
00:05:12,400 --> 00:05:14,450
So the first column is good.
72
00:05:14,450 --> 00:05:19,270
And then we just
replace the third column
73
00:05:19,270 --> 00:05:22,330
with the third column
plus the second column.
74
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.
75
00:05:36,450 --> 00:05:44,920
And so the pivots
are 2, 3/2, and c.
76
00:05:44,920 --> 00:05:47,730
And again, the
answer is as before.
77
00:05:47,730 --> 00:05:50,460
It's positive definite if c
is strictly bigger than 0,
78
00:05:50,460 --> 00:05:53,880
and it's positive semidefinite
if c is greater or equal to 0.
79
00:05:53,880 --> 00:05:55,950
But I want you to notice
something else here.
80
00:05:55,950 --> 00:06:00,670
So before, we had 2, 3, and 3c.
81
00:06:00,670 --> 00:06:02,630
And now for determinants,
as these pivots,
82
00:06:02,630 --> 00:06:07,350
we have 2, 3/2, which is
the second determinant
83
00:06:07,350 --> 00:06:10,760
over the first
determinant, and c,
84
00:06:10,760 --> 00:06:13,510
which can be thought
of as 3c over 3,
85
00:06:13,510 --> 00:06:16,180
so the third determinant
over the second determinant.
86
00:06:16,180 --> 00:06:19,310
And something like this
is always going to happen.
87
00:06:19,310 --> 00:06:29,450
And finally, let me do the
energy test, or completing
88
00:06:29,450 --> 00:06:30,050
the square.
89
00:06:38,030 --> 00:06:42,850
So one of the definitions
of positive definite,
90
00:06:42,850 --> 00:06:44,350
one could say the
definition because
91
00:06:44,350 --> 00:06:49,650
of which we are really
interested in such matrices,
92
00:06:49,650 --> 00:06:50,910
is the following.
93
00:06:50,910 --> 00:06:57,540
It's positive definite
if, when we consider
94
00:06:57,540 --> 00:07:00,880
this quadratic form,
so a form that maps
95
00:07:00,880 --> 00:07:04,080
x, y, and z to this
expression here that's
96
00:07:04,080 --> 00:07:09,950
going to be quadratic in
x, y, and z, it's positive
97
00:07:09,950 --> 00:07:14,480
semidefinite if this is always
greater or equal than 0.
98
00:07:14,480 --> 00:07:17,330
And it's positive
definite if, when
99
00:07:17,330 --> 00:07:21,810
we have an expression like this
and try to solve this equals 0,
100
00:07:21,810 --> 00:07:25,470
the only solution is that x,
y, and z all have to be 0.
101
00:07:28,500 --> 00:07:30,790
So let's try
calculating this form,
102
00:07:30,790 --> 00:07:33,380
completing the squares on
it, and seeing these numbers
103
00:07:33,380 --> 00:07:35,890
show up again.
104
00:07:35,890 --> 00:07:39,510
So when I multiply this
like this, put in a B,
105
00:07:39,510 --> 00:07:42,415
do the multiplication, we
get something like this.
106
00:07:42,415 --> 00:07:53,740
2 x squared plus 2 y squared
plus 2 plus c z squared minus
107
00:07:53,740 --> 00:07:58,290
2x*y minus 2x*z minus 2y*z.
108
00:08:02,850 --> 00:08:07,620
And now let's try completing
the squares using the formulas
109
00:08:07,620 --> 00:08:10,000
that I prepared for you up
here in this pop-up window
110
00:08:10,000 --> 00:08:11,430
in the corner.
111
00:08:11,430 --> 00:08:13,600
So let's try
completing-- we have
112
00:08:13,600 --> 00:08:15,880
a formula for the
square of a plus
113
00:08:15,880 --> 00:08:20,150
b plus c and the
square of a plus b.
114
00:08:20,150 --> 00:08:26,870
So first, we try to get
something squared so that this
115
00:08:26,870 --> 00:08:29,910
something has all the
x's that appear here,
116
00:08:29,910 --> 00:08:32,929
so that we get something squared
plus some expression that only
117
00:08:32,929 --> 00:08:36,010
takes y's and z's.
118
00:08:36,010 --> 00:08:38,299
I'm not going to do the
calculation in front of you
119
00:08:38,299 --> 00:08:40,490
to further embarrass
myself with it.
120
00:08:40,490 --> 00:08:42,610
But let me tell you
that what you get
121
00:08:42,610 --> 00:08:52,890
is 2 times x minus 1/2
y minus 1/2 z squared.
122
00:08:52,890 --> 00:08:55,320
And this ate all the
x's that showed up here.
123
00:08:55,320 --> 00:08:58,160
The remainder only
has y's and z's.
124
00:08:58,160 --> 00:09:00,910
When you use the second of those
formulas in a pop-up window
125
00:09:00,910 --> 00:09:03,830
to complete the square
of y's and z's, you
126
00:09:03,830 --> 00:09:12,230
get 3/2 times y minus z squared.
127
00:09:12,230 --> 00:09:14,940
So this took up all
the y's, and we're
128
00:09:14,940 --> 00:09:22,900
left just with a z that
comes as c times z squared.
129
00:09:22,900 --> 00:09:24,990
And now, let's look
at the following.
130
00:09:24,990 --> 00:09:28,760
This is a square of
some real number.
131
00:09:28,760 --> 00:09:30,560
So that's positive.
132
00:09:30,560 --> 00:09:33,580
This is a square of some real
number, so that's positive.
133
00:09:33,580 --> 00:09:35,430
And this is a square
of some real number,
134
00:09:35,430 --> 00:09:36,800
so that's positive.
135
00:09:36,800 --> 00:09:40,480
They're all multiplied by
positive numbers, 2, 3/2,
136
00:09:40,480 --> 00:09:44,540
and c, which we've
already seen here.
137
00:09:44,540 --> 00:09:48,000
And so if c is bigger
or equal than 0,
138
00:09:48,000 --> 00:09:51,250
this is certainly always
bigger or equal than 0.
139
00:09:51,250 --> 00:09:56,910
Now to the question of if this
can be equal to 0 without x, y,
140
00:09:56,910 --> 00:10:02,640
and z all being 0, well,
let's look at two cases.
141
00:10:02,640 --> 00:10:04,650
If c is strictly
bigger than 0, then
142
00:10:04,650 --> 00:10:16,370
let me write this matrix
here as 2, 3/2 and c times 1,
143
00:10:16,370 --> 00:10:26,370
minus 1/2, minus 1/2; 0,
1, minus 1; and 0, 0, 1.
144
00:10:26,370 --> 00:10:28,440
Let's imagine c is
strictly bigger than 0.
145
00:10:28,440 --> 00:10:32,050
And let's see when can this
expression be equal to 0.
146
00:10:32,050 --> 00:10:36,460
Well, as we said, it's a
sum of certain squares.
147
00:10:36,460 --> 00:10:37,940
They're all greater
or equal to 0,
148
00:10:37,940 --> 00:10:41,150
so they all have to be equal to
0 for this expression to be 0.
149
00:10:41,150 --> 00:10:44,300
In other words, z
needs to be equal to 0.
150
00:10:44,300 --> 00:10:47,430
y minus z needs
to be equal to 0.
151
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.
152
00:10:55,030 --> 00:10:58,940
And since this matrix
has all the pivots,
153
00:10:58,940 --> 00:11:04,700
this can only happen if x,
y, and z are all equal to 0.
154
00:11:04,700 --> 00:11:10,640
On the other hand,
if c is equal to 0,
155
00:11:10,640 --> 00:11:13,220
then let me write this
matrix here again.
156
00:11:13,220 --> 00:11:14,860
Take 2 out here.
157
00:11:14,860 --> 00:11:16,750
Take 3/2 out here.
158
00:11:16,750 --> 00:11:25,420
And write again 1, minus 1/2,
minus 1/2; 0, 1, minus 1;
159
00:11:25,420 --> 00:11:27,130
and 0, 0, 0.
160
00:11:29,660 --> 00:11:33,080
And so imagining that c is 0,
when can this whole expression
161
00:11:33,080 --> 00:11:33,970
be equal to 0?
162
00:11:33,970 --> 00:11:37,630
Well, the last bit is already 0.
163
00:11:37,630 --> 00:11:40,850
We need to have y
minus z equal to 0.
164
00:11:40,850 --> 00:11:46,510
And we need to have 1 times
x minus 1/2 times y minus 1/2
165
00:11:46,510 --> 00:11:48,820
times z also equal to 0.
166
00:11:48,820 --> 00:11:52,505
So we need to have x, y, z
in the kernel of this matrix.
167
00:11:52,505 --> 00:11:54,790
But this matrix
only has two pivots.
168
00:11:54,790 --> 00:11:56,710
It has one free variable.
169
00:11:56,710 --> 00:11:59,805
So we can find a
solution to this times x,
170
00:11:59,805 --> 00:12:02,890
y, z equals 0
that's not 0 itself.
171
00:12:02,890 --> 00:12:06,620
Namely, if you remember how
to solve systems like this,
172
00:12:06,620 --> 00:12:08,370
we set z equal to 1.
173
00:12:14,580 --> 00:12:18,080
From this, we calculate
that y has to be 1.
174
00:12:18,080 --> 00:12:22,170
And then from this, we
calculate that x has to be 1.
175
00:12:22,170 --> 00:12:28,180
And you can check that for
in case c is 0, this thing
176
00:12:28,180 --> 00:12:35,360
here, when you plug it in
here, you really get 0.
177
00:12:35,360 --> 00:12:37,410
In fact, this thing
here is in the kernel
178
00:12:37,410 --> 00:12:41,327
of the matrix B.
In fact, in case c
179
00:12:41,327 --> 00:12:45,600
is 0, the columns of matrix
B sum up to 0 because of this
180
00:12:45,600 --> 00:12:47,240
here.
181
00:12:47,240 --> 00:12:50,230
And that's all I wanted
to say for today.