WEBVTT

00:00:05.688 --> 00:00:08.300
PROFESSOR: Hi, guys.

00:00:08.300 --> 00:00:10.830
My name is Nikola,
and in this video,

00:00:10.830 --> 00:00:12.300
we're going to
work out an example

00:00:12.300 --> 00:00:14.680
of an orthogonal
projection matrix.

00:00:14.680 --> 00:00:18.540
Specifically, we are gonna
compute the projection matrix

00:00:18.540 --> 00:00:22.100
onto the plane given by the
equation x plus y minus z

00:00:22.100 --> 00:00:23.480
equals 0.

00:00:23.480 --> 00:00:27.060
So before we start,
let me just recall

00:00:27.060 --> 00:00:29.350
what a projection matrix is.

00:00:29.350 --> 00:00:35.170
So you've seen this sketch
here a million times already.

00:00:35.170 --> 00:00:42.000
A projection matrix takes any
vector in three-space-- well,

00:00:42.000 --> 00:00:44.750
just in this case, we are
dealing with a three-space--

00:00:44.750 --> 00:00:49.640
and projects it
down onto the plane,

00:00:49.640 --> 00:00:52.840
a two-dimensional
subspace of R^3.

00:00:52.840 --> 00:00:56.850
So I'll give you a few
moments to consider

00:00:56.850 --> 00:00:58.120
the problem for yourselves.

00:00:58.120 --> 00:01:00.640
And then you'll
see my take on it.

00:01:10.657 --> 00:01:12.900
Hi again.

00:01:12.900 --> 00:01:19.120
So in lecture, Professor Strang
derived, in meticulous detail,

00:01:19.120 --> 00:01:21.990
the formula for the
projection matrix.

00:01:21.990 --> 00:01:27.850
So it was given by the
following slightly complicated

00:01:27.850 --> 00:01:28.900
expression.

00:01:28.900 --> 00:01:36.240
It's A times A
transpose A inverse A

00:01:36.240 --> 00:01:40.050
transpose where A
is a matrix that

00:01:40.050 --> 00:01:45.320
somehow encodes the subspace
we're projecting on.

00:01:45.320 --> 00:01:53.820
In particular, A has, as
its columns, a_1, a_2,

00:01:53.820 --> 00:01:57.510
I'm going to denote them--
a basis for the plane we're

00:01:57.510 --> 00:02:00.080
projecting on.

00:02:00.080 --> 00:02:03.340
So essentially,
what we need to do

00:02:03.340 --> 00:02:08.979
is find two such vectors
that span the plane and start

00:02:08.979 --> 00:02:12.490
computing with a matrix.

00:02:12.490 --> 00:02:13.960
This is fairly straightforward.

00:02:18.320 --> 00:02:24.220
One choice that works,
for example, is [1, -1, 0]

00:02:24.220 --> 00:02:31.970
for the first column, and [1, 0,
 1] for the second column.

00:02:35.430 --> 00:02:51.500
And let me write out the
matrix A. So in the formula,

00:02:51.500 --> 00:02:54.640
the slightly more
complicated combination

00:02:54.640 --> 00:03:00.270
is A transpose A inverse, so let
me compute that first for you.

00:03:00.270 --> 00:03:08.900
So A transpose A
is a 2 by 2 matrix.

00:03:08.900 --> 00:03:18.780
And it's not so hard to figure
out that it's 2 and 1; 1, 2.

00:03:18.780 --> 00:03:29.100
Now we shall invert it
using the familiar formula.

00:03:29.100 --> 00:03:31.190
1 over the determinant.

00:03:31.190 --> 00:03:34.260
2 times 2 minus 1 is 3.

00:03:34.260 --> 00:03:40.450
And so we switch the
diagonal entries,

00:03:40.450 --> 00:03:42.533
and we flip the signs of
the off-diagonal ones.

00:03:45.410 --> 00:03:46.620
Right.

00:03:46.620 --> 00:03:53.240
And therefore, projection
matrix is given by the following

00:03:53.240 --> 00:04:12.140
product of matrices:
...1/3, [2, -1; -1,

00:04:12.140 --> 00:04:22.239
2] and then transpose of A,
which is [1, -1, 0; 1, 0, 1].

00:04:25.650 --> 00:04:28.340
I'm gonna carry out
this multiplication

00:04:28.340 --> 00:04:31.650
in inhumanly fast fashion.

00:04:31.650 --> 00:04:38.140
So I'm just gonna write down
the answer, which is 1/3

00:04:38.140 --> 00:04:45.070
[2, -1, 1; -1, 2, 2; 1, 1, 1].

00:04:48.680 --> 00:04:51.740
So what you can
do now is-- well,

00:04:51.740 --> 00:04:56.680
you can check whether this
answer actually makes sense.

00:04:56.680 --> 00:04:59.540
One thing you can
do is just-- well,

00:04:59.540 --> 00:05:03.770
a projection matrix is
supposed to take the normal

00:05:03.770 --> 00:05:06.090
to the plane down to 0.

00:05:06.090 --> 00:05:14.090
So you can just multiply P and
the normal vector [1, 1, -1].

