WEBVTT

00:00:00.500 --> 00:00:01.730
GILBERT STRANG: OK.

00:00:01.730 --> 00:00:04.810
This is positive
definite matrix day.

00:00:07.330 --> 00:00:12.200
Our application was the
second-order equation

00:00:12.200 --> 00:00:17.320
with a symmetric matrix, S.
And we solved this equation.

00:00:17.320 --> 00:00:20.880
Second derivative, plus
S times y, equals 0.

00:00:20.880 --> 00:00:23.520
And you maybe remember
how we solved it.

00:00:23.520 --> 00:00:27.520
We looked for an
exponential solution.

00:00:27.520 --> 00:00:30.990
e to the I omega t,
times a vector x.

00:00:30.990 --> 00:00:33.250
We substituted,
and we discovered

00:00:33.250 --> 00:00:39.740
x had to be an eigenvector
of S, as usual.

00:00:39.740 --> 00:00:47.030
And lambda, which was omega
squared, is the eigenvalue.

00:00:47.030 --> 00:00:51.150
But I didn't stop to
point out that if we

00:00:51.150 --> 00:00:53.320
want lambda to be
omega squared, we

00:00:53.320 --> 00:00:56.580
need to know lambda
greater or equal to 0.

00:00:56.580 --> 00:00:59.880
So that is the best
of the best matrices.

00:00:59.880 --> 00:01:05.300
Symmetric and positive definite,
or positive semidefinite,

00:01:05.300 --> 00:01:10.130
which means the eigenvalues
are not only real,

00:01:10.130 --> 00:01:12.570
they're real for
symmetric matrices.

00:01:12.570 --> 00:01:14.940
They're also positive.

00:01:14.940 --> 00:01:18.270
Positive definite matrices--
automatically symmetric,

00:01:18.270 --> 00:01:21.160
I'm only talking about
symmetric matrices--

00:01:21.160 --> 00:01:24.240
and positive eigenvalues.

00:01:24.240 --> 00:01:24.740
OK.

00:01:24.740 --> 00:01:25.520
There it is.

00:01:25.520 --> 00:01:27.420
Positive definite matrix.

00:01:27.420 --> 00:01:29.830
All the eigenvalues
are positive.

00:01:29.830 --> 00:01:31.490
Positive semidefinite.

00:01:31.490 --> 00:01:35.590
That word semi allows
lambda equal 0.

00:01:35.590 --> 00:01:39.120
The matrix could be singular,
but all the eigenvalues

00:01:39.120 --> 00:01:41.520
have to be greater
or equal to 0.

00:01:41.520 --> 00:01:46.870
And let me show you exactly
where those matrices come from.

00:01:46.870 --> 00:01:51.180
Those matrices come
from A transpose A.

00:01:51.180 --> 00:01:54.830
If I take any matrix A,
could be rectangular.

00:01:54.830 --> 00:01:59.550
And A transpose
A will be square.

00:01:59.550 --> 00:02:02.340
A transpose A will be symmetric.

00:02:02.340 --> 00:02:08.110
And it will be at least
positive semidefinite.

00:02:08.110 --> 00:02:09.380
Why is that?

00:02:09.380 --> 00:02:13.230
This is the simple step
that is worth remembering.

00:02:13.230 --> 00:02:17.860
What's special about A
transpose A x equal lambda x?

00:02:17.860 --> 00:02:19.560
The good idea?

00:02:19.560 --> 00:02:23.640
Multiply both sides
by x transpose.

00:02:23.640 --> 00:02:26.750
Take the inner product
of both sides with x.

00:02:26.750 --> 00:02:29.900
Then I have x transpose
times the left side,

00:02:29.900 --> 00:02:33.550
is x transpose times
the right side.

00:02:33.550 --> 00:02:36.230
I'm OK with equation 2.

00:02:36.230 --> 00:02:41.240
When my S is A transpose
A, that's my S. OK.

00:02:41.240 --> 00:02:43.120
But now I look at this.

00:02:43.120 --> 00:02:48.630
That is A x in a
product with itself.

00:02:48.630 --> 00:02:52.990
That's the length
of A x squared.

00:02:52.990 --> 00:02:57.150
Any time I have y
transpose y, I'm

00:02:57.150 --> 00:02:59.610
getting the length of y squared.

00:02:59.610 --> 00:03:04.240
Here y is A x, so I'm getting
the length of A x squared.

00:03:04.240 --> 00:03:06.640
Over here, y is
x, so I'm getting

00:03:06.640 --> 00:03:08.660
the length of x squared.

00:03:08.660 --> 00:03:14.690
And you see that number
lambda is, in this equation,

00:03:14.690 --> 00:03:18.620
I have a number that
can't be negative.

00:03:18.620 --> 00:03:22.320
A number that's
positive, for sure.

00:03:22.320 --> 00:03:24.760
Because x is not the 0 vector.

00:03:24.760 --> 00:03:29.075
So lambda is never negative.

00:03:29.075 --> 00:03:32.370
A x could be the 0 vector.

00:03:32.370 --> 00:03:36.250
If we were in a singular case,
A x could be the 0 vector.

00:03:36.250 --> 00:03:39.600
In that case, I would only
learn lambda equals 0,

00:03:39.600 --> 00:03:42.570
and I'd be in this
semidefinite case.

00:03:42.570 --> 00:03:48.790
So if I want to move from
semidefinite to definite,

00:03:48.790 --> 00:03:53.530
then I must rule out
A x equals 0 there.

00:03:53.530 --> 00:03:56.050
Because that's
certainly a possibility.

00:03:56.050 --> 00:04:00.540
If I took the 0
matrix, all 0's, as A,

00:04:00.540 --> 00:04:03.140
A transpose A would
be the 0 matrix.

00:04:03.140 --> 00:04:05.460
That would be symmetric.

00:04:05.460 --> 00:04:07.920
All its eigenvalues would be 0.

00:04:07.920 --> 00:04:10.060
Would it be positive
semidefinite?

00:04:10.060 --> 00:04:11.120
Yes.

00:04:11.120 --> 00:04:11.700
Yes.

00:04:11.700 --> 00:04:14.740
All its eigenvalues
would actually be 0.

00:04:14.740 --> 00:04:18.089
Of course, that's not a
case that we are really

00:04:18.089 --> 00:04:19.140
thinking about.

00:04:19.140 --> 00:04:21.510
More often we're
in this good case

00:04:21.510 --> 00:04:25.290
where all the
eigenvalues are above 0.

00:04:25.290 --> 00:04:25.790
OK.

00:04:25.790 --> 00:04:27.690
So that's the meaning.

00:04:27.690 --> 00:04:30.830
And now the next job.

00:04:30.830 --> 00:04:34.630
How do we recognize a
positive definite matrix?

00:04:34.630 --> 00:04:36.240
It has to be symmetric.

00:04:36.240 --> 00:04:37.650
That's easy to see.

00:04:37.650 --> 00:04:41.860
But how can we tell if its
eigenvalues are positive?

00:04:41.860 --> 00:04:46.360
That's not fun because computing
eigenvalues is a big job.

00:04:49.010 --> 00:04:52.320
For a large matrix,
we take time on that.

00:04:52.320 --> 00:04:55.220
We didn't know how to do
it a little while ago.

00:04:55.220 --> 00:04:57.040
Now there are good
ways to do it,

00:04:57.040 --> 00:05:01.000
but it's not for paper
and pencil, and not for I.

00:05:01.000 --> 00:05:04.930
So how can we tell that all
the eigenvalues are positive?

00:05:04.930 --> 00:05:07.460
Well, we only want
to know their sign.

00:05:07.460 --> 00:05:10.170
We don't have to
know what they are.

00:05:10.170 --> 00:05:12.820
We don't know that we need the
number, we just want to know

00:05:12.820 --> 00:05:14.540
is it a positive number.

00:05:14.540 --> 00:05:17.550
And there are
several neat tests.

00:05:17.550 --> 00:05:18.592
Can I show you them?