00:05:14.090 --> 00:05:18.700
And if you get 0, maybe
you've done a good job.

00:05:18.700 --> 00:05:21.940
Another curious thing that I
would like to point out here

00:05:21.940 --> 00:05:26.310
is: so you see we had
lots of freedom choosing

00:05:26.310 --> 00:05:31.450
the matrix A. We could have
chosen any two columns that

00:05:31.450 --> 00:05:36.060
span the subspace,
that spans the plane.

00:05:36.060 --> 00:05:38.660
The beautiful thing about
it is that in the end,

00:05:38.660 --> 00:05:40.130
we'll get the same answer.

00:05:44.510 --> 00:05:46.880
So I hope there
will be many of you

00:05:46.880 --> 00:05:51.870
who would say, hey, there is an
easier way to do the problem.

00:05:51.870 --> 00:05:53.600
And I'll agree
with these people.

00:05:53.600 --> 00:06:01.590
So let's see what would
be an easier approach.

00:06:01.590 --> 00:06:08.450
Well, let's go back
to the sketch here.

00:06:08.450 --> 00:06:11.290
And let's make the
following observation,

00:06:11.290 --> 00:06:16.970
that any vector is a
sum of two components.

00:06:16.970 --> 00:06:22.540
The first component is its
projection onto the plane.

00:06:22.540 --> 00:06:25.820
And the other component
is its projection

00:06:25.820 --> 00:06:29.040
onto the orthogonal complement
of the plane, in this case,

00:06:29.040 --> 00:06:31.620
onto the normal vector
through the plane.

00:06:31.620 --> 00:06:35.050
So in the language
of linear algebra,

00:06:35.050 --> 00:06:41.660
this is just b equals
to its projection

00:06:41.660 --> 00:06:45.850
onto the plane plus
its projection-- I'm

00:06:45.850 --> 00:06:48.760
gonna call it P_N-- onto
the orthogonal complement

00:06:48.760 --> 00:06:49.700
of the plane.

00:06:52.650 --> 00:06:56.580
I'm gonna suggestively
write here the identity

00:06:56.580 --> 00:06:59.520
matrix so that you
can immediately

00:06:59.520 --> 00:07:01.510
read off a matrix equality.

00:07:01.510 --> 00:07:05.100
Associated with this
equality here, it's

00:07:05.100 --> 00:07:10.770
the identity equals P plus P_N.

00:07:10.770 --> 00:07:14.410
And therefore, the
projection matrix

00:07:14.410 --> 00:07:17.930
is just the identity minus
the projection matrix

00:07:17.930 --> 00:07:20.510
onto the normal vector.

00:07:20.510 --> 00:07:27.450
Now, this object here, P_N, is
much easier to compute, well,

00:07:27.450 --> 00:07:28.910
for two reasons.

00:07:28.910 --> 00:07:33.150
First one is that projecting
onto a one-dimensional subspace

00:07:33.150 --> 00:07:36.210
is infinitely easier
than projecting

00:07:36.210 --> 00:07:38.350
onto a higher-dimensional
subspace.

00:07:38.350 --> 00:07:43.830
And second, we already
have-- well, immediately we

00:07:43.830 --> 00:07:46.080
can read off from the
equation of the plane what

00:07:46.080 --> 00:07:47.750
the normal vector is.

00:07:47.750 --> 00:07:52.570
So we don't have
derive these guys.

00:07:52.570 --> 00:07:56.250
We don't have to do
what we did here.

00:07:56.250 --> 00:08:12.401
So essentially, P_N will be
N N transpose N inverse N

00:08:12.401 --> 00:08:12.900
transpose.

00:08:16.050 --> 00:08:30.730
And that's equal to [1, 1, -1]--
N transpose N inverse,

00:08:30.730 --> 00:08:33.669
this is just a number.

00:08:33.669 --> 00:08:37.890
It's 1 over the magnitude
of the normal vector,

00:08:37.890 --> 00:08:41.766
so that's-- then, the
magnitude squared, so that's 3.

00:08:41.766 --> 00:08:45.105
And 1, 1, -1.

00:08:48.510 --> 00:08:55.030
I'm gonna write the answer here.

00:08:55.030 --> 00:09:13.953
It's 1/3, 1, 1, -1; 1,
1, -1; and -1, 1, 1.

00:09:25.070 --> 00:09:28.773
And in order to get the
projection matrix-- yes?

00:09:28.773 --> 00:09:30.505
AUDIENCE: [INAUDIBLE].

00:09:30.505 --> 00:09:32.430
PROFESSOR: Oh.

00:09:32.430 --> 00:09:33.270
Thank you.

00:09:33.270 --> 00:09:34.320
Thank you.

00:09:34.320 --> 00:09:37.520
And in order to get
the projection matrix,

00:09:37.520 --> 00:09:41.750
we just subtract from the
identity this expression.

00:09:41.750 --> 00:09:48.170
And you can confirm that it's--
we get the same answer as here.

00:09:48.170 --> 00:09:49.878
I think we're done here.