00:05:21.970 --> 00:05:24.210
I'm going to have five tests.

00:05:24.210 --> 00:05:26.040
Five equivalent tests.

00:05:26.040 --> 00:05:31.050
Any one of these tests is
sufficient to make the matrix S

00:05:31.050 --> 00:05:32.310
positive definite.

00:05:32.310 --> 00:05:36.720
There is a particular S there
that I'll use as a test matrix.

00:05:36.720 --> 00:05:39.110
So there is a
symmetric matrix S.

00:05:39.110 --> 00:05:41.800
And I know it is
positive definite.

00:05:41.800 --> 00:05:43.530
But how do I know?

00:05:43.530 --> 00:05:44.150
OK.

00:05:44.150 --> 00:05:44.660
Well.

00:05:44.660 --> 00:05:48.970
So can you take
five things here?

00:05:48.970 --> 00:05:51.560
They connect all
of linear algebra.

00:05:51.560 --> 00:05:53.060
It's really beautiful.

00:05:53.060 --> 00:05:57.260
That the eigenvalues, that's
one chapter of linear algebra.

00:05:57.260 --> 00:06:00.170
The pivots are another
chapter of linear algebra.

00:06:00.170 --> 00:06:01.920
Do you remember about pivots?

00:06:01.920 --> 00:06:04.020
That's when you do elimination.

00:06:04.020 --> 00:06:06.380
So 4 is the first pivot.

00:06:06.380 --> 00:06:07.660
The first pivot.

00:06:07.660 --> 00:06:13.200
Pivot number 1 is the 4.

00:06:13.200 --> 00:06:18.500
And then when I take a multiple
of that away from that,

00:06:18.500 --> 00:06:20.320
I get a second pivot.

00:06:20.320 --> 00:06:22.620
And I'd see that
that was positive.

00:06:22.620 --> 00:06:24.320
So what's that?

00:06:24.320 --> 00:06:26.720
Maybe I take 1 and
1/2 away of this.

00:06:29.470 --> 00:06:32.060
I multiply that by
1 and 1/2, 6, 9.

00:06:32.060 --> 00:06:33.840
Subtract from 6, 10.

00:06:33.840 --> 00:06:36.190
So I actually get
a 1 down there.

00:06:36.190 --> 00:06:42.760
So pivot number 2
is a 1 in that case.

00:06:42.760 --> 00:06:43.510
Right?

00:06:43.510 --> 00:06:47.900
6, 9 taken away from
6, 10 leaves me 0, 1.

00:06:47.900 --> 00:06:48.930
OK.

00:06:48.930 --> 00:06:51.040
It passed the pivot test.

00:06:51.040 --> 00:06:54.150
Notice I didn't compute
the eigenvalues.

00:06:54.150 --> 00:06:55.430
I'm just doing other tests.

00:06:55.430 --> 00:06:57.910
Now here's another
beautiful test.

00:06:57.910 --> 00:07:00.390
It involves determinants.

00:07:00.390 --> 00:07:02.914
Now, I have to say upper.

00:07:02.914 --> 00:07:05.800
Upper left.

00:07:05.800 --> 00:07:18.580
Upper left determinants
greater than 0.

00:07:18.580 --> 00:07:21.490
What do I mean by an
upper left determinant?

00:07:21.490 --> 00:07:23.550
I look at my matrix.

00:07:23.550 --> 00:07:26.690
That's a 1 by 1 determinant.

00:07:26.690 --> 00:07:27.660
Certainly positive.

00:07:27.660 --> 00:07:29.750
That determinant is 4.

00:07:29.750 --> 00:07:32.570
Here is a 2 by 2 determinant.

00:07:32.570 --> 00:07:38.080
And that determinant is 40 minus
36, so happened to be 4 again.

00:07:38.080 --> 00:07:40.410
So the determinant
of the matrix is 4.

00:07:40.410 --> 00:07:44.320
But I also needed
the ones on the way.

00:07:44.320 --> 00:07:46.470
I can't just find
the determinant

00:07:46.470 --> 00:07:48.080
of the whole matrix.

00:07:48.080 --> 00:07:50.760
That's the last
part of this test,

00:07:50.760 --> 00:07:53.570
but I have to do all the
others as I get there.

00:07:53.570 --> 00:07:55.370
So it passes that test.

00:07:55.370 --> 00:07:55.910
Check.

00:07:55.910 --> 00:07:56.930
It works.

00:07:56.930 --> 00:07:59.500
So that test is passed.

00:07:59.500 --> 00:08:02.660
I'm doing more work than I need
to do because one test would

00:08:02.660 --> 00:08:03.980
have done the job.

00:08:03.980 --> 00:08:06.350
Now here comes another one.

00:08:06.350 --> 00:08:14.150
S is A transpose A. That's
what we looked at a minute ago.

00:08:14.150 --> 00:08:16.820
If S has this form
A transpose A.

00:08:16.820 --> 00:08:20.420
Oh, what did we
convince ourselves?

00:08:20.420 --> 00:08:25.250
We said that this was
sure to be semidefinite.

00:08:25.250 --> 00:08:29.960
And I needed some condition
to avoid A x equals 0.

00:08:29.960 --> 00:08:32.420
There was the possibility
of A x equals 0.

00:08:32.420 --> 00:08:35.450
I'll just bring that down.

00:08:35.450 --> 00:08:39.299
You remember we started
there and ended up here.

00:08:39.299 --> 00:08:43.070
And if A x was 0
then lambda was 0.

00:08:43.070 --> 00:08:45.360
We were in the
semidefinite case.

00:08:45.360 --> 00:08:47.320
So I have to avoid that.

00:08:47.320 --> 00:08:56.205
So I have to say when A
has independent columns.

00:09:03.910 --> 00:09:10.000
And I think I could factor that
matrix S into A transpose A.

00:09:10.000 --> 00:09:11.460
I'm sure I could.

00:09:11.460 --> 00:09:13.630
And get independent columns.

00:09:13.630 --> 00:09:16.410
And it would pass test 4.

00:09:16.410 --> 00:09:18.450
I want to go on to test 5.

00:09:18.450 --> 00:09:22.070
Which really, in a way, is
the definition, the best

00:09:22.070 --> 00:09:24.350
definition, of
positive definite.

00:09:24.350 --> 00:09:31.110
So if I took number 5,
it's the energy definition.

00:09:31.110 --> 00:09:34.350
So can I tell you
what that means?

00:09:34.350 --> 00:09:38.100
I mean that x transpose Sx.

00:09:40.960 --> 00:09:45.040
If I take my matrix S that I'm
testing for positive definite,

00:09:45.040 --> 00:09:47.050
I multiply on the
right by any vector

00:09:47.050 --> 00:09:50.490
x, any x, and on the
left by x transpose.

00:09:50.490 --> 00:09:52.890
Well, I get a number.

00:09:52.890 --> 00:09:54.030
S is a matrix.

00:09:54.030 --> 00:09:55.620
Sx is a vector.

00:09:55.620 --> 00:09:56.890
Inner product with a vector.

00:09:56.890 --> 00:09:58.170
I get a number.

00:09:58.170 --> 00:10:03.475
And that number should
be positive for all x.

00:10:07.190 --> 00:10:09.270
Oh, I have to make
one exception.

00:10:09.270 --> 00:10:13.630
If x is the 0 vector, then
of course that answer is 0.

00:10:13.630 --> 00:10:19.930
All x except the 0 vector.

00:10:19.930 --> 00:10:21.410
OK.

00:10:21.410 --> 00:10:24.820
So that would be a
way to-- another test.

00:10:24.820 --> 00:10:29.040
And this is associated in
applications with energy.

00:10:29.040 --> 00:10:32.980
So I call this the
energy test, or really

00:10:32.980 --> 00:10:36.420
the energy definition,
of positive definite.

00:10:36.420 --> 00:10:38.470
x transpose Sx.

00:10:38.470 --> 00:10:41.240
I'd like to apply that test.

00:10:41.240 --> 00:10:42.690
So you'll see what does it mean.

00:10:42.690 --> 00:10:49.760
Now we're looking at all x
to this particular example.

00:10:49.760 --> 00:10:53.010
But I won't throw
away this board here.

00:10:53.010 --> 00:10:58.150
You see eigenvalues, pivots,
determinants, A transpose A,

00:10:58.150 --> 00:11:00.370
and energy.

00:11:00.370 --> 00:11:03.260
Really all the pieces
of linear algebra.

00:11:03.260 --> 00:11:06.570
A transpose A. We'll
see it more and more.

00:11:06.570 --> 00:11:09.600
It comes up in least squares.

00:11:09.600 --> 00:11:14.680
If I have a general matrix
A, it's not even square.

00:11:14.680 --> 00:11:16.350
It doesn't have
great properties.

00:11:16.350 --> 00:11:19.280
But when I compute
A transpose A,

00:11:19.280 --> 00:11:22.690
then I get a symmetric matrix.

00:11:22.690 --> 00:11:27.270
And now I know also a
positive semidefinite.

00:11:27.270 --> 00:11:33.420
And with a little bit more
positive definite matrix.

00:11:33.420 --> 00:11:34.190
OK.

00:11:34.190 --> 00:11:39.680
By the way, are there five
tests for semidefinite matrices?

00:11:39.680 --> 00:11:40.180
Yes.

00:11:40.180 --> 00:11:43.060
There are five similar tests.

00:11:43.060 --> 00:11:46.030
All eigenvalues
greater or equal to 0.

00:11:46.030 --> 00:11:48.660
All pivots greater
or equal to 0.

00:11:48.660 --> 00:11:55.470
I can go down this and just
allow that borderline case

00:11:55.470 --> 00:11:57.880
that brings in semidefinite.

00:11:57.880 --> 00:11:59.080
I won't do that.

00:11:59.080 --> 00:12:04.510
Let me take my matrix S.
That small, example matrix.

00:12:04.510 --> 00:12:06.550
And apply the energy test.

00:12:06.550 --> 00:12:07.940
OK.

00:12:07.940 --> 00:12:09.320
So I'm looking at energy.

00:12:12.410 --> 00:12:13.880
So I'm looking at x.

00:12:13.880 --> 00:12:25.490
That's x1 x2, times my matrix
4, 6, 6, 10, times x1 x2.

00:12:25.490 --> 00:12:26.400
That's the energy.

00:12:26.400 --> 00:12:29.960
That's my x transpose Sx.

00:12:29.960 --> 00:12:31.620
x transpose Sx.

00:12:31.620 --> 00:12:34.160
Is that what we
wanted to compute?

00:12:34.160 --> 00:12:34.860
Yes.

00:12:34.860 --> 00:12:37.470
x transpose Sx.

00:12:37.470 --> 00:12:39.030
Now, can I compute that?

00:12:39.030 --> 00:12:40.980
Yes.

00:12:40.980 --> 00:12:42.910
It's a matrix multiplication.

00:12:42.910 --> 00:12:44.670
Nothing magical here.

00:12:44.670 --> 00:12:47.030
But when I do, I'll
show you the shortcut.

00:12:47.030 --> 00:12:51.060
When I do that, a 4
x1 is going to appear,

00:12:51.060 --> 00:12:54.850
and it'll be multiplied
by that x1 over there.

00:12:54.850 --> 00:12:58.040
I'll get a 4 x1 squared.

00:12:58.040 --> 00:13:03.270
And then I'll have a 6 x2
that's multiplying that x1.

00:13:03.270 --> 00:13:07.110
So there's a 6 x1 x2.

00:13:07.110 --> 00:13:09.710
And now from this.

00:13:09.710 --> 00:13:11.230
That was the first component.

00:13:11.230 --> 00:13:14.490
And now I have 6 x1 and 10 x2.

00:13:14.490 --> 00:13:15.920
Multiply an x2.

00:13:15.920 --> 00:13:19.830
Well, that's another 6 x1 x2.

00:13:19.830 --> 00:13:24.230
And the 10, we'll
multiply x2 and x2.

00:13:24.230 --> 00:13:26.290
x2 squared.

00:13:26.290 --> 00:13:28.390
I did that quickly.

00:13:28.390 --> 00:13:32.950
But the result is
just easy to see.

00:13:32.950 --> 00:13:37.300
The 4, 6, 6, 10 show
up in the squares.

00:13:37.300 --> 00:13:40.710
The diagonal 4 and 10
show up in the squares.

00:13:40.710 --> 00:13:46.300
And the off diagonal
6, which doubles to 12,

00:13:46.300 --> 00:13:50.860
shows up in the x1
x2, the cross term.

00:13:50.860 --> 00:13:51.650
OK.

00:13:51.650 --> 00:13:57.410
Now why should that-- so that's
a number for every x1 and x2.

00:13:57.410 --> 00:14:01.300
Suppose x1 is 1 and x2 is 1.

00:14:01.300 --> 00:14:05.200
Then the number I get is
4, plus 6, plus 6, plus 10.

00:14:05.200 --> 00:14:07.920
That's probably 26.

00:14:07.920 --> 00:14:09.690
It's positive.

00:14:09.690 --> 00:14:13.180
What if x1 is 1--
let me try this.

00:14:13.180 --> 00:14:17.790
x1 is 1 and x2 is minus 1.

00:14:17.790 --> 00:14:20.340
Do I still get a
positive energy?

00:14:20.340 --> 00:14:23.550
So my vector is 1 minus 1.

00:14:23.550 --> 00:14:25.750
So I get 4.

00:14:25.750 --> 00:14:30.420
Now, because of that, I
have minus 6, and minus 6,

00:14:30.420 --> 00:14:34.790
and 10, from the x2 squared.

00:14:34.790 --> 00:14:36.710
And that's 14 minus 12.

00:14:36.710 --> 00:14:38.197
That's 2.

00:14:38.197 --> 00:14:38.780
It's positive.

00:14:41.330 --> 00:14:44.770
Well, I tested two vectors.

00:14:44.770 --> 00:14:48.800
I tested the 1, 1 vector
and the 1, minus 1 vector.

00:14:48.800 --> 00:14:53.300
But you have to know
that for every vector x,

00:14:53.300 --> 00:14:55.660
this does turn out
to be positive.

00:14:55.660 --> 00:14:57.910
And I can show you
that by something

00:14:57.910 --> 00:15:01.640
called completing the square.

00:15:01.640 --> 00:15:04.520
It's not what I plan to do.

00:15:04.520 --> 00:15:09.600
But the beauty is we now
understand this energy test.

00:15:09.600 --> 00:15:15.230
What it means to take x
transpose Sx, write it out,

00:15:15.230 --> 00:15:18.520
and ask is it always positive.

00:15:18.520 --> 00:15:20.290
Is it always positive?

00:15:20.290 --> 00:15:20.790
OK.

00:15:20.790 --> 00:15:24.250
So that's the fifth,
number 5, test.

00:15:24.250 --> 00:15:27.250
But I think of it really
as the definition.

00:15:27.250 --> 00:15:30.530
And it means-- can
I draw a picture?

00:15:30.530 --> 00:15:32.050
Here is x1.

00:15:32.050 --> 00:15:33.410
Here's x2.

00:15:33.410 --> 00:15:36.470
And now I'm going to--
this is my function.

00:15:39.070 --> 00:15:40.490
x transpose A x.

00:15:40.490 --> 00:15:42.310
My energy.

00:15:42.310 --> 00:15:49.110
If I graph that, I have an
x, and a y, and a function z.

00:15:49.110 --> 00:15:51.320
That function of x and y.

00:15:51.320 --> 00:15:53.450
What kind of a
graph does it have?

00:15:53.450 --> 00:15:57.850
When x1 and x2
are 0, it's there.

00:15:57.850 --> 00:16:02.420
When x1 and x2 move away
from 0, it goes positive.

00:16:02.420 --> 00:16:05.630
That graph is like that.

00:16:05.630 --> 00:16:06.670
It's sort of a bowl.

00:16:10.060 --> 00:16:12.180
And I have a minimum.

00:16:16.370 --> 00:16:20.850
One of the main application
of derivatives in calculus

00:16:20.850 --> 00:16:24.760
is to find the
test for a minimum,

00:16:24.760 --> 00:16:27.810
and decide minimum or maximum.

00:16:27.810 --> 00:16:29.570
Minimum or maximum.

00:16:29.570 --> 00:16:31.410
And you remember the
second derivative

00:16:31.410 --> 00:16:33.780
decides a minimum or maximum.

00:16:33.780 --> 00:16:36.570
Positive second
derivative, minimum.

00:16:36.570 --> 00:16:38.840
Negative second
derivative, maximum.

00:16:38.840 --> 00:16:41.840
It tells you about the
bending of the curve.

00:16:41.840 --> 00:16:46.840
Well, we're in two
dimensions now,

00:16:46.840 --> 00:16:50.090
with a function
of two variables.

00:16:50.090 --> 00:16:52.580
This is multivariable calculus.

00:16:52.580 --> 00:16:57.030
So what becomes positive
second derivative,

00:16:57.030 --> 00:17:00.190
becomes positive
definite matrix.

00:17:00.190 --> 00:17:03.306
A matrix of second derivatives.

00:17:03.306 --> 00:17:06.950
This is the whole
subject of optimization.

00:17:06.950 --> 00:17:09.839
Maximizing,
minimizing, comes here.

00:17:09.839 --> 00:17:10.339
OK.

00:17:10.339 --> 00:17:13.140
That's for another day.

00:17:13.140 --> 00:17:14.819
I just would like
to tell you one more

00:17:14.819 --> 00:17:17.490
thing about positive
definite matrices.

00:17:17.490 --> 00:17:21.530
I got a book in the mail
which could be quite valuable.

00:17:21.530 --> 00:17:24.420
It's a little
paperback, and the title

00:17:24.420 --> 00:17:35.140
is Frequently Asked Questions in
Interviews for Financial Math.

00:17:35.140 --> 00:17:36.460
Being a Quant.

00:17:36.460 --> 00:17:37.560
Going to Wall Street.

00:17:37.560 --> 00:17:39.610
Becoming rich.

00:17:39.610 --> 00:17:43.580
So they don't give you
all the money right away.

00:17:43.580 --> 00:17:47.770
They make you show that
you know something.

00:17:47.770 --> 00:17:52.120
And so they ask a
few math questions.

00:17:52.120 --> 00:17:57.630
And the first question was--
I was happy to see this.

00:17:57.630 --> 00:18:04.390
The first question asked,
when is this matrix

00:18:04.390 --> 00:18:06.670
positive definite?

00:18:10.860 --> 00:18:11.360
OK.

00:18:11.360 --> 00:18:12.560
Can you see that matrix?

00:18:12.560 --> 00:18:14.370
1 is on the diagonal.

00:18:14.370 --> 00:18:15.910
Those are correlation.

00:18:15.910 --> 00:18:17.640
This is a correlation matrix.

00:18:17.640 --> 00:18:19.780
That's why it's
important in finance.

00:18:19.780 --> 00:18:21.930
It might be the
three correlations

00:18:21.930 --> 00:18:28.140
of bonds, and stocks,
and foreign exchange.

00:18:28.140 --> 00:18:32.350
So each one is
correlated to itself

00:18:32.350 --> 00:18:35.590
with a full correlation of 1.

00:18:35.590 --> 00:18:38.470
But there'll be a correlation
between bonds and stocks

00:18:38.470 --> 00:18:40.950
going up together,
but not perfectly

00:18:40.950 --> 00:18:43.770
together, by some number a.

00:18:43.770 --> 00:18:47.810
And bonds and foreign
exchange with some number b.

00:18:47.810 --> 00:18:52.630
Stocks and foreign
exchange, some number c.

00:18:52.630 --> 00:18:55.510
So that's the matrix
of correlations.

00:18:55.510 --> 00:18:59.810
And the key point is,
it is positive definite.

00:18:59.810 --> 00:19:03.520
So the question when
you go to Wall Street

00:19:03.520 --> 00:19:05.570
to apply for the money.

00:19:05.570 --> 00:19:12.130
If you're asked what's the test
on those numbers a, b, c, to

00:19:12.130 --> 00:19:18.060
have a positive definite,
proper correlation matrix?

00:19:18.060 --> 00:19:20.920
I would suggest the
determinant test.

00:19:20.920 --> 00:19:24.180
The determinant test, if
I'm given a small matrix,

00:19:24.180 --> 00:19:25.950
I'll just do the determinants.

00:19:25.950 --> 00:19:27.690
So that determinant is 1.

00:19:27.690 --> 00:19:29.030
No problem.

00:19:29.030 --> 00:19:32.600
This determinant, what's
the 2 by 2 determinant?

00:19:32.600 --> 00:19:34.530
1 minus a squared.

00:19:34.530 --> 00:19:38.330
So 1 minus a squared
has to be positive.

00:19:38.330 --> 00:19:40.450
I'm doing the determinant test.

00:19:40.450 --> 00:19:43.260
And what's the 3
by 3 determinant?

00:19:43.260 --> 00:19:45.930
1 from the diagonal.

00:19:45.930 --> 00:19:49.770
And I have an acb and an acb.

00:19:49.770 --> 00:19:57.250
I think I have two acb's
from the three terms.

00:19:57.250 --> 00:20:02.230
Now, those terms
have the plus signs.

00:20:02.230 --> 00:20:05.020
And now I have some
with a minus sign,

00:20:05.020 --> 00:20:06.850
which better not be too big.

00:20:06.850 --> 00:20:10.290
That's the whole point on
positive definite matrices.

00:20:10.290 --> 00:20:15.450
The off diagonal is not allowed
to overrun the diagonal.

00:20:15.450 --> 00:20:19.550
The diagonal should be
the biggest numbers.

00:20:19.550 --> 00:20:20.140
OK.

00:20:20.140 --> 00:20:25.280
So I saw that a squared
had to be below 1.

00:20:25.280 --> 00:20:27.730
But now what's the
determinant test?

00:20:27.730 --> 00:20:30.910
I think this has to
be bigger than what

00:20:30.910 --> 00:20:33.090
I'm getting from
this direction, which

00:20:33.090 --> 00:20:36.260
is a b squared, and a c
squared, and an a squared.

00:20:36.260 --> 00:20:37.410
Oh, look at that.

00:20:37.410 --> 00:20:40.530
a squared, b squared,
and c squared.

00:20:43.260 --> 00:20:45.810
That would be the answer.

00:20:45.810 --> 00:20:48.700
That first test there.

00:20:48.700 --> 00:20:51.340
Second test there.

00:20:51.340 --> 00:20:55.170
Well, the easy test was
just 1, is positive.

00:20:55.170 --> 00:20:59.250
So really, that's what
they're looking for.

00:20:59.250 --> 00:21:01.710
That would be the
test, those numbers.

00:21:01.710 --> 00:21:08.130
So abc can't be too large
or that would begin to fail.

00:21:08.130 --> 00:21:09.180
Good.

00:21:09.180 --> 00:21:14.260
So positive definite matrices
have lots of applications.

00:21:14.260 --> 00:21:15.870
Here was minimum.

00:21:15.870 --> 00:21:19.560
Here was correlation
matrices and finance.

00:21:19.560 --> 00:21:21.380
Many, many other places.

00:21:21.380 --> 00:21:28.160
Let me just bring
down the five tests.

00:21:28.160 --> 00:21:31.250
Eigenvalues, pivots,
determinants, A transpose A,

00:21:31.250 --> 00:21:33.290
and energy.

00:21:33.290 --> 00:21:34.670
And I'll stop there.

00:21:34.670 --> 00:21:36.340
Thank you.