Example using orthogonal change-of-basis matrix to find transformation matrix

WEBVTT
Kind: captions
Language: en

00:00:00.640 --> 00:00:04.290
We learned in the last video
that if I have some matrix--

00:00:04.290 --> 00:00:10.490
let's call it C, Let's say
it's an n by k matrix.

00:00:10.490 --> 00:00:13.790
And all of matrix C's columns--
let's say this is

00:00:13.790 --> 00:00:19.500
column 1, column 2, all the way
through column k-- if each

00:00:19.500 --> 00:00:23.955
of these columns vectors form
an orthonormal set-- so, let

00:00:23.955 --> 00:00:28.850
me write this-- columns are
orthonormal set, or the set of

00:00:28.850 --> 00:00:34.210
columns are an orthonormal set,
we showed in the last

00:00:34.210 --> 00:00:40.040
video that if I multiply C
transpose times C, I get the

00:00:40.040 --> 00:00:41.090
identity matrix.

00:00:41.090 --> 00:00:44.440
I get the k by k identity
matrix.

00:00:44.440 --> 00:00:46.870
I get the identity matrix of k,
because it's going to be k

00:00:46.870 --> 00:00:49.250
by n, times n by k.

00:00:49.250 --> 00:00:51.920
And we saw how everything else
cancels out, except right

00:00:51.920 --> 00:00:52.380
along the diagonal.

00:00:52.380 --> 00:00:54.840
And then we were just
multiplying the vectors times

00:00:54.840 --> 00:00:57.040
themselves, and they're
all unit vectors.

00:00:57.040 --> 00:00:59.680
So you get the square of their
lengths and you get 1's down

00:00:59.680 --> 00:01:00.150
the diagonal.

00:01:00.150 --> 00:01:01.830
We saw that in the last video.

00:01:01.830 --> 00:01:06.840
Now what happens if
k is equal to n?

00:01:06.840 --> 00:01:09.980
So what happens if
k is equal to n?

00:01:09.980 --> 00:01:12.345
Well, then this guy is going
to be a square matrix.

00:01:17.635 --> 00:01:19.950
And if he's a square matrix,
what else do we know about it?

00:01:19.950 --> 00:01:23.470
Well, we know that these guys
form an orthonormal set.

00:01:23.470 --> 00:01:25.750
We saw, I think it was two or
three videos ago, that that

00:01:25.750 --> 00:01:27.910
means that the columns are
linearly independent.

00:01:27.910 --> 00:01:32.420
So we also know that we have
linearly independent columns.

00:01:32.420 --> 00:01:34.880
And we've seen this many,
many times before.

00:01:34.880 --> 00:01:37.370
If we have a square matrix
with linearly independent

00:01:37.370 --> 00:01:40.000
columns, it means that
C is invertible.

00:01:45.030 --> 00:01:48.450
It also means, if we have n of
these, it also means that

00:01:48.450 --> 00:01:52.570
these columns, or these column
vectors, if they were in a

00:01:52.570 --> 00:01:55.650
set, then that set would
be a basis for Rn.

00:01:55.650 --> 00:01:57.590
So I'll just write that on the
side, just because it, you

00:01:57.590 --> 00:02:02.950
know, it also would mean that,
you know, c1, c2, all the way

00:02:02.950 --> 00:02:07.210
through cn, because we're saying
n is equal to k, would

00:02:07.210 --> 00:02:12.540
be a basis for Rn.

00:02:12.540 --> 00:02:14.200
But we'll leave that on
the side for now.

00:02:14.200 --> 00:02:15.950
It's just worth pointing out.

00:02:15.950 --> 00:02:18.230
Now if C is invertible,
what does that mean?

00:02:18.230 --> 00:02:22.180
That means that there's some C
inverse that exists, such that

00:02:22.180 --> 00:02:27.840
C inverse times C is equal to
the n by n identity matrix.

00:02:27.840 --> 00:02:30.210
In this case k and n are equal
to the same thing, so let's

00:02:30.210 --> 00:02:32.990
just replace that n,
that k with an n.

00:02:32.990 --> 00:02:35.350
Now these two statements
look very similar.

00:02:35.350 --> 00:02:38.850
If the columns are an
orthonormal set, and it's an n

00:02:38.850 --> 00:02:42.940
by n matrix, then we learned
in the last video that C

00:02:42.940 --> 00:02:47.700
transpose times C is equal to
the n by n identity matrix.

00:02:47.700 --> 00:02:50.350
And we also know, since it's a
square matrix with linearly

00:02:50.350 --> 00:02:53.050
independent columns, that
C is invertible.

00:02:53.050 --> 00:03:01.140
So, in this situation where you
have n by n matrix whose

00:03:01.140 --> 00:03:16.260
columns form an orthonormal
set, then, well, C inverse

00:03:16.260 --> 00:03:18.290
must be equal to C transpose.

00:03:18.290 --> 00:03:21.275
I mean, you can just say, look,
something times C is

00:03:21.275 --> 00:03:21.920
equal to the identity matrix.

00:03:21.920 --> 00:03:23.380
Something times C is the
identity matrix.

00:03:23.380 --> 00:03:26.190
These somethings must
be the same thing.

00:03:26.190 --> 00:03:30.800
Then C inverse is equal
to C transpose.

00:03:30.800 --> 00:03:32.910
And that is a huge time saver.

00:03:32.910 --> 00:03:35.230
If we can assume that these,
this is a square matrix with

00:03:35.230 --> 00:03:36.510
an orthonormal set.

00:03:36.510 --> 00:03:39.130
Because finding an inverse
of a matrix is painful,

00:03:39.130 --> 00:03:41.870
especially if you get,
you know, beyond, you

00:03:41.870 --> 00:03:43.100
know, n equals 3.

00:03:43.100 --> 00:03:45.280
If you have to find the inverse
of a, I don't know, 10

00:03:45.280 --> 00:03:47.130
by 10 matrix, that would
take you forever.

00:03:47.130 --> 00:03:50.120
But to find the transpose of a
10 by 10 matrix, a lot easier.

00:03:50.120 --> 00:03:52.920
You just swap the rows
and the columns.

00:03:52.920 --> 00:03:57.960
So let's see if we can apply
this newly found insight to

00:03:57.960 --> 00:04:02.130
simplify some problems that
we've tackled in the past.

00:04:02.130 --> 00:04:10.790
So I have up here some
vectors, v1, v2, v3.

00:04:10.790 --> 00:04:13.740
And let's say that we-- let me
copy and paste these so I can

00:04:13.740 --> 00:04:15.205
use them below, because
I think that

00:04:15.205 --> 00:04:17.839
might be more useful.

00:04:17.839 --> 00:04:20.440
Let me copy them and then let
me paste them and put them

00:04:20.440 --> 00:04:21.690
right down here.

00:04:24.610 --> 00:04:26.100
We have these vectors here.

00:04:26.100 --> 00:04:28.900
I'll leave it for you to verify
that they all are unit

00:04:28.900 --> 00:04:31.570
vectors, and that taken
together they form an

00:04:31.570 --> 00:04:33.590
orthonormal set, or that
they would be an

00:04:33.590 --> 00:04:35.410
orthonormal basis for R3.

00:04:35.410 --> 00:04:38.260
And however you want to view it,
you could verify that on

00:04:38.260 --> 00:04:39.050
your own time.

00:04:39.050 --> 00:04:42.730
But what I want to do in this
video is construct an

00:04:42.730 --> 00:04:45.470
interesting linear
transformation in R3.

00:04:45.470 --> 00:04:49.560
So let's say I have the plane
formed by v1 and v2.

00:04:49.560 --> 00:04:51.300
v1 and v2 are going to
be orthogonal to

00:04:51.300 --> 00:04:51.970
each other as well.

00:04:51.970 --> 00:04:53.830
This is an orthonormal set.

00:04:53.830 --> 00:04:58.850
So v1 and v2 are orthogonal.

00:04:58.850 --> 00:05:01.380
Let's say that this is v1-- and
I'm not drawing what they

00:05:01.380 --> 00:05:01.960
actually are.

00:05:01.960 --> 00:05:05.320
I'm just kind of doing a
abstract visual representation

00:05:05.320 --> 00:05:09.150
of it. v1, v2, they're going
to span some plane.

00:05:09.150 --> 00:05:12.090
So let me draw the plane
as best as I can.

00:05:12.090 --> 00:05:14.650
So if you take all of the linear
combinations of v1 and

00:05:14.650 --> 00:05:17.320
v2, it's going to be
a plane in R3.

00:05:17.320 --> 00:05:20.260
So that's my plane, and we
know it goes off in every

00:05:20.260 --> 00:05:21.500
direction infinitely.

00:05:21.500 --> 00:05:23.900
But this is what
it looks like.

00:05:23.900 --> 00:05:26.230
We're going to have the
0 vector in it.

00:05:26.230 --> 00:05:33.125
And let me just call my plane,
this plane, let me call it,

00:05:33.125 --> 00:05:37.020
it's going to be some subspace V
in R3, which is equal to the

00:05:37.020 --> 00:05:41.590
span of v1 and v2.

00:05:41.590 --> 00:05:44.220
Now v3 is orthogonal to
both of these guys.

00:05:44.220 --> 00:05:47.160
So let me just draw
v3 here for fun.

00:05:47.160 --> 00:05:48.870
So maybe v3 looks something
like this.

00:05:48.870 --> 00:05:51.090
It's orthogonal to both of these
vectors, so it's going

00:05:51.090 --> 00:05:52.350
to be orthogonal to
all of the linear

00:05:52.350 --> 00:05:53.960
combinations of these guys.

00:05:53.960 --> 00:06:00.430
So if you view that the plane is
V, then the line spanned by

00:06:00.430 --> 00:06:03.970
v3, if you imagine it that way,
would be the orthogonal

00:06:03.970 --> 00:06:05.110
complement of your plane.

00:06:05.110 --> 00:06:10.650
But let me just draw v3 here.
v3 would be a member of the

00:06:10.650 --> 00:06:12.895
orthogonal complement, or the
orthogonal complement would be

00:06:12.895 --> 00:06:14.170
the line spanned by v3.

00:06:14.170 --> 00:06:16.090
That's all a little
bit of review.

00:06:16.090 --> 00:06:18.380
Now let's talk about the linear
transformation that I

00:06:18.380 --> 00:06:20.540
want to construct
in this video.

00:06:20.540 --> 00:06:23.540
I want to construct a linear
transformation in R3--

00:06:23.540 --> 00:06:27.520
remember, we're dealing with
R3 right here-- that

00:06:27.520 --> 00:06:31.395
essentially reflects any
vector over this plane.

00:06:31.395 --> 00:06:35.050
So let me draw some indicative
examples.

00:06:35.050 --> 00:06:36.653
And I hope we can visualize
this well.

00:06:36.653 --> 00:06:39.220
So let's say I have a vector
that looks like that.

00:06:39.220 --> 00:06:42.070
So let's call that vector x.

00:06:42.070 --> 00:06:43.130
And let's say, you know,
let's say it looks

00:06:43.130 --> 00:06:43.820
something like this.

00:06:43.820 --> 00:06:44.710
It's above the plane.

00:06:44.710 --> 00:06:45.490
It kind of jumps out.

00:06:45.490 --> 00:06:47.400
It's not in my subspace.

00:06:47.400 --> 00:06:50.000
But I want the transformation
of x to be the mirror image

00:06:50.000 --> 00:06:50.610
below this.

00:06:50.610 --> 00:06:53.150
So, you know, if you imagine
that this plane is somewhat

00:06:53.150 --> 00:06:56.210
transluscent, it would
be down here.

00:06:56.210 --> 00:06:58.000
My vector x would look
something like this.

00:06:58.000 --> 00:07:00.030
This would be the transformation
of x that I

00:07:00.030 --> 00:07:01.300
want to generate.

00:07:01.300 --> 00:07:04.990
If I have a vector-- let me pick
a color that I haven't

00:07:04.990 --> 00:07:07.770
used before-- if I have a vector
that looks like this.

00:07:10.400 --> 00:07:12.700
Then its transformation is going
to go below the plane

00:07:12.700 --> 00:07:13.740
and just be the mirror image.

00:07:13.740 --> 00:07:16.060
This is going to be the mirror
image, just like that.

00:07:16.060 --> 00:07:17.340
You get the idea.

00:07:17.340 --> 00:07:20.860
Now, what would be, just to
understand our transformation

00:07:20.860 --> 00:07:21.870
a little bit better,
what would be the

00:07:21.870 --> 00:07:25.630
transformation of v1?

00:07:25.630 --> 00:07:27.550
Well v1 is in the plane,
so its mirror image

00:07:27.550 --> 00:07:28.340
isn't going to change.

00:07:28.340 --> 00:07:31.920
So the transformation of v1
is just going to be v1.

00:07:31.920 --> 00:07:33.270
What's the transformation
of v2?

00:07:33.270 --> 00:07:34.390
Well that's also in the plane.

00:07:34.390 --> 00:07:38.215
So the transformation of v2
is just going to be v2.

00:07:38.215 --> 00:07:40.100
And what's the transformation
of v3?

00:07:44.020 --> 00:07:46.110
Well v3 is directly orthogonal
to the plane.

00:07:46.110 --> 00:07:48.020
It kind of just pops straight
up out of the plane.

00:07:48.020 --> 00:07:49.952
So if you want to get its
mirror image, you would

00:07:49.952 --> 00:07:53.270
literally take the
negative of v3.

00:07:53.270 --> 00:07:54.845
It would be the negative
of v3.

00:07:54.845 --> 00:07:56.050
And I do it straight up.

00:07:56.050 --> 00:07:58.190
We don't know necessarily
whether-- v3 clearly does not

00:07:58.190 --> 00:07:58.790
go straight up.

00:07:58.790 --> 00:08:01.160
I just drew it, you know this
plane, I just drew it relative

00:08:01.160 --> 00:08:01.710
to this plane.

00:08:01.710 --> 00:08:04.650
This plane might be more tilted
than I've drawn it.

00:08:04.650 --> 00:08:06.990
But anyway, so the
transformation of v3 will be

00:08:06.990 --> 00:08:10.400
equal to minus v3.

00:08:10.400 --> 00:08:12.130
Now this seems like
a fairly tough

00:08:12.130 --> 00:08:13.600
transformation to construct.

00:08:13.600 --> 00:08:16.200
You know, we could try to apply
the transformation to

00:08:16.200 --> 00:08:19.230
our standard basis vectors in
R3 like we've done in the

00:08:19.230 --> 00:08:21.100
past. But that seems really
complicated, a lot of

00:08:21.100 --> 00:08:21.590
trigonometry.

00:08:21.590 --> 00:08:24.240
We would have to figure out the
inclination of this plane,

00:08:24.240 --> 00:08:25.250
and what we're doing to it.

00:08:25.250 --> 00:08:27.070
It would just be hard
to visualize.

00:08:27.070 --> 00:08:30.150
So you probably have a sense
that maybe this transformation

00:08:30.150 --> 00:08:32.210
will be much easier
to describe if

00:08:32.210 --> 00:08:33.460
we change our basis.

00:08:40.330 --> 00:08:43.460
Let's say this is our
standard basis.

00:08:43.460 --> 00:08:45.680
And our standard basis, our
transformation, we would

00:08:45.680 --> 00:08:50.660
multiply it times some matrix
x-- sorry, by some matrix A--

00:08:50.660 --> 00:08:53.260
to get your transformation
of x.

00:08:53.260 --> 00:08:55.480
Now, we're saying that this is
hard to find, because it's

00:08:55.480 --> 00:08:57.560
hard to figure out what the
transformation is when you

00:08:57.560 --> 00:09:01.350
apply to just your standard
basis vectors.

00:09:01.350 --> 00:09:04.900
So what I'm going to do is try
to construct some basis, so

00:09:04.900 --> 00:09:11.080
that when I represent x in that
new basis, if I multiply

00:09:11.080 --> 00:09:15.440
x times the inverse of our
change of basis matrix, then

00:09:15.440 --> 00:09:19.840
I'm going to get x in the
new basis coordinates.

00:09:19.840 --> 00:09:24.360
And maybe it'll be easier to
find the D in this new basis,

00:09:24.360 --> 00:09:28.980
and then we'll get the B
representation of the

00:09:28.980 --> 00:09:30.950
transformation of x.

00:09:30.950 --> 00:09:34.900
And then we can multiply
that times C.

00:09:34.900 --> 00:09:38.310
So if we're able to figure out
D, what we can do is, look, we

00:09:38.310 --> 00:09:45.150
know that the transformation
of x is going to be

00:09:45.150 --> 00:09:47.710
able to A times x.

00:09:47.710 --> 00:09:50.690
We saw that a long time ago,
that any linear transformation

00:09:50.690 --> 00:09:53.330
could be represented as a
matrix vector product.

00:09:53.330 --> 00:09:55.450
But let's say that this
is hard to find.

00:09:55.450 --> 00:09:56.430
This is hard.

00:09:56.430 --> 00:09:59.120
Then we can go the other
way around this.

00:09:59.120 --> 00:10:06.160
We could say that the
transformation of x is equal

00:10:06.160 --> 00:10:10.720
to you take x, first you
multiply it by C inverse to

00:10:10.720 --> 00:10:12.780
get the B version of x.

00:10:12.780 --> 00:10:14.990
So first you multiply
it by C inverse.

00:10:14.990 --> 00:10:18.660
Then you multiply it by D, to
get the B version of the

00:10:18.660 --> 00:10:20.360
transformation of x.

00:10:20.360 --> 00:10:22.320
So then you multiply it by D.

00:10:22.320 --> 00:10:25.390
And then you multiply that by
C to go back to our standard

00:10:25.390 --> 00:10:26.780
basis for the transformation.

00:10:26.780 --> 00:10:28.630
So then you go multiply
it by C.

00:10:28.630 --> 00:10:30.430
And we've seen this
formula before.

00:10:30.430 --> 00:10:33.910
So if we can find a nice basis
where D is easy to figure out,

00:10:33.910 --> 00:10:37.700
then we can multiply it this
way, times the change in basis

00:10:37.700 --> 00:10:41.920
matrix and its inverse,
and we'll get our A.

00:10:41.920 --> 00:10:45.510
Because this thing has to be the
same thing as that thing

00:10:45.510 --> 00:10:46.320
right there.

00:10:46.320 --> 00:10:53.510
And even more, if we pick an
orthonormal basis, if B is an

00:10:53.510 --> 00:11:05.350
orthonormal basis, with three
vectors, right, then C will be

00:11:05.350 --> 00:11:06.090
invertible.

00:11:06.090 --> 00:11:08.635
Well, we already know if it's an
orthonormal basis, we know

00:11:08.635 --> 00:11:16.710
that C transpose C is equal
to the identity matrix.

00:11:16.710 --> 00:11:21.060
And we also know that C is
invertible, if, you know, C is

00:11:21.060 --> 00:11:23.220
essentially a 3 by 3 matrix.

00:11:23.220 --> 00:11:24.940
C inverse exists.

00:11:24.940 --> 00:11:26.870
And in the beginning of this
video, we said, well that

00:11:26.870 --> 00:11:29.210
means that C transpose is
going to be equal to C

00:11:29.210 --> 00:11:30.940
Inverse, because this is
just acting like an

00:11:30.940 --> 00:11:32.180
inverse right there.

00:11:32.180 --> 00:11:37.950
And then, if C is an n by n
matrix, or in this case we're

00:11:37.950 --> 00:11:41.810
dealing with a 3 by 3 matrix,
we're dealing with R3, then it

00:11:41.810 --> 00:11:47.580
simplifies to A will be equal
to C times D, times the C

00:11:47.580 --> 00:11:51.170
transpose, which is much easier
to find, much easier to

00:11:51.170 --> 00:11:53.920
find than trying to invert
a 3 by 3 matrix.

00:11:53.920 --> 00:11:56.560
So let's see if we can
do this effectively.

00:11:56.560 --> 00:11:58.290
So what would be a good basis?

00:11:58.290 --> 00:12:00.810
Well I think maybe a natural
one would be to use v1, v2,

00:12:00.810 --> 00:12:03.910
and v3, because these basis
vectors, it's very easy to

00:12:03.910 --> 00:12:07.040
figure out what their
transformations are.

00:12:07.040 --> 00:12:08.670
So let's write that down.

00:12:08.670 --> 00:12:14.570
So I'm going to make my basis
that I'm going to change to is

00:12:14.570 --> 00:12:20.460
going to be v1, v2, and v3.

00:12:20.460 --> 00:12:25.340
So just to make sure we
understand what we're doing,

00:12:25.340 --> 00:12:27.080
each of these vectors,
what do they look

00:12:27.080 --> 00:12:28.930
like in my new basis?

00:12:28.930 --> 00:12:35.690
Well v1 is equal to 1 times
v1, plus 0 times v2,

00:12:35.690 --> 00:12:38.720
plus 0 times v3.

00:12:38.720 --> 00:12:45.840
So v1, in my new basis, where v1
is the first basis vector,

00:12:45.840 --> 00:12:49.880
is just going to be
equal to 1, 0, 0.

00:12:49.880 --> 00:12:50.750
Same argument.

00:12:50.750 --> 00:12:54.090
v2, what is it going to be
equal to in my new basis?

00:12:54.090 --> 00:12:56.180
I don't even have to, I think
you get the idea.

00:12:56.180 --> 00:12:57.770
Let me just write
it over here.

00:12:57.770 --> 00:13:04.220
v2 in my new basis is just
going to be 0 times v1--

00:13:04.220 --> 00:13:06.770
remember, these numbers, these
coordinates are just the

00:13:06.770 --> 00:13:09.240
coefficients on my basis
vectors-- it's going to be 0

00:13:09.240 --> 00:13:16.210
times v1, plus 1 times
v2, plus 0, times v3.

00:13:16.210 --> 00:13:24.690
And then finally, v3 in my new
basis is just going to be 0

00:13:24.690 --> 00:13:30.080
times v1, plus 0 times v2,
plus 1 times v3, This is

00:13:30.080 --> 00:13:31.840
almost trivially easy.

00:13:31.840 --> 00:13:35.030
Now, what is my change of basis
matrix going to be?

00:13:35.030 --> 00:13:37.700
Well I'm going to have, well,
I'll save that for later.

00:13:37.700 --> 00:13:40.710
But my change of basis matrix
is just going to be a matrix

00:13:40.710 --> 00:13:42.790
with these guys as
the columns.

00:13:42.790 --> 00:13:44.180
And of course its inverse
is going to be the

00:13:44.180 --> 00:13:45.170
transpose of that.

00:13:45.170 --> 00:13:47.800
But we'll save that
for a little bit.

00:13:47.800 --> 00:13:49.845
Now, how can we figure out D?

00:13:52.920 --> 00:13:54.840
Let's write D.

00:13:54.840 --> 00:13:58.200
D is going to have
three columns.

00:13:58.200 --> 00:14:01.760
So d1, d2, d3.

00:14:01.760 --> 00:14:05.675
It's still a mapping from a
three-dimensional, I guess we

00:14:05.675 --> 00:14:07.690
could call it a
three-dimensional matrix

00:14:07.690 --> 00:14:09.730
vector to a three-dimensional
vector.

00:14:09.730 --> 00:14:12.410
Each of these are
members of R3.

00:14:12.410 --> 00:14:19.420
So what is the transformation
of v1 represented in B

00:14:19.420 --> 00:14:20.580
coordinates?

00:14:20.580 --> 00:14:27.990
That's going to be equal to D
times the representation of v1

00:14:27.990 --> 00:14:36.950
in B coordinates, which is equal
to d1, d2, d3 times this

00:14:36.950 --> 00:14:37.460
guy, right?

00:14:37.460 --> 00:14:40.110
This is the representation
of v1 in B coordinates.

00:14:40.110 --> 00:14:43.140
So times 1, 0, 0.

00:14:43.140 --> 00:14:44.930
Well that just equals d1.

00:14:44.930 --> 00:14:47.120
We've seen this in the past.
So if we want to figure out

00:14:47.120 --> 00:14:50.880
what d1 is, it's just the
transformation of v1 in B

00:14:50.880 --> 00:14:52.070
coordinates.

00:14:52.070 --> 00:14:54.680
Now we could use that exact same
argument-- let me shift

00:14:54.680 --> 00:14:55.900
to the left a little bit more.

00:14:55.900 --> 00:14:57.770
I was running out of
space on the right.

00:14:57.770 --> 00:15:04.860
So the transformation of v2 in
B coordinates is equal to D,

00:15:04.860 --> 00:15:13.680
which is d1, d2, d3 times the
B version of v2, or v2

00:15:13.680 --> 00:15:15.550
represented in B coordinates.

00:15:15.550 --> 00:15:20.370
So that is v2 represented in
B coordinates is 0, 1, 0.

00:15:20.370 --> 00:15:22.690
So that's going to
be equal to d2.

00:15:22.690 --> 00:15:26.550
And finally, let's
just complete it.

00:15:26.550 --> 00:15:31.180
The transformation of v3,
represented in B coordinates

00:15:31.180 --> 00:15:38.310
is going to be equal to d1, d2,
d3 times v3 represented in

00:15:38.310 --> 00:15:39.280
B coordinates.

00:15:39.280 --> 00:15:41.610
So times 0, 0, 1.

00:15:41.610 --> 00:15:44.980
So it's going to be 0 times d1,
plus 0 times d2, plus 1

00:15:44.980 --> 00:15:47.320
times d3, is equal to d3.

00:15:47.320 --> 00:15:50.880
And this is kind of a re-proving
that we can find

00:15:50.880 --> 00:15:53.650
the columns of D, by essentially
finding the B

00:15:53.650 --> 00:15:55.910
versions of these
transformations.

00:15:55.910 --> 00:16:00.620
So D, we can rewrite D is going
to be equal to, with the

00:16:00.620 --> 00:16:02.850
first column it's just
going to be this.

00:16:02.850 --> 00:16:08.120
So it's the transformation
of v1 in B coordinates.

00:16:08.120 --> 00:16:09.470
The second column is this.

00:16:09.470 --> 00:16:10.640
All right, d2 is that.

00:16:10.640 --> 00:16:16.220
So it's the transformation
of v2 in B coordinates.

00:16:16.220 --> 00:16:22.140
And third column is that, the
transformation of v3 in B

00:16:22.140 --> 00:16:22.710
coordinates.

00:16:22.710 --> 00:16:23.480
Just like that.

00:16:23.480 --> 00:16:24.680
So let's see if we
can find these.

00:16:24.680 --> 00:16:27.780
This, hopefully, shouldn't
be too difficult.

00:16:27.780 --> 00:16:28.750
So we saw it up here.

00:16:28.750 --> 00:16:30.650
We wrote what the transformation
of

00:16:30.650 --> 00:16:32.740
v1, v2, and v3 are.

00:16:32.740 --> 00:16:35.200
Now we just have to find
out what they are in B

00:16:35.200 --> 00:16:35.685
coordinates.

00:16:35.685 --> 00:16:38.770
So let me rewrite, let me copy
and paste this down here,

00:16:38.770 --> 00:16:43.365
because this might be
nice to look at.

00:16:43.365 --> 00:16:46.526
So we already found that.

00:16:46.526 --> 00:16:48.090
I'll paste it down here.

00:16:53.030 --> 00:16:53.960
So we have that.

00:16:53.960 --> 00:16:54.920
We've already found that.

00:16:54.920 --> 00:16:56.780
So we just have to find
the B coordinate

00:16:56.780 --> 00:16:58.640
representation of them.

00:16:58.640 --> 00:17:03.290
So the B coordinate
representation of the

00:17:03.290 --> 00:17:08.849
transformation of v1-- actually,
I think we, well

00:17:08.849 --> 00:17:09.940
I'll write it out.

00:17:09.940 --> 00:17:11.359
This becomes a little
bit tedious.

00:17:11.359 --> 00:17:13.880
That's equivalent to the B
coordinate representation of

00:17:13.880 --> 00:17:20.369
v1, which is just 1, 0, 0.

00:17:20.369 --> 00:17:21.300
So let me write D here.

00:17:21.300 --> 00:17:25.700
D is equal to, the first
column is 1, 0, 0.

00:17:25.700 --> 00:17:27.369
Now what the second column?

00:17:27.369 --> 00:17:33.270
Well the transformation of v2,
B representation is going to

00:17:33.270 --> 00:17:40.520
be just v2's B representation,
or B coordinates, which is

00:17:40.520 --> 00:17:50.060
equal to 0, 1, 0 zero, 0,
1, 0, and then one left.

00:17:50.060 --> 00:17:52.130
This one's a little
interesting one.

00:17:52.130 --> 00:17:54.730
The B representation of the
transformation of v3-- and

00:17:54.730 --> 00:17:58.540
remember, v3 was the one that's
not in the plane-- that

00:17:58.540 --> 00:18:01.410
is equal to-- remember, the
transformation is minus v3.

00:18:01.410 --> 00:18:03.530
Flip that, because we're taking
the mirror image with

00:18:03.530 --> 00:18:05.010
respect to that plane.

00:18:05.010 --> 00:18:08.080
So it would be the B
representation of minus v3.

00:18:10.590 --> 00:18:16.100
Well minus v3 is just 0 times
v1, plus 0 times v2,

00:18:16.100 --> 00:18:18.510
minus 1 times v3.

00:18:18.510 --> 00:18:20.705
Those are out basis vectors, so
our third column is going

00:18:20.705 --> 00:18:24.440
to be 0, 0, minus 1.

00:18:24.440 --> 00:18:26.830
So we figured out our
D transformation.

00:18:26.830 --> 00:18:28.810
That was pretty straightforward.

00:18:28.810 --> 00:18:32.270
D right here is this matrix
that we just figured out.

00:18:32.270 --> 00:18:38.000
So to figure out A, we can apply
this formula right there

00:18:38.000 --> 00:18:40.080
with our change of
basis matrix.

00:18:40.080 --> 00:18:42.690
Actually let me copy
all that stuff.

00:18:42.690 --> 00:18:44.540
This'll be useful.

00:18:44.540 --> 00:18:46.820
just let me copy all of this.

00:18:49.630 --> 00:18:53.730
Copy, then we paste it down
here, now that we have our D.

00:18:56.750 --> 00:18:59.380
All right, we have all
of this stuff here.

00:18:59.380 --> 00:19:00.860
And so let's figure
out what A.

00:19:00.860 --> 00:19:03.570
Is So to do that, first
we have to figure out

00:19:03.570 --> 00:19:04.620
our change of basis.

00:19:04.620 --> 00:19:07.510
So I'll just write it
all out like this.

00:19:07.510 --> 00:19:11.690
Let me clear this out a little
bit, clean things up.

00:19:11.690 --> 00:19:13.000
All I need is this.

00:19:13.000 --> 00:19:14.870
I don't need any
of this really.

00:19:14.870 --> 00:19:16.750
So let me clean all
of that up.

00:19:26.010 --> 00:19:27.890
So let's figure out what A is.

00:19:27.890 --> 00:19:32.230
A is equal to our change
of basis matrix.

00:19:32.230 --> 00:19:34.680
Well our change of basis matrix
is just the matrix with

00:19:34.680 --> 00:19:37.740
these guys as the columns.

00:19:37.740 --> 00:19:40.800
Well let me just take
out the 1/3.

00:19:40.800 --> 00:19:54.430
So C is 1/3, times 2 minus 2,
1, 2, 1 minus 2, and then we

00:19:54.430 --> 00:19:56.935
have 1, 2, 2, right?

00:20:00.680 --> 00:20:03.480
That right there is A, and then
we're going to multiply

00:20:03.480 --> 00:20:06.040
that times-- or this right here
is our change of basis

00:20:06.040 --> 00:20:09.320
matrix, that is C-- and we're
going to multiply that times

00:20:09.320 --> 00:20:17.210
D, which is 1, 0, 0, 0, 1, 0,
and then 0, 0, minus 1.

00:20:17.210 --> 00:20:20.740
So it almost looks like the
identity matrix, but we

00:20:20.740 --> 00:20:22.780
flipped our third vector,
and that's why we

00:20:22.780 --> 00:20:24.120
got a minus 1 there.

00:20:24.120 --> 00:20:27.000
And then we have C inverse,
but because C was a square

00:20:27.000 --> 00:20:30.715
matrix with orthonormal columns,
we know that C

00:20:30.715 --> 00:20:32.935
inverse is the same thing
is C transpose.

00:20:32.935 --> 00:20:34.990
So let me write that here.

00:20:34.990 --> 00:20:37.590
So let me write this here.

00:20:37.590 --> 00:20:39.860
So it's just going to be the
transpose of this thing.

00:20:39.860 --> 00:20:43.370
So I'll write another 1/3 out
here, just to simplify things.

00:20:43.370 --> 00:20:46.800
So times 1/3, times the
transpose of this character,

00:20:46.800 --> 00:20:50.810
so we have 2, 2, 1, so we're
going to have 2, 2, 1.

00:20:50.810 --> 00:20:54.870
We have minus 2, 1, 2, so
we have minus 2, 1, 2.

00:20:54.870 --> 00:21:00.680
We have 1 minus 2, 2, so we
have 1 minus 2 and 2.

00:21:00.680 --> 00:21:04.320
And this right here, this is C
inverse, which is equal to C

00:21:04.320 --> 00:21:08.750
transpose, because C is an
invertible matrix, or a square

00:21:08.750 --> 00:21:10.960
matrix, with orthonormal
columns.

00:21:10.960 --> 00:21:13.380
So what's this going
to be equal to?

00:21:13.380 --> 00:21:16.245
Well let's just take, I don't
know, first let's just take--

00:21:16.245 --> 00:21:18.850
let me write this, this was D--
so let's just take this

00:21:18.850 --> 00:21:21.860
product first. We'll worry
about the 1/3's later.

00:21:21.860 --> 00:21:23.270
And now I can erase this.

00:21:23.270 --> 00:21:26.670
I can use this real estate.

00:21:26.670 --> 00:21:29.762
Let me erase that.

00:21:29.762 --> 00:21:31.980
So let me turn my pen
tool back on.

00:21:31.980 --> 00:21:32.360
All right.

00:21:32.360 --> 00:21:34.710
So let's take this product
right there.

00:21:34.710 --> 00:21:38.620
So A is equal to, let's take
the 1/3's, it's going to be

00:21:38.620 --> 00:21:44.140
equal to 1/9 times-- now
this is going to be

00:21:44.140 --> 00:21:46.720
another 3 by 3 matrix.

00:21:46.720 --> 00:21:51.540
So, we're going to have
2, 2, 1, times 1, 0 0.

00:21:51.540 --> 00:21:55.420
Or we're going to dot 2,
2, 1 with 1, 0, 0.

00:21:55.420 --> 00:21:58.530
So the only term that's going
to be non-zero is

00:21:58.530 --> 00:22:00.070
the 2 times the 1.

00:22:00.070 --> 00:22:01.440
So that's going to be 2.

00:22:01.440 --> 00:22:05.740
Then we're going to dot 2, 2, 1
with 0, 1, 0, right, for the

00:22:05.740 --> 00:22:07.030
second column.

00:22:07.030 --> 00:22:08.490
The only non-zero term
is going to be the

00:22:08.490 --> 00:22:09.590
2, the middle 2.

00:22:09.590 --> 00:22:13.470
Then you get 2, 2, 1
dot 0, 0, minus 1.

00:22:13.470 --> 00:22:16.080
So that's going to be, the only
non-zero term is this

00:22:16.080 --> 00:22:17.730
last one which is going
to be negated, so it's

00:22:17.730 --> 00:22:20.340
going to be minus 1.

00:22:20.340 --> 00:22:21.770
This isn't too bad.

00:22:21.770 --> 00:22:25.440
I simplified it, but this is
almost the identity matrix.

00:22:25.440 --> 00:22:28.070
Then we have this guy.

00:22:28.070 --> 00:22:31.360
We have minus 2, 1, 2 dotted
this guy, only this guy kind

00:22:31.360 --> 00:22:34.500
of survived that dot product,
minus 2, then you take this

00:22:34.500 --> 00:22:38.070
guy dot this guy, only
this guy survives.

00:22:38.070 --> 00:22:40.000
And then you take this
guy dot that guy.

00:22:40.000 --> 00:22:40.995
This guy gets negative.

00:22:40.995 --> 00:22:42.530
And he's the only survivor.

00:22:42.530 --> 00:22:44.050
I think you see what's
happening.

00:22:44.050 --> 00:22:46.180
These rows stay the same,
but the third

00:22:46.180 --> 00:22:47.560
term becomes negative.

00:22:47.560 --> 00:22:48.680
Let's do it again.

00:22:48.680 --> 00:22:51.210
So you take this guy.

00:22:51.210 --> 00:22:53.680
You take the dot product of this
column, this row vector

00:22:53.680 --> 00:22:55.390
with this column vector.

00:22:55.390 --> 00:22:57.680
Only this guy survives.

00:22:57.680 --> 00:23:00.640
Then this row with this column,
you have the minus 2.

00:23:00.640 --> 00:23:04.880
And then this row with that
column, only the 2 survives,

00:23:04.880 --> 00:23:08.440
but it's times minus 1, so
it becomes a minus 2.

00:23:08.440 --> 00:23:12.030
And then we have this
vector out here.

00:23:12.030 --> 00:23:13.920
Remember, we took 1/3's,
we multiplied

00:23:13.920 --> 00:23:15.270
them and we got 1/9.

00:23:15.270 --> 00:23:21.140
And then we have 2 minus
2, 1, 2, 1, minus 2,

00:23:21.140 --> 00:23:23.380
and then 1, 2, 2.

00:23:23.380 --> 00:23:26.270
And this'll be a little bit more
painful to multiply, but

00:23:26.270 --> 00:23:28.550
I think we can pull it off.

00:23:28.550 --> 00:23:30.190
Because this is the
home stretch.

00:23:30.190 --> 00:23:32.860
So A, our transformation matrix
for that, you know,

00:23:32.860 --> 00:23:35.220
strange transformation where
we're reflecting over the

00:23:35.220 --> 00:23:39.770
plane in R3 is going to be
equal to 1/9 times-- it's

00:23:39.770 --> 00:23:41.900
going to be a 3 by 3 matrix.

00:23:41.900 --> 00:23:46.310
So it's going to be 2
times 2, which is 4.

00:23:46.310 --> 00:23:47.370
Let me write this down.

00:23:47.370 --> 00:23:48.640
Oh, that's going to
be too onerous.

00:23:48.640 --> 00:23:53.390
So 2 times 2, which is 4, plus
2 times 2, which is 4, and

00:23:53.390 --> 00:23:56.450
then plus minus 1, right?

00:23:56.450 --> 00:24:02.040
So it's going to be 4 plus
4, minus 1, which is 7.

00:24:02.040 --> 00:24:05.440
4 plus 4 minus 1 is 7.

00:24:05.440 --> 00:24:08.090
So we're going to multiply this
guy times this column.

00:24:08.090 --> 00:24:14.320
So 2 times minus 2, is minus
4, plus 2, is minus 2.

00:24:14.320 --> 00:24:18.550
Minus 2 is minus 4.

00:24:18.550 --> 00:24:22.150
Then we're going to have 2 times
1 is 2, minus 4, which

00:24:22.150 --> 00:24:26.360
is minus 2, and then minus
2, which is minus 4.

00:24:29.020 --> 00:24:30.740
Not so painful.

00:24:30.740 --> 00:24:35.560
OK, now in the second row, we're
going to have minus 2

00:24:35.560 --> 00:24:40.750
times minus 2, is minus 4,
plus 2, which is minus 2,

00:24:40.750 --> 00:24:46.280
minus 2, which is minus 4.

00:24:46.280 --> 00:24:48.870
Then we're going to have minus
2 times minus 2, which is 4,

00:24:48.870 --> 00:24:52.500
plus 1, which is 5, minus 4.

00:24:52.500 --> 00:24:54.350
Let me make sure I
got that right.

00:24:54.350 --> 00:24:58.290
We're going to have minus 2
times minus 2, which is

00:24:58.290 --> 00:25:09.070
positive 4, plus 1, times 1,
which is minus 3, plus minus 2

00:25:09.070 --> 00:25:15.610
times minus 2, which is
which is minus 4.

00:25:15.610 --> 00:25:19.930
And so we are going to get-- and
I'm confusing myself-- I'm

00:25:19.930 --> 00:25:22.500
going to get-- oh no,
this thing is

00:25:22.500 --> 00:25:23.670
going to get very confusing.

00:25:23.670 --> 00:25:24.370
It's straightforward.

00:25:24.370 --> 00:25:30.260
Minus 2 times minus 2 is 4,
plus 1 is 5, minus 4 is 1.

00:25:34.410 --> 00:25:42.380
And then we get minus 2 minus 2,
which is minus 4, minus 4,

00:25:42.380 --> 00:25:45.380
which is minus 8.

00:25:45.380 --> 00:25:46.360
Home stretch.

00:25:46.360 --> 00:25:48.330
This is the painful part.

00:25:48.330 --> 00:25:54.290
OK, then you have 2 minus 4,
which is minus 2, minus 2,

00:25:54.290 --> 00:26:01.430
which is minus 4, minus 4-- all
right, now-- minus 2 minus

00:26:01.430 --> 00:26:05.300
2, minus 4, and that's
minus 8.

00:26:05.300 --> 00:26:12.205
And then finally you have 1 plus
4, minus 4, which is 1.

00:26:12.205 --> 00:26:14.990
And if I haven't made any
careless mistakes, we're done.

00:26:14.990 --> 00:26:18.380
We now know that our
transformation that reflects--

00:26:18.380 --> 00:26:21.320
now that did all this fancy
stuff-- our transformation

00:26:21.320 --> 00:26:24.100
that reflects across this plane
that's spanned by these

00:26:24.100 --> 00:26:29.060
characters right there, it can
be represented by this matrix.

00:26:29.060 --> 00:26:32.730
So our transformation, applied
to x in standard coordinates,

00:26:32.730 --> 00:26:35.635
is just equal to A times
x, where A is

00:26:35.635 --> 00:26:36.510
equal to this matrix.

00:26:36.510 --> 00:26:38.480
We can multiply the 1/9 out,
but that will just make it

00:26:38.480 --> 00:26:40.100
look more confusing.

00:26:40.100 --> 00:26:42.760
But this would've been really
hard to figure out on our own,

00:26:42.760 --> 00:26:45.430
to figure out that we had to
put a 7 and a minus 4 or to

00:26:45.430 --> 00:26:48.570
even apply the transformation to
the standard basis vectors,

00:26:48.570 --> 00:26:50.580
which you normally do to
figure out this matrix.

00:26:50.580 --> 00:26:53.970
Instead, we changed our basis
to kind of a very natural

00:26:53.970 --> 00:26:55.390
orthonormal basis.

00:26:55.390 --> 00:26:57.940
And the fact that it was
orthonormal made it very easy

00:26:57.940 --> 00:27:01.340
to find the inverse of our
change-of-basis matrix.

00:27:01.340 --> 00:27:03.670
Anyway, hopefully you
found that useful.


Projections onto subspaces with orthonormal bases

WEBVTT
Kind: captions
Language: en

00:00:00.690 --> 00:00:08.360
We saw in the last video that
orthonormal bases make for

00:00:08.360 --> 00:00:11.520
good coordinate systems,
coordinate systems where it's

00:00:11.520 --> 00:00:13.180
easy to figure out
the coordinates.

00:00:20.130 --> 00:00:21.900
That's what we did in
the last video.

00:00:21.900 --> 00:00:25.300
Let's see if there are other
useful reasons to have an

00:00:25.300 --> 00:00:27.330
orthonormal basis.

00:00:27.330 --> 00:00:30.670
So we already know, let's say
I have some subspace V.

00:00:30.670 --> 00:00:39.520
Let's say V is a
subspace of Rn.

00:00:39.520 --> 00:00:44.210
And let's say we have B, which
is an orthonormal basis.

00:00:44.210 --> 00:00:52.320
B is equal to v1, v2,
all the way to vk.

00:00:52.320 --> 00:01:02.820
And it is an orthonormal basis
for V, which is just a fancy

00:01:02.820 --> 00:01:06.060
way of saying that all of these
vectors have length 1,

00:01:06.060 --> 00:01:08.940
and they're all orthogonal with
respect to each other.

00:01:08.940 --> 00:01:12.960
Now, we've seen many times
before that if I have just any

00:01:12.960 --> 00:01:19.240
member of Rn-- So let's say that
I have some vector x that

00:01:19.240 --> 00:01:26.770
is a member of Rn, then x can
be represented as a sum of a

00:01:26.770 --> 00:01:31.880
member of V, as some vector V
that is in our subspace, and

00:01:31.880 --> 00:01:34.460
some vector w, that is
in the orthogonal

00:01:34.460 --> 00:01:36.020
complement of our subspace.

00:01:36.020 --> 00:01:38.050
Let me write that down.

00:01:38.050 --> 00:01:47.740
Where V is a member of my
subspace, and w is a member of

00:01:47.740 --> 00:01:50.140
my subspace's orthogonal
complement.

00:01:50.140 --> 00:01:52.720
We saw this when I was doing
the whole set of videos on

00:01:52.720 --> 00:01:54.370
orthogonal complements.

00:01:54.370 --> 00:01:57.040
Now what is this thing
right here?

00:01:57.040 --> 00:01:58.570
What is this thing
right there?

00:01:58.570 --> 00:02:07.740
By definition, that is the
projection of x onto V.

00:02:07.740 --> 00:02:11.880
This would be the projection
of x onto V's orthogonal

00:02:11.880 --> 00:02:12.700
complement.

00:02:12.700 --> 00:02:14.940
And we know in the past,
that this is not an

00:02:14.940 --> 00:02:17.400
easy thing to find.

00:02:17.400 --> 00:02:22.690
Let's say I set up some matrix
A, that has my basis vectors

00:02:22.690 --> 00:02:27.070
as the columns-- So if I set
up some matrix A that looks

00:02:27.070 --> 00:02:34.460
like this, v1, v2, all the way
to vk, we learned before that

00:02:34.460 --> 00:02:37.170
if we wanted to figure out, and
have a kind of a general

00:02:37.170 --> 00:02:39.375
way of figuring out what the
projection is, we learned that

00:02:39.375 --> 00:02:47.670
the projection of any vector x
onto V is equal to A times A

00:02:47.670 --> 00:02:53.110
transpose A inverse,
times A, times x.

00:02:53.110 --> 00:02:56.300
And this was a pain
to figure out.

00:02:56.300 --> 00:02:57.925
That is a pain to figure out.

00:02:57.925 --> 00:03:01.280
But let's see if the assumption
that these guys are

00:03:01.280 --> 00:03:05.910
orthonormal, or that this is an
orthonormal set, in any way

00:03:05.910 --> 00:03:07.480
simplifies this.

00:03:07.480 --> 00:03:08.990
So the first thing we can
do is just explore

00:03:08.990 --> 00:03:09.760
this a little bit.

00:03:09.760 --> 00:03:13.010
This vector V, this is a member
of our subspace, which

00:03:13.010 --> 00:03:15.520
means it could be represented as
a linear combination of my

00:03:15.520 --> 00:03:17.130
basis vectors.

00:03:17.130 --> 00:03:25.090
So I can write x is equal to,
instead of V, I can write c1

00:03:25.090 --> 00:03:30.110
times v1, plus c2 times
v2, all the way to

00:03:30.110 --> 00:03:34.010
plus ck times vk.

00:03:34.010 --> 00:03:38.840
This is the same thing as just
any, or some unique, member of

00:03:38.840 --> 00:03:40.610
my subspace V.

00:03:40.610 --> 00:03:43.900
So that's V right there, and you
can also view this as the

00:03:43.900 --> 00:03:49.170
projection of x onto
the subspace V.

00:03:49.170 --> 00:03:52.570
So x can be represented as some
member of V, and then

00:03:52.570 --> 00:03:55.490
some member of V's orthogonal
complement,

00:03:55.490 --> 00:03:58.050
plus w right there.

00:03:58.050 --> 00:04:02.340
Now what happens if we take both
sides of this equation,

00:04:02.340 --> 00:04:06.480
if we dot it with one of these
guys with, let's say, vi?

00:04:06.480 --> 00:04:09.590
Let's dot both sides of
this equation with vi.

00:04:09.590 --> 00:04:17.269
So if I take vi dot x, or vi
of the ith basis vector up

00:04:17.269 --> 00:04:22.650
here, the ith basis vector in
the basis for my subspace B,

00:04:22.650 --> 00:04:23.740
what am I going to get?

00:04:23.740 --> 00:04:31.700
This is going to be c1 times
vi, times v1, plus c2 times

00:04:31.700 --> 00:04:36.860
vi, times v2, plus you're
going to keep going.

00:04:36.860 --> 00:04:40.640
Eventually you'll get to the
ith term, which will be ci

00:04:40.640 --> 00:04:45.110
times vi dotted with vi.

00:04:45.110 --> 00:04:48.610
And then, you know, assuming
that i isn't 1, 2, or k,

00:04:48.610 --> 00:04:56.030
eventually we'll get to ck
times vi dotted with vk.

00:04:56.030 --> 00:04:57.190
We saw this in the last video.

00:04:57.190 --> 00:04:58.220
I'm just dotting both sides.

00:04:58.220 --> 00:04:59.890
But we also have this w term.

00:04:59.890 --> 00:05:06.570
So then we'll go
plus vi dot w.

00:05:06.570 --> 00:05:11.460
Now, you know, just to clarify
things, in the last video, we

00:05:11.460 --> 00:05:15.820
assumed that x was inside of the
subspace, so that x could

00:05:15.820 --> 00:05:17.550
be represented with
coordinates here.

00:05:17.550 --> 00:05:20.280
Now x could be any member of Rn,
and we're just looking at

00:05:20.280 --> 00:05:21.450
the projection of x.

00:05:21.450 --> 00:05:23.280
And because it's any member,
it's going to be some

00:05:23.280 --> 00:05:26.260
combination of these guys plus
some member of B's orthogonal

00:05:26.260 --> 00:05:27.140
complement.

00:05:27.140 --> 00:05:29.950
Now when I take the dot product
of one of my basis

00:05:29.950 --> 00:05:32.290
vectors, the ith basis vector,
with both sides of this

00:05:32.290 --> 00:05:35.470
equation, this side is just
that, but in the right side

00:05:35.470 --> 00:05:37.160
something very similar
happens to what we

00:05:37.160 --> 00:05:39.150
saw in the last video.

00:05:39.150 --> 00:05:41.540
What is vi dot v1?

00:05:41.540 --> 00:05:45.320
Well they're different members
of this orthonormal set, so

00:05:45.320 --> 00:05:45.930
they're orthogonal.

00:05:45.930 --> 00:05:50.630
So that's going to be 0, vi dot
v2, that's 0, assuming vi

00:05:50.630 --> 00:05:51.720
doesn't equal 2.

00:05:51.720 --> 00:05:53.960
vi dot vi is 1.

00:05:53.960 --> 00:05:57.040
So this term is just going
to be ci, vi dot

00:05:57.040 --> 00:05:58.600
vk, that's also 0.

00:05:58.600 --> 00:06:00.570
It doesn't matter what our
constant is because 0 times

00:06:00.570 --> 00:06:01.780
anything is 0.

00:06:01.780 --> 00:06:04.630
And then what is vi dot w?

00:06:04.630 --> 00:06:09.380
Well, by definition w is a
member of our orthogonal

00:06:09.380 --> 00:06:13.420
complement to V, which means
it is orthogonal to every

00:06:13.420 --> 00:06:14.270
member of V.

00:06:14.270 --> 00:06:17.420
Well this is a member of V, so
these two guys are orthogonal.

00:06:17.420 --> 00:06:20.080
So that is also equal to 0.

00:06:20.080 --> 00:06:28.420
And just like that, you get ci
is equal to vi times xi.

00:06:28.420 --> 00:06:30.930
Sorry, times x, just
like that.

00:06:30.930 --> 00:06:31.600
So what does this do?

00:06:31.600 --> 00:06:33.260
This is a kind of a very
similar result

00:06:33.260 --> 00:06:34.120
that we got last time.

00:06:34.120 --> 00:06:36.720
But remember we're not looking
for-- We're not assuming that

00:06:36.720 --> 00:06:38.200
x is a member of V.

00:06:38.200 --> 00:06:40.470
In that case then, you know,
the ci's would be the

00:06:40.470 --> 00:06:41.390
coordinates for x.

00:06:41.390 --> 00:06:46.450
In this case, we're looking for
the projection of x onto

00:06:46.450 --> 00:06:51.650
V, or the member of V that is
kind of x's component in V, or

00:06:51.650 --> 00:06:55.420
that represents x's
projection onto V.

00:06:55.420 --> 00:07:06.250
So if we now want to find the
projection of x onto V, it's

00:07:06.250 --> 00:07:08.680
equal to these ci's times
their respective basis

00:07:08.680 --> 00:07:11.010
vectors, but now we know
what the ci's are.

00:07:11.010 --> 00:07:14.650
They're that basis vector
times your vector x.

00:07:14.650 --> 00:07:17.210
So just like that, we get a
pretty simple way of figuring

00:07:17.210 --> 00:07:19.330
out the projection onto
a subspace with

00:07:19.330 --> 00:07:21.155
an orthonormal basis.

00:07:21.155 --> 00:07:27.570
So let's see, c1 is just
going to be v1 dot x.

00:07:27.570 --> 00:07:29.780
That's c1, and then we're going
to multiply that times

00:07:29.780 --> 00:07:31.860
the vector v1.

00:07:31.860 --> 00:07:33.120
That's a vector too.

00:07:33.120 --> 00:07:37.910
And then the next, I guess we
could say, you know, the next

00:07:37.910 --> 00:07:41.890
coefficient on v2 is going
to be v2 dot x

00:07:41.890 --> 00:07:44.210
times the vector v2.

00:07:44.210 --> 00:07:47.760
And then you're going to
go all the way to plus

00:07:47.760 --> 00:07:53.790
vk dot x times vk.

00:07:53.790 --> 00:07:58.130
And I don't know if you remember
what we did when we

00:07:58.130 --> 00:08:00.935
took the projection of
x onto some line.

00:08:00.935 --> 00:08:04.130
When we were taking the
projection of x onto some

00:08:04.130 --> 00:08:10.850
line, where L is equal to the
span of some unit vector,

00:08:10.850 --> 00:08:12.360
where this had a length 1.

00:08:12.360 --> 00:08:15.530
You know, for t as any real
number, that's just a line,

00:08:15.530 --> 00:08:16.740
sum of the span of
some unit vector.

00:08:16.740 --> 00:08:18.940
Where we assume this
has length 1.

00:08:18.940 --> 00:08:22.160
Then the projection onto a line
just simplified to the

00:08:22.160 --> 00:08:31.320
formula x dot-- let me write
it this way --x dot u times

00:08:31.320 --> 00:08:32.179
the vector u.

00:08:32.179 --> 00:08:33.890
This was a projection
onto a line.

00:08:33.890 --> 00:08:36.690
Notice when we're dealing with
an orthonormal basis for a

00:08:36.690 --> 00:08:40.179
subspace, when you take a
projection of any vector in Rn

00:08:40.179 --> 00:08:45.670
onto that subspace, it's
essentially, you're just

00:08:45.670 --> 00:08:48.320
finding the projection onto the
line spanned by each of

00:08:48.320 --> 00:08:49.950
these vectors, right?

00:08:49.950 --> 00:08:51.950
x dot v1 times the vector v1.

00:08:51.950 --> 00:08:54.050
x times v1 times
the vector v1.

00:08:54.050 --> 00:08:56.890
You're taking x's projection
onto the line spanned by each

00:08:56.890 --> 00:08:57.580
of these guys.

00:08:57.580 --> 00:08:58.830
That's all it is.

00:08:58.830 --> 00:09:01.990
But clearly this is a much, much
simpler way of finding a

00:09:01.990 --> 00:09:06.110
projection than going through
this mess of saying A times

00:09:06.110 --> 00:09:11.130
the inverse of A transpose A,
times A transpose-- I forgot

00:09:11.130 --> 00:09:14.100
that A transpose when I wrote
it the first time --times x.

00:09:14.100 --> 00:09:15.670
This is clearly a lot easier.

00:09:15.670 --> 00:09:19.670
But you might say, OK, this is
easier but you told me that a

00:09:19.670 --> 00:09:22.330
projection is a linear
transformation.

00:09:22.330 --> 00:09:24.880
You've told me it's a linear
transformation, so I want to

00:09:24.880 --> 00:09:26.630
figure out the matrix here.

00:09:26.630 --> 00:09:29.180
So let's see if being
orthonormal in any way

00:09:29.180 --> 00:09:30.746
simplifies this.

00:09:30.746 --> 00:09:34.470
So we could always just figure
out for any particular x.

00:09:34.470 --> 00:09:37.220
We can just apply the dot
product with each of the basis

00:09:37.220 --> 00:09:39.510
vectors, those will be the
coefficients, and then apply

00:09:39.510 --> 00:09:41.950
those coefficients times the
basis vectors, add them up and

00:09:41.950 --> 00:09:43.000
you know your projection.

00:09:43.000 --> 00:09:45.280
But, you know, some of us
might actually want the

00:09:45.280 --> 00:09:46.350
transformation matrix.

00:09:46.350 --> 00:09:48.520
So let's figure out
what it is.

00:09:48.520 --> 00:09:52.360
Let me just rewrite what
we already know.

00:09:52.360 --> 00:09:58.730
We already know that the
projection onto any subspace V

00:09:58.730 --> 00:10:06.690
of x is equal to A times
A transpose A inverse,

00:10:06.690 --> 00:10:09.650
times A, times x.

00:10:09.650 --> 00:10:19.100
And where A's column vectors are
just the basis vectors v1,

00:10:19.100 --> 00:10:23.010
v2, all the way to vk.

00:10:23.010 --> 00:10:26.915
Now, let's see if the assumption
that these guys are

00:10:26.915 --> 00:10:28.600
an orthonormal basis,
let's see if this

00:10:28.600 --> 00:10:30.510
simplifies it at all.

00:10:30.510 --> 00:10:33.570
Let's take the case in
particular of A transpose A.

00:10:33.570 --> 00:10:37.820
A transpose A is going
to be equal to what?

00:10:37.820 --> 00:10:41.940
It's going to be equal
to A transpose--

00:10:41.940 --> 00:10:43.140
Let's think about this.

00:10:43.140 --> 00:10:45.000
These guys are members of
Rn, so it's going to

00:10:45.000 --> 00:10:49.200
be an n by k matrix.

00:10:49.200 --> 00:10:53.110
So this is n by k, this guy
right here is k by n,

00:10:53.110 --> 00:10:54.960
times an n by k.

00:10:54.960 --> 00:10:58.880
We're going to have
a k by k product.

00:10:58.880 --> 00:11:03.180
k by n times n by k is
going to be k by k.

00:11:03.180 --> 00:11:05.145
A transpose A is going
to be k by k.

00:11:05.145 --> 00:11:07.520
And what is it A transpose
equal to?

00:11:07.520 --> 00:11:10.320
Well each of these columns
are going to become rows.

00:11:10.320 --> 00:11:13.570
So the first row here is going
to be v1 tranpose.

00:11:17.230 --> 00:11:20.270
The second column here is going
to be v2 transpose.

00:11:20.270 --> 00:11:22.080
Then you're going to go
all the way down.

00:11:22.080 --> 00:11:26.850
The kth column there is going
to be to vk transpose.

00:11:26.850 --> 00:11:28.120
Just like that.

00:11:28.120 --> 00:11:30.880
And then A is, of course,
this thing right there.

00:11:30.880 --> 00:11:33.500
So A looks like this.

00:11:33.500 --> 00:11:36.820
You have v1, like that.

00:11:36.820 --> 00:11:40.010
You have v2, like that.

00:11:40.010 --> 00:11:45.560
And then you keep going and you
have vk, just like that.

00:11:45.560 --> 00:11:47.900
What's going to happen when
we take this product?

00:11:47.900 --> 00:11:50.190
Let's do a couple of
rows right here.

00:11:50.190 --> 00:11:52.320
So when I take this product,
I'm going to

00:11:52.320 --> 00:11:53.530
get a k by k matrix.

00:11:53.530 --> 00:11:56.370
Let me write it big so I can
explain it reasonably.

00:11:56.370 --> 00:11:58.850
So what's the first row, first
column going to be?

00:11:58.850 --> 00:12:01.540
It's going to be this
row dotted with this

00:12:01.540 --> 00:12:04.610
column, or v1 dot v1.

00:12:04.610 --> 00:12:08.580
Well, v1 dot v1, that's
nice, that's just 1.

00:12:08.580 --> 00:12:10.370
And then what's the second
row, second column?

00:12:10.370 --> 00:12:11.310
Well, that's just going be v2.

00:12:11.310 --> 00:12:13.390
You're going to get your row
from this guy and your column

00:12:13.390 --> 00:12:14.400
from that guy.

00:12:14.400 --> 00:12:17.580
This row dotted with that
column, so v2 dot v2, so

00:12:17.580 --> 00:12:18.260
that's nice.

00:12:18.260 --> 00:12:19.880
That'll be a 1.

00:12:19.880 --> 00:12:25.070
And in general, if you're
finding the Aii or you're

00:12:25.070 --> 00:12:27.220
finding anything along the
diagonal, you're going to

00:12:27.220 --> 00:12:30.630
take, let's say, the ith row
with the ith column.

00:12:30.630 --> 00:12:32.960
So you're just going to have 1's
that go all the way down

00:12:32.960 --> 00:12:34.170
the diagonal.

00:12:34.170 --> 00:12:35.750
Now what about everything
else?

00:12:35.750 --> 00:12:41.190
Let's say that you're looking
for this entry right here,

00:12:41.190 --> 00:12:45.720
which is the first row,
second column.

00:12:45.720 --> 00:12:49.240
This guy right here is going to
be the dot product of v2.

00:12:49.240 --> 00:12:50.220
This is going to be
the dot product of

00:12:50.220 --> 00:12:52.190
this row-- Oh, sorry.

00:12:52.190 --> 00:12:54.820
The dot product of v1 is going
to be the dot product of this

00:12:54.820 --> 00:12:58.280
row, with this column
right there.

00:12:58.280 --> 00:13:01.890
So this is going to
be v1 dot v2.

00:13:01.890 --> 00:13:03.460
But these two guys are
orthogonal, so what's that

00:13:03.460 --> 00:13:04.760
going to be equal to?

00:13:04.760 --> 00:13:07.460
It's going to be equal to 0.

00:13:07.460 --> 00:13:10.520
This one right here is going
to be v1 dot v3.

00:13:10.520 --> 00:13:12.400
Well that's going to be 0.

00:13:12.400 --> 00:13:16.480
v1 dot anything other than
v1 is going to be 0.

00:13:16.480 --> 00:13:19.770
Similarly, everything here
in the second row,

00:13:19.770 --> 00:13:21.670
it's going to be v2.

00:13:21.670 --> 00:13:25.400
The first column in the second
row is going to be v2 dot v1,

00:13:25.400 --> 00:13:27.330
which is clearly 0.

00:13:27.330 --> 00:13:29.580
And then you have v2
dot v2, which is 1.

00:13:29.580 --> 00:13:32.130
And then v2 dot all the rest
of stuff is going to be 0.

00:13:32.130 --> 00:13:34.210
They're all orthogonal with
respect to each other.

00:13:34.210 --> 00:13:38.220
And so everything else, if your
row and your column is

00:13:38.220 --> 00:13:40.650
not the same-- Well, if your
row and your column is the

00:13:40.650 --> 00:13:43.070
same, you're going to be dotting
the same vectors, so

00:13:43.070 --> 00:13:44.480
you're going to be getting
1, because all

00:13:44.480 --> 00:13:45.560
their lengths are 1.

00:13:45.560 --> 00:13:47.990
But if your row and column are
not the same, you're going to

00:13:47.990 --> 00:13:50.470
be taking the dot product of two
different members of your

00:13:50.470 --> 00:13:52.040
orthonormal basis.

00:13:52.040 --> 00:13:53.760
And they're all orthogonal, so
you're just going to get a

00:13:53.760 --> 00:13:55.010
bunch of 0's.

00:13:58.520 --> 00:13:59.660
Now, what is this?

00:13:59.660 --> 00:14:02.430
You have 0's everywhere, with
1's down the diagonal.

00:14:02.430 --> 00:14:05.710
It's a k by k matrix.

00:14:05.710 --> 00:14:08.220
This is the identity
matrix in Rk.

00:14:12.060 --> 00:14:14.330
So normally this was
our definition.

00:14:14.330 --> 00:14:17.730
This was our definition of, or
this is our way of finding our

00:14:17.730 --> 00:14:19.780
transformation matrix
for the projection

00:14:19.780 --> 00:14:21.820
of x onto some subspace.

00:14:21.820 --> 00:14:33.770
But that simply, if we assume
an orthonormal basis, then A

00:14:33.770 --> 00:14:40.210
transpose A becomes the k
by k identity matrix.

00:14:40.210 --> 00:14:42.220
And so what's the inverse
of the identity matrix?

00:14:42.220 --> 00:14:47.260
So A transpose A inverse becomes
the inverse of the k

00:14:47.260 --> 00:14:50.470
by k identity matrix,
which is just the k

00:14:50.470 --> 00:14:52.180
by k identity matrix.

00:14:52.180 --> 00:14:57.550
So this simplifies to the
projection onto V of our

00:14:57.550 --> 00:15:03.610
vector x, simplifies to A
times the inverse of the

00:15:03.610 --> 00:15:05.140
identity matrix-- It was just
the identity matrix.

00:15:05.140 --> 00:15:10.620
So it's just A times Ik, times
A transpose-- I always forget

00:15:10.620 --> 00:15:14.270
that second A transpose
right there-- times x.

00:15:14.270 --> 00:15:15.380
And we could just ignore this.

00:15:15.380 --> 00:15:16.550
That does nothing to it.

00:15:16.550 --> 00:15:25.080
So it's just equal to A times A
transpose, times x, which is

00:15:25.080 --> 00:15:26.740
a huge simplification.

00:15:26.740 --> 00:15:31.190
I still have to do a matrix
product, but finding the

00:15:31.190 --> 00:15:35.200
transpose of a matrix is
pretty straightforward.

00:15:35.200 --> 00:15:38.080
You just switch the rows
and the columns.

00:15:38.080 --> 00:15:40.960
First multiplying the transpose
times A, that's a

00:15:40.960 --> 00:15:41.670
lot of work.

00:15:41.670 --> 00:15:44.020
But it's a huge amount
of work to find the

00:15:44.020 --> 00:15:45.520
inverse of this thing.

00:15:45.520 --> 00:15:50.310
But now, since we assumed that
these columns here form an

00:15:50.310 --> 00:15:52.530
orthonormal set, this
just gets reduced to

00:15:52.530 --> 00:15:53.650
the identity matrix.

00:15:53.650 --> 00:15:57.550
And the projection of x onto V
is just equal to A times A

00:15:57.550 --> 00:16:00.890
transpose, where A is the
matrix where each of the

00:16:00.890 --> 00:16:07.750
column vectors are the basis
vectors for our subspace V.

00:16:07.750 --> 00:16:10.690
Anyway, hopefully that gives you
even more appreciation for

00:16:10.690 --> 00:16:11.940
orthonormal bases.


Finding projection onto subspace with orthonormal basis example

WEBVTT
Kind: captions
Language: en

00:00:00.650 --> 00:00:03.420
We saw on the last video that
if I have some sort of

00:00:03.420 --> 00:00:07.910
orthonormal basis, I should have
a shorthand for this-- if

00:00:07.910 --> 00:00:17.860
I have an orthonormal basis,
then to find for a subspace V,

00:00:17.860 --> 00:00:23.290
and if I want to find the
projection of some vector x in

00:00:23.290 --> 00:00:30.670
Rn onto V, the transformation
matrix simplifies to A times A

00:00:30.670 --> 00:00:35.030
transpose times x.

00:00:35.030 --> 00:00:41.040
Where A is equal to essentially,
or exactly, the

00:00:41.040 --> 00:00:43.490
matrix with the basis
vectors as columns.

00:00:43.490 --> 00:00:48.780
So lets say v1, v2, all the way
through vk, these are the

00:00:48.780 --> 00:00:50.790
basis vectors.

00:00:50.790 --> 00:00:53.290
Basis orthonormal, maybe I'll
write it like this,

00:00:53.290 --> 00:00:58.150
orthonormal basis
vectors for V.

00:00:58.150 --> 00:01:00.380
We saw this in the last video,
and that was another reason

00:01:00.380 --> 00:01:02.970
why we like orthonormal bases.

00:01:02.970 --> 00:01:05.670
Let's do this with an actual
concrete example.

00:01:05.670 --> 00:01:14.530
So let's say V is equal to
the span of the vector

00:01:14.530 --> 00:01:21.940
1/3, 2/3, and 2/3.

00:01:21.940 --> 00:01:33.160
And the vector 2/3, 1/3,
and minus 2/3.

00:01:33.160 --> 00:01:36.560
Now, we've already seen that
these two guys are linearly

00:01:36.560 --> 00:01:39.060
independent and they both have
length 1, and then they're

00:01:39.060 --> 00:01:41.160
both orthogonal to each other.

00:01:41.160 --> 00:01:45.390
So we could say b, so we can say
the set-- let me write it

00:01:45.390 --> 00:01:48.220
this way-- we'll call this
vector 1 for shorthand, if

00:01:48.220 --> 00:01:54.780
that's v1 and that this is v2,
we know that the set of v1 and

00:01:54.780 --> 00:02:08.370
v2, is an orthonormal
basis for V.

00:02:08.370 --> 00:02:14.040
Now, we want to use this result
to find the projection.

00:02:14.040 --> 00:02:17.040
We want to find the
transformation matrix for the

00:02:17.040 --> 00:02:21.930
projection of any vector x in
R-- well in this case, it's

00:02:21.930 --> 00:02:26.440
going to be in R3, onto
our subspace, onto V.

00:02:26.440 --> 00:02:29.430
And the subspace is going
to be a plane in R3.

00:02:29.430 --> 00:02:30.480
What's it going to be?

00:02:30.480 --> 00:02:34.550
Well, we found the result that
we just have to construct-- we

00:02:34.550 --> 00:02:39.400
have to construct a matrix A,
which is equal to-- which has

00:02:39.400 --> 00:02:41.060
these guys as a column
vectors.

00:02:41.060 --> 00:02:51.930
So 1/3, 2/3, 2/3, and 2/3,
1/3, and minus 2/3.

00:02:51.930 --> 00:02:55.490
And if we construct A in that
way, then the projection of x

00:02:55.490 --> 00:02:57.270
onto V, this linear
transformation can be

00:02:57.270 --> 00:03:05.200
represented as A times
A transpose times x.

00:03:05.200 --> 00:03:07.490
So to find our transformation
matrix, we just have to

00:03:07.490 --> 00:03:09.770
multiply this guy times
his transpose.

00:03:09.770 --> 00:03:11.190
So let's do that.

00:03:11.190 --> 00:03:14.300
Let me just copy
and paste this.

00:03:14.300 --> 00:03:19.310
OK, let me do it right here.

00:03:23.270 --> 00:03:24.720
So that's A.

00:03:24.720 --> 00:03:27.870
I need to multiply that
times A transpose.

00:03:27.870 --> 00:03:39.590
A transpose is just going to
be 1/3, 2/3, 2/3, 1/3, and

00:03:39.590 --> 00:03:40.930
then 2/3, minus 2/3.

00:03:46.340 --> 00:03:47.490
That's A transpose.

00:03:47.490 --> 00:03:50.530
So what is this going
to be equal to?

00:03:50.530 --> 00:03:55.020
We have a 3 by 2, times a 2 by
3 matrix, so it's going to

00:03:55.020 --> 00:03:58.375
result in a 3 by 3 matrix.

00:04:00.980 --> 00:04:03.970
Which makes sense, because this
thing right here should

00:04:03.970 --> 00:04:06.830
be a mapping from R3 to R3.

00:04:06.830 --> 00:04:07.190
Right?

00:04:07.190 --> 00:04:10.110
You give me some member of R3,
and I'm going to give you

00:04:10.110 --> 00:04:15.370
another member of R3 that is in
my subspace V, and is the

00:04:15.370 --> 00:04:18.019
projection of x onto V, and
we've also seen, the closest

00:04:18.019 --> 00:04:20.410
member of V to x.

00:04:20.410 --> 00:04:21.269
So what is this going to be?

00:04:21.269 --> 00:04:24.960
It's going to be a
3 by 3 matrix.

00:04:24.960 --> 00:04:27.540
We have a 3 by 3 matrix.

00:04:27.540 --> 00:04:31.000
And so this first term, right
here, we're going to dot this

00:04:31.000 --> 00:04:32.380
guy with this guy.

00:04:32.380 --> 00:04:38.210
So it's going to be 1/3 times
1/3, which is 1/9,

00:04:38.210 --> 00:04:41.320
plus 2/3 times 2/3.

00:04:41.320 --> 00:04:45.010
So it's going to be
1/9 plus 4/9.

00:04:45.010 --> 00:04:46.590
So I think we're going to be
dealing with a lot of ninths

00:04:46.590 --> 00:04:49.520
here, so let me just divide
everything by nine.

00:04:49.520 --> 00:04:53.220
So it's going be 1/9 plus 4/9
which is 5/9, but I'll just

00:04:53.220 --> 00:04:54.440
write a 5 here.

00:04:54.440 --> 00:04:55.660
And just know that we're
going to divide

00:04:55.660 --> 00:04:57.720
everything by 9 at the end.

00:04:57.720 --> 00:05:00.990
So that's that guy dotted
with that guy.

00:05:00.990 --> 00:05:03.330
Now let's take the dot of
this guy with this guy.

00:05:03.330 --> 00:05:09.480
I'm going to get 2/9
plus 2/9, right?

00:05:09.480 --> 00:05:12.370
That's 4/9.

00:05:12.370 --> 00:05:14.520
Now I'm going to dot this
guy with this guy.

00:05:14.520 --> 00:05:22.170
2/9 minus 4/9, that
is minus 2/9.

00:05:22.170 --> 00:05:24.470
Now let's take the dot of the
this row, we're in the second

00:05:24.470 --> 00:05:27.010
row and we're going to have to--
the dot of 2/3 and 1/3 is

00:05:27.010 --> 00:05:32.706
2/9 plus 2/9, that is 4/9.

00:05:32.706 --> 00:05:34.910
Let's put a 4 there,
we have 4/9.

00:05:34.910 --> 00:05:40.400
Then we have 2/9 plus
1/9 is 3/9.

00:05:40.400 --> 00:05:42.110
Let me get make sure
I got that right.

00:05:42.110 --> 00:05:47.290
2/9-- oh sorry, 2/3 times 2/3 is
4/3, so it's 4- sorry, 2/3

00:05:47.290 --> 00:05:52.360
times 2/3 is 4/9, plus
1/9, is 5/9.

00:05:52.360 --> 00:05:58.110
And then we have 4/9
minus 2/9 is 2/9.

00:05:58.110 --> 00:06:01.110
And then, let's do this last
one, we're almost there.

00:06:01.110 --> 00:06:03.320
I hope you already appreciate
that this is a lot less

00:06:03.320 --> 00:06:06.040
painful than we had to take A
transpose A, and then inverse

00:06:06.040 --> 00:06:06.640
it in between.

00:06:06.640 --> 00:06:08.870
We're just taking A
times A transpose.

00:06:08.870 --> 00:06:14.150
So 2/3 times 1/3, that's
2/9 minus 4/9, so

00:06:14.150 --> 00:06:16.260
that's minus 2/9.

00:06:16.260 --> 00:06:21.560
And then we have 4/9 minus
2/9, that's 2/9.

00:06:21.560 --> 00:06:28.850
And then we have 4/9 plus
4/9, so that is 8/9.

00:06:28.850 --> 00:06:30.990
So just like that we were
able to figure out the

00:06:30.990 --> 00:06:35.730
transformation matrix for the
projection of any vector in R3

00:06:35.730 --> 00:06:36.700
onto our subspace V.

00:06:36.700 --> 00:06:39.700
And this was a lot less painful
than the ways that

00:06:39.700 --> 00:06:41.670
we've done it in the past.


Coordinates with respect to orthonormal bases

WEBVTT
Kind: captions
Language: en

00:00:00.850 --> 00:00:04.240
We know what an orthonormal
basis is, but the next obvious

00:00:04.240 --> 00:00:06.160
question is, what are
they good for?

00:00:06.160 --> 00:00:09.100
And one of the many answers to
that question is that they

00:00:09.100 --> 00:00:11.670
make for good coordinate
systems or

00:00:11.670 --> 00:00:13.560
good coordinate bases.

00:00:18.670 --> 00:00:21.630
For example, the standard
basis, or the standard

00:00:21.630 --> 00:00:25.270
coordinates-- Let me write
the standard basis in Rn.

00:00:25.270 --> 00:00:38.160
So if we're dealing with Rn--
So the standard basis for Rn

00:00:38.160 --> 00:00:42.310
is equal to-- Well, I could
write it as e1, e2, and all of

00:00:42.310 --> 00:00:44.280
that, but I'll actually
write out the vectors.

00:00:44.280 --> 00:00:50.580
You know, e1 is just 1 with a
bunch of 0's all the way.

00:00:50.580 --> 00:00:54.780
And this is going to be n 0's
right there. e2 is going to be

00:00:54.780 --> 00:00:58.600
0, 1 with a bunch of
0's all the way.

00:00:58.600 --> 00:01:02.590
And then you're going to go all
the way to en, which is

00:01:02.590 --> 00:01:04.550
going to have a bunch of 0's.

00:01:04.550 --> 00:01:06.510
And then you're going
to have a 1.

00:01:06.510 --> 00:01:09.270
The standard basis that we've
been dealing with throughout

00:01:09.270 --> 00:01:13.280
this playlist is an orthonormal
set, is an

00:01:13.280 --> 00:01:21.275
orthonormal basis.

00:01:21.275 --> 00:01:23.490
Clearly the length of any
of these guys is 1.

00:01:23.490 --> 00:01:25.870
If you were to take this guy
dotted with yourself, you're

00:01:25.870 --> 00:01:29.410
going to get 1 times 1, plus a
bunch of 0's times each other.

00:01:29.410 --> 00:01:30.690
So it's going to
be one squared.

00:01:30.690 --> 00:01:31.560
It's going to be 1.

00:01:31.560 --> 00:01:33.210
And that's true of any
of these guys.

00:01:33.210 --> 00:01:34.380
And clearly they're
orthogonal.

00:01:34.380 --> 00:01:36.695
You take the dot product of any
of these guys with any of

00:01:36.695 --> 00:01:38.870
the other one's, you're going
to get a 1 times 0, and a 1

00:01:38.870 --> 00:01:40.970
times 0, and then
a bunch of 0's.

00:01:40.970 --> 00:01:42.070
You're going to get 0's.

00:01:42.070 --> 00:01:44.590
So they clearly each
have lengths of 1.

00:01:44.590 --> 00:01:45.790
And they're all orthogonal.

00:01:45.790 --> 00:01:47.740
And clearly, this is a good
coordinate system.

00:01:52.490 --> 00:01:54.570
But what about other
orthonormal bases.

00:01:54.570 --> 00:01:58.210
Obviously this is one specific
example I need to show you

00:01:58.210 --> 00:02:02.080
that all orthonormal bases
make for good coordinate

00:02:02.080 --> 00:02:09.620
systems. So let's say I have
some set, some orthonormal set

00:02:09.620 --> 00:02:11.000
of vectors.

00:02:11.000 --> 00:02:16.870
So this is v1, v2, all
the way to vk.

00:02:16.870 --> 00:02:34.250
And it is an orthonormal basis
for some subspace V.

00:02:34.250 --> 00:02:38.810
And this is a k-dimensional
subspace, because you have k

00:02:38.810 --> 00:02:42.140
basis vectors in your
basis, or you have k

00:02:42.140 --> 00:02:43.290
vectors in your basis.

00:02:43.290 --> 00:02:46.730
Now let's experiment with
this a little bit.

00:02:46.730 --> 00:02:50.160
I'm claiming that the coordinate
system, with

00:02:50.160 --> 00:02:51.410
respect to this, is good.

00:02:51.410 --> 00:02:52.920
But what does it mean
to be good?

00:02:52.920 --> 00:02:56.460
I mean, the standard basis is
good, but, you know, that's

00:02:56.460 --> 00:02:59.070
just because we use it and it
seems to be easy to deal with.

00:02:59.070 --> 00:03:01.300
But let's see, when
I say good in this

00:03:01.300 --> 00:03:03.060
context, what do I mean?

00:03:03.060 --> 00:03:04.090
So let's experiment.

00:03:04.090 --> 00:03:09.670
If I say that some vector x is a
member of V, that means that

00:03:09.670 --> 00:03:12.400
x can be represented as a linear
combination of these

00:03:12.400 --> 00:03:13.890
characters up here.

00:03:13.890 --> 00:03:20.690
So x can be represented as some
constant times v1, plus

00:03:20.690 --> 00:03:26.150
some constant times v2, plus,
you know, the ith constant

00:03:26.150 --> 00:03:30.850
times vi, all the way, if you
just keep going, all the way

00:03:30.850 --> 00:03:34.690
to the kth constant times vk.

00:03:34.690 --> 00:03:37.110
That's what being a member
of the subspace means.

00:03:37.110 --> 00:03:39.775
The subspace is spanned by these
guys, so this guy can be

00:03:39.775 --> 00:03:42.270
represented as a linear
combination of those guys.

00:03:42.270 --> 00:03:45.525
Now what happens if we take the
dot product of both sides

00:03:45.525 --> 00:03:48.400
of this equation with vi?

00:03:48.400 --> 00:03:50.830
So I'm going to take vi, I'm
going to dot both of these

00:03:50.830 --> 00:03:52.250
sides with vi.

00:03:52.250 --> 00:03:57.430
So I get vi, dotted with x, is
going to be equal to what?

00:03:57.430 --> 00:03:59.990
Well it's going to be-- we could
just put the constants

00:03:59.990 --> 00:04:07.190
out --it's going to be c1 times
vi, dot v1, plus c2

00:04:07.190 --> 00:04:16.720
times vi dot v2, plus all the
way to ci, times vi dot vi,

00:04:16.720 --> 00:04:19.899
and then you keep going,
plus all the way to ck,

00:04:19.899 --> 00:04:23.720
times vi dot vk.

00:04:23.720 --> 00:04:26.410
Now, this is an orthonormal
set.

00:04:26.410 --> 00:04:28.690
That means, if I take two
vectors that are different

00:04:28.690 --> 00:04:32.340
than each other in our basis
right here, that if you take

00:04:32.340 --> 00:04:34.140
their dot product, you're
going to get 0.

00:04:34.140 --> 00:04:35.980
They're orthogonal
to each other.

00:04:35.980 --> 00:04:38.560
So these are two different
vectors in our set.

00:04:38.560 --> 00:04:40.340
They're going to be orthogonal,
so this term is

00:04:40.340 --> 00:04:40.990
going to be 0.

00:04:40.990 --> 00:04:43.690
It's going to be 0 times c1,
so it's going to be 0.

00:04:43.690 --> 00:04:46.580
This term is also going to be
0, assuming that i isn't 2.

00:04:46.580 --> 00:04:48.250
Let's just assume that.

00:04:48.250 --> 00:04:50.375
This term over here, let's
assume that i isn't k.

00:04:50.375 --> 00:04:52.480
It's also going to
be equal to 0.

00:04:52.480 --> 00:04:55.610
So all of the terms are going
to be 0, except for the case

00:04:55.610 --> 00:04:59.820
where v sub i is equal to, well,
in this case, v sub i.

00:04:59.820 --> 00:05:01.410
Except for the case where
this subscript is

00:05:01.410 --> 00:05:02.810
equal to that subscript.

00:05:02.810 --> 00:05:07.420
And then what is v sub
i, dot v sub i?

00:05:07.420 --> 00:05:09.100
You know, orthonormal
has two parts.

00:05:09.100 --> 00:05:11.560
They're orthogonal to each
other, and they're each

00:05:11.560 --> 00:05:14.850
normalized, or they each
have length 1.

00:05:14.850 --> 00:05:18.340
So v sub i, dot v sub i, dot
with v sub i is going to be

00:05:18.340 --> 00:05:19.630
equal to 1.

00:05:19.630 --> 00:05:23.950
So this whole equation has
simplified to v sub i-- which

00:05:23.950 --> 00:05:27.620
is one of these guys, it's the
ith member of our basis set

00:05:27.620 --> 00:05:32.290
--dot x-- where x is just any
member of the subspace --is

00:05:32.290 --> 00:05:34.780
equal to the only thing that's
left over is 1 times ci.

00:05:38.750 --> 00:05:40.840
So it's just equal to ci.

00:05:40.840 --> 00:05:42.710
Now why is this useful?

00:05:42.710 --> 00:05:44.300
You know, we were just
experimenting around, and we

00:05:44.300 --> 00:05:46.570
got this nice little
result here.

00:05:46.570 --> 00:05:51.800
Why is this useful in terms of
having a coordinate system

00:05:51.800 --> 00:05:53.650
with respect to this basis?

00:05:53.650 --> 00:05:57.910
So let's remind ourselves what
a coordinate system is here.

00:05:57.910 --> 00:06:02.160
So if we wanted to represent
the vector x, which is a

00:06:02.160 --> 00:06:07.100
member of our subspace, with
coordinates that are with

00:06:07.100 --> 00:06:11.050
respect to this basis of the
subspace-- Right, a subspace

00:06:11.050 --> 00:06:12.910
can have many bases,
but this is the

00:06:12.910 --> 00:06:14.400
basis that we're choosing.

00:06:14.400 --> 00:06:18.990
So we want to write x with
respect to the basis B.

00:06:18.990 --> 00:06:20.960
What do we do?

00:06:20.960 --> 00:06:26.250
The coordinates are just going
to be, the coefficients on the

00:06:26.250 --> 00:06:27.830
different basis vectors.

00:06:27.830 --> 00:06:29.710
This is all a bit of review.

00:06:29.710 --> 00:06:35.350
It's going to be c1, c2, we're
going to go down to ci, and

00:06:35.350 --> 00:06:37.550
then you're going all
the way to ck.

00:06:37.550 --> 00:06:39.040
You're going to have k terms,
because this is a

00:06:39.040 --> 00:06:42.070
k-dimensional subspace.

00:06:42.070 --> 00:06:45.570
Now normally this is not such
an easy thing to figure out.

00:06:45.570 --> 00:06:49.295
If I give you some vector x-- I
mean, we've seen it before.

00:06:51.960 --> 00:06:56.470
Well, if you have x represented
in B coordinate

00:06:56.470 --> 00:07:01.460
system, then you can multiply
it times the change of basis

00:07:01.460 --> 00:07:04.830
matrix, and you can just
get regular x.

00:07:04.830 --> 00:07:10.610
But if have regular x, and you
need to find this, one, if C

00:07:10.610 --> 00:07:13.660
is invertible, then you can
apply this equation right

00:07:13.660 --> 00:07:17.020
here, which isn't
always the case.

00:07:17.020 --> 00:07:18.645
This is only if C
is invertible.

00:07:24.370 --> 00:07:26.880
And, first of all, C will not
always be invertible.

00:07:26.880 --> 00:07:28.750
If this isn't a square
matrix, then this

00:07:28.750 --> 00:07:30.740
isn't going to apply.

00:07:30.740 --> 00:07:36.590
So this is one way that if I
give you your x, to get your B

00:07:36.590 --> 00:07:38.040
representation of x.

00:07:38.040 --> 00:07:39.730
But if C isn't invertible, then
you're just going to have

00:07:39.730 --> 00:07:40.740
to solve this equation.

00:07:40.740 --> 00:07:42.690
You're going to have something
on the right hand side here.

00:07:42.690 --> 00:07:44.780
You're going to have a change
of basis matrix.

00:07:44.780 --> 00:07:47.320
And then you're going to have
to solve that equation.

00:07:47.320 --> 00:07:48.960
You know, for an arbitrary
basis, that

00:07:48.960 --> 00:07:50.690
can be pretty painful.

00:07:50.690 --> 00:07:52.730
But what do we have here?

00:07:52.730 --> 00:07:56.210
We have a very simple solution
for finding the different

00:07:56.210 --> 00:07:58.030
coordinates of x.

00:07:58.030 --> 00:08:02.930
So this is the same thing as
being equal to-- c1 is just

00:08:02.930 --> 00:08:07.950
going to be equal to my first
basis vector, dotted with x.

00:08:07.950 --> 00:08:11.930
We say ci is just the ith basis
vector dotted with x.

00:08:11.930 --> 00:08:15.170
So c1 is going to be the first
basis vector dotted with x.

00:08:15.170 --> 00:08:20.570
c2 is going to be my second
basis vector dotted with x.

00:08:20.570 --> 00:08:25.640
And you're going to go all the
way down to ck is going to be

00:08:25.640 --> 00:08:29.060
my kth basis vector
dotted with x.

00:08:29.060 --> 00:08:31.930
And let me show you that this
is actually easier.

00:08:31.930 --> 00:08:37.720
So let's do a concrete
example.

00:08:37.720 --> 00:08:41.260
I want to leave this
result up here.

00:08:41.260 --> 00:08:44.760
Let's say that I have
two vectors.

00:08:44.760 --> 00:08:50.640
Let's say that v1 is
the vector 3/5.

00:08:50.640 --> 00:08:52.290
Let me write it this way.

00:08:52.290 --> 00:08:57.180
Let's say it's 3/5 and 4/5.

00:08:57.180 --> 00:09:06.690
And that v2 is equal
to minus 4/5, 3/5.

00:09:10.490 --> 00:09:15.640
And let's say that the set B is
equal to-- It's comprised

00:09:15.640 --> 00:09:20.460
of just those two vectors,
v1 and v2.

00:09:20.460 --> 00:09:23.460
Now, I'm claiming, or I'm about
to claim, that this an

00:09:23.460 --> 00:09:25.340
orthonormal set.

00:09:25.340 --> 00:09:27.370
Let's just prove it
to ourselves.

00:09:27.370 --> 00:09:31.990
So what is the length
of v1 squared?

00:09:31.990 --> 00:09:34.260
Well, that's just v1
dotted with itself.

00:09:34.260 --> 00:09:40.550
So that's 3/5 squared, which
is 9/25, plus 4/5 squared,

00:09:40.550 --> 00:09:46.740
which is 16/25, which is equal
to 25/25, which is equal to 1.

00:09:46.740 --> 00:09:49.170
So this guy definitely
has length 1.

00:09:49.170 --> 00:09:52.760
What is the length
of v2 squared?

00:09:52.760 --> 00:09:54.500
Well, it's going to be
this guy squared.

00:09:54.500 --> 00:10:00.380
Negative 4/5 squared is 9/25,
plus 3-- Sorry, minus 4/5

00:10:00.380 --> 00:10:03.870
squared is plus 16/25.

00:10:03.870 --> 00:10:07.500
And then 3/5 squared is 9/25.

00:10:07.500 --> 00:10:11.070
And, once again, the length
squared is going to be 1, or

00:10:11.070 --> 00:10:12.290
the length is going to be 1.

00:10:12.290 --> 00:10:14.470
So both of these guys definitely
have length 1.

00:10:14.470 --> 00:10:17.130
And now we just have to verify
that they're orthogonal with

00:10:17.130 --> 00:10:18.600
respect to each other.

00:10:18.600 --> 00:10:21.940
So what is v1 dot v2?

00:10:21.940 --> 00:10:25.570
It's going to be 3/5
times minus 4/5.

00:10:25.570 --> 00:10:32.610
So it's going to be minus 12/25,
plus 4/5 times 3/5,

00:10:32.610 --> 00:10:37.180
which is going to be plus 12/25,
which is equal to 0.

00:10:37.180 --> 00:10:39.510
So these guys are definitely
orthogonal with respect to

00:10:39.510 --> 00:10:41.770
each other, and their lengths
are 1, so this is definitely

00:10:41.770 --> 00:10:47.460
an orthonormal set.

00:10:47.460 --> 00:10:49.910
And so that also tells us that
they're linearly independent.

00:10:49.910 --> 00:11:04.580
So let's say that my set B is
the basis for some subspace V.

00:11:09.170 --> 00:11:11.410
And actually, it's not a-- We
don't even have to say that--

00:11:11.410 --> 00:11:14.320
it's the basis for R2.

00:11:14.320 --> 00:11:15.350
It's a basis for R2.

00:11:15.350 --> 00:11:16.960
And how do we know it's
a basis for R2?

00:11:16.960 --> 00:11:23.940
I have two linearly independent
vectors in my

00:11:23.940 --> 00:11:27.950
basis, and it's spanning a
two-dimensional space, R2, so

00:11:27.950 --> 00:11:30.880
this can be a basis
for all of R2.

00:11:30.880 --> 00:11:35.100
Now, given what we've seen
already, let's pick some

00:11:35.100 --> 00:11:37.320
random member of R2.

00:11:37.320 --> 00:11:40.480
So if we pick some random member
of R2, let's say that x

00:11:40.480 --> 00:11:42.990
is equal to-- I don't know, I'm
just going to pick some

00:11:42.990 --> 00:11:46.040
random numbers --9
and minus 2.

00:11:48.600 --> 00:11:51.120
If we didn't know this was an
orthonormal basis and we

00:11:51.120 --> 00:11:56.550
wanted to figure out x in B's
coordinates, what we would

00:11:56.550 --> 00:11:58.730
have to do is we would
have to create the

00:11:58.730 --> 00:12:00.690
change of basis matrix.

00:12:00.690 --> 00:12:05.110
So the change of basis matrix
would be 3-- let me write it

00:12:05.110 --> 00:12:13.392
like it would be-- 3/5, 4/5,
minus 4/5, and then 3/5.

00:12:13.392 --> 00:12:18.780
And we would say that times my B
coordinate representation of

00:12:18.780 --> 00:12:25.530
x is going to be equal to my
regular representation of x,

00:12:25.530 --> 00:12:29.020
or my standard coordinates
of x.

00:12:29.020 --> 00:12:31.720
And I would have to solve this 2
by 2 system, and in a 2 by 2

00:12:31.720 --> 00:12:33.190
case it's not so bad.

00:12:33.190 --> 00:12:36.960
But we have this neat tool here
for orthonormal sets, or

00:12:36.960 --> 00:12:38.810
orthonormal bases.

00:12:38.810 --> 00:12:44.410
So, instead of solving this
equation, we can just say that

00:12:44.410 --> 00:12:52.700
x represented in B coordinates
is going to be equal to-- let

00:12:52.700 --> 00:12:57.620
me scroll down a little bit--
it's going to be equal to v1,

00:12:57.620 --> 00:13:00.510
which is this guy right
here, dotted with x.

00:13:00.510 --> 00:13:05.610
So it's going to be v1 dot x.

00:13:05.610 --> 00:13:08.160
And then this guy right here is
just going to be v2 dot x.

00:13:08.160 --> 00:13:12.770
And I can do this because this
is an orthonormal basis.

00:13:12.770 --> 00:13:14.322
And what is the equal to?

00:13:14.322 --> 00:13:16.660
x is 9 minus 2.

00:13:20.850 --> 00:13:25.800
If I dot that with v1,
I get 9 times 3/5,

00:13:25.800 --> 00:13:32.160
which is 27/5, right.

00:13:32.160 --> 00:13:44.300
9 times 3 is 27/5, plus minus
2 times 4/5, so that's minus

00:13:44.300 --> 00:13:45.240
8/5, right.

00:13:45.240 --> 00:13:48.650
Minus 2 times 4/5
is minus 8/5.

00:13:51.410 --> 00:13:54.790
And then the second
term is v2 dot x.

00:13:54.790 --> 00:13:56.010
So v2 dot x.

00:13:56.010 --> 00:14:00.000
I get 9 times-- let me scroll
up a little bit-- 9 times

00:14:00.000 --> 00:14:07.970
minus 4/5, that's minus 36/5,
plus minus 2 times 3/5, so

00:14:07.970 --> 00:14:13.950
that's plus minus 2 times
3/5 is minus 6/5.

00:14:13.950 --> 00:14:17.730
So the B coordinate
representation of x, just

00:14:17.730 --> 00:14:20.430
being able to use this property
right here of

00:14:20.430 --> 00:14:24.400
orthonormal bases, is equal
to-- What is this?

00:14:24.400 --> 00:14:29.610
27 minus 8 is 19/5,
and then minus 36,

00:14:29.610 --> 00:14:33.140
minus 6 is minus 42/5.

00:14:33.140 --> 00:14:36.150
Not a pretty answer but, you
know, we would have had this

00:14:36.150 --> 00:14:37.730
ugly answer either
way we solved it.

00:14:37.730 --> 00:14:39.670
But hopefully you see that when
we have an orthonormal

00:14:39.670 --> 00:14:44.900
basis, solving for the
coordinates with respect to

00:14:44.900 --> 00:14:46.990
that basis becomes
a lot easier.

00:14:46.990 --> 00:14:50.220
This is just an example in R2.

00:14:50.220 --> 00:14:52.760
You can imagine how difficult
it could be if you start

00:14:52.760 --> 00:14:57.760
dealing with, you know, if you
start dealing with R4 or R100.

00:14:57.760 --> 00:15:00.020
Then all of a sudden solving
these systems isn't so easy,

00:15:00.020 --> 00:15:03.380
but taking dot products are
always fairly straightforward.

00:15:03.380 --> 00:15:06.530
So earlier in this video when I
said, orthonormal basis, you

00:15:06.530 --> 00:15:07.520
know, what are they good for?

00:15:07.520 --> 00:15:10.440
And I said, you know, standard
basis is good.

00:15:10.440 --> 00:15:11.800
That these are good coordinates
systems. You've

00:15:11.800 --> 00:15:12.990
used it before.

00:15:12.990 --> 00:15:15.600
You know, I didn't really put
a lot of context around what

00:15:15.600 --> 00:15:16.300
it meant to be good.

00:15:16.300 --> 00:15:17.900
But now we see one version
of what it's good for.

00:15:17.900 --> 00:15:23.850
It's very easy to find
coordinates in an orthonormal

00:15:23.850 --> 00:15:25.570
basis, or coordinates
with respect to

00:15:25.570 --> 00:15:27.610
an orthonormal basis.


Introduction to orthonormal bases

WEBVTT
Kind: captions
Language: en

00:00:00.600 --> 00:00:02.915
Let's say I've got me
a set of vectors.

00:00:02.915 --> 00:00:06.720
So let me call my set B.

00:00:06.720 --> 00:00:13.130
And let's say I have the vectors
v1, v2, all the way

00:00:13.130 --> 00:00:15.380
through vk.

00:00:15.380 --> 00:00:17.960
Now let's say this isn't just
any set of vectors.

00:00:17.960 --> 00:00:21.160
There's some interesting things
about these vectors.

00:00:21.160 --> 00:00:25.080
The first thing is that all of
these guys have length of 1.

00:00:25.080 --> 00:00:36.080
So we could say the length of
vector vi is equal to 1 for i

00:00:36.080 --> 00:00:38.890
is equal to-- well we could say
between 1 and k or i is

00:00:38.890 --> 00:00:40.750
equal to 1, 2, all
the way to k.

00:00:40.750 --> 00:00:43.010
All of these guys have
length equal 1.

00:00:43.010 --> 00:00:45.020
Or another way to say it is
that the square of their

00:00:45.020 --> 00:00:47.360
lengths are 1.

00:00:47.360 --> 00:00:50.240
The square of a vi whose
length is equal to 1.

00:00:50.240 --> 00:00:56.980
Or vi dot vi is equal to 1 for
i is any of these guys.

00:00:56.980 --> 00:00:59.630
Any i can be 1, 2, 3,
all the way to k.

00:01:04.330 --> 00:01:06.350
So that's the first interesting
thing about it.

00:01:06.350 --> 00:01:07.950
Let me write it in
regular words.

00:01:07.950 --> 00:01:19.940
All the vectors in
B have length 1.

00:01:19.940 --> 00:01:23.680
Or another way to say is that
they've all been normalized.

00:01:23.680 --> 00:01:30.260
That's another way to say that
is that they have all been

00:01:30.260 --> 00:01:31.030
normalized.

00:01:31.030 --> 00:01:32.190
Or they're all unit vectors.

00:01:32.190 --> 00:01:35.160
Normalized vectors are vectors
that you've made

00:01:35.160 --> 00:01:35.880
their lengths 1.

00:01:35.880 --> 00:01:37.400
You're turned them into
unit vectors.

00:01:37.400 --> 00:01:38.776
They have all been normalized.

00:01:41.980 --> 00:01:43.750
So that's the first
interesting thing

00:01:43.750 --> 00:01:45.100
about my set, B.

00:01:45.100 --> 00:01:48.320
And then the next interesting
thing about my set B is that

00:01:48.320 --> 00:01:52.130
all of the vectors are
orthogonal to each other.

00:01:52.130 --> 00:01:55.690
So if you dot it with itself,
if you dot a vector with

00:01:55.690 --> 00:01:57.470
itself, you get length 1.

00:01:57.470 --> 00:02:00.940
But if you take a vector and dot
it with any other vector--

00:02:00.940 --> 00:02:06.150
if you take vi and you were
to dot it with vj.

00:02:06.150 --> 00:02:09.539
So if you took v2 and dotted it
with v1, it's going to be

00:02:09.539 --> 00:02:17.120
equal to 0 for i does
not equal j.

00:02:17.120 --> 00:02:19.210
All of these guys
are orthogonal.

00:02:19.210 --> 00:02:22.060
Let me write that down.

00:02:22.060 --> 00:02:31.416
All of the vectors are
orthogonal to each other.

00:02:38.150 --> 00:02:40.390
And of course they're not
orthogonal to themselves

00:02:40.390 --> 00:02:42.160
because they all
have length 1.

00:02:42.160 --> 00:02:44.260
So if you take the dot product
with itself, you get 1.

00:02:44.260 --> 00:02:47.390
If you take a dot product with
some other guy in your set

00:02:47.390 --> 00:02:48.400
you're going to get 0.

00:02:48.400 --> 00:02:50.630
Maybe I can write it this way.

00:02:50.630 --> 00:02:56.460
vi dot vj for all the members
of the set is going to be

00:02:56.460 --> 00:03:03.330
equal to 0 for i does
not equal j.

00:03:03.330 --> 00:03:05.750
And then if these guys are the
same vector-- I'm dotting with

00:03:05.750 --> 00:03:07.760
myself-- I'm going
to have length 1.

00:03:07.760 --> 00:03:12.430
So it would equal length
1 for i is equal to j.

00:03:12.430 --> 00:03:13.530
So I've got a special set.

00:03:13.530 --> 00:03:16.890
All of these guys have length
1 and they're all orthogonal

00:03:16.890 --> 00:03:17.380
with each other.

00:03:17.380 --> 00:03:19.660
They're normalized and they're
all orthogonal.

00:03:19.660 --> 00:03:21.450
And we have a special
word for this.

00:03:21.450 --> 00:03:25.900
This is called an
orthonormal set.

00:03:25.900 --> 00:03:37.870
So B is an orthonormal set.

00:03:37.870 --> 00:03:39.560
Normal for normalized.

00:03:39.560 --> 00:03:41.130
Everything is orthogonal.

00:03:41.130 --> 00:03:43.180
They're all orthogonal relative
to each other.

00:03:43.180 --> 00:03:44.740
And everything has
been normalized.

00:03:44.740 --> 00:03:47.610
Everything has length 1.

00:03:47.610 --> 00:03:51.090
Now, the first interesting thing
about an orthonormal set

00:03:51.090 --> 00:03:55.010
is that it's also going to be
a linearly independent set.

00:03:55.010 --> 00:04:03.200
So if B is orthonormal, B is
also going to be linearly

00:04:03.200 --> 00:04:04.450
independent.

00:04:07.280 --> 00:04:08.990
And how can I show
that to you?

00:04:08.990 --> 00:04:12.230
Well let's assume that it isn't
linearly independent.

00:04:15.650 --> 00:04:23.960
Let me take vi, let me take vj
that are members of my set.

00:04:23.960 --> 00:04:28.780
And let's assume that
i does not equal j.

00:04:28.780 --> 00:04:31.250
Now, we already know that
it's an orthonormal set.

00:04:31.250 --> 00:04:38.730
So vi dot vj is going
to be equal to 0.

00:04:38.730 --> 00:04:39.500
They are orthogonal.

00:04:39.500 --> 00:04:41.500
These are two vectors
in my set.

00:04:41.500 --> 00:04:44.180
Now, let's assume that they
are linearly dependent.

00:04:44.180 --> 00:04:46.570
I want to prove that they are
linearly independent and the

00:04:46.570 --> 00:04:49.370
way I'm going to prove that is
by assuming they are linearly

00:04:49.370 --> 00:04:51.060
dependent and then arriving
at a contradiction.

00:04:54.160 --> 00:05:07.973
So let's assume that vi and
vj are linearly dependent.

00:05:10.730 --> 00:05:12.870
Well then that means that I
can represent one of these

00:05:12.870 --> 00:05:14.420
guys as a scalar multiple
the other.

00:05:14.420 --> 00:05:15.790
And I can pick either way.

00:05:15.790 --> 00:05:18.290
So let's just say, for the sake
of argument, that I can

00:05:18.290 --> 00:05:23.030
represent vi-- let's say
that vi is equal to sum

00:05:23.030 --> 00:05:28.100
scalar c times vj.

00:05:28.100 --> 00:05:30.220
That's what linear
dependency means.

00:05:30.220 --> 00:05:32.200
That one of them can be
represented as a scalar

00:05:32.200 --> 00:05:33.520
multiple of the other.

00:05:33.520 --> 00:05:35.560
Well if this is true, then
I can just substitute

00:05:35.560 --> 00:05:36.880
this back in for vi.

00:05:36.880 --> 00:05:38.250
And what do I get?

00:05:38.250 --> 00:05:42.590
I get c times vj-- which is just
another way of writing vi

00:05:42.590 --> 00:05:45.300
because I assumed linear
dependence.

00:05:45.300 --> 00:05:51.050
That dot vj has got
to be equal to 0.

00:05:51.050 --> 00:05:52.160
This guy was vi.

00:05:52.160 --> 00:05:52.880
This is vj.

00:05:52.880 --> 00:05:54.780
They are orthogonal
to each other.

00:05:54.780 --> 00:06:01.200
But this right here is just
equal to c times vj dot vj

00:06:01.200 --> 00:06:08.080
which is just equal to c times
the length of vj squared.

00:06:08.080 --> 00:06:09.720
And that has to equal 0.

00:06:09.720 --> 00:06:11.120
They are orthogonal so
that has to equal 0.

00:06:11.120 --> 00:06:18.070
Which implies that the length
of vj has to be equal to 0.

00:06:18.070 --> 00:06:21.150
If we assume that this is some
non-zero multiple, and this

00:06:21.150 --> 00:06:23.175
has to be some non-zero
multiple-- I should have

00:06:23.175 --> 00:06:26.200
written it there-- c
does not equal 0.

00:06:26.200 --> 00:06:28.470
Why does this have to be
a non-zero multiple?

00:06:28.470 --> 00:06:31.270
Because these were both
non-zero vectors.

00:06:31.270 --> 00:06:32.640
This is a non-zero vector.

00:06:32.640 --> 00:06:34.210
So this guy can't be 0.

00:06:34.210 --> 00:06:35.840
This guy has length 1.

00:06:35.840 --> 00:06:37.900
So if this is a non-zero vector,
there's no way that I

00:06:37.900 --> 00:06:39.400
can just put a 0 here.

00:06:39.400 --> 00:06:41.600
Because if I put a 0 then
I would get a 0 vector.

00:06:41.600 --> 00:06:43.070
So c can't be 0.

00:06:43.070 --> 00:06:46.400
So if c isn't 0, then this guy
right here has to be 0.

00:06:46.400 --> 00:06:48.280
And so we get that the
length of vj is 0.

00:06:48.280 --> 00:06:49.450
Which we know is false.

00:06:49.450 --> 00:06:50.590
The length of vj is 1.

00:06:50.590 --> 00:06:52.020
This is an orthonormal set.

00:06:52.020 --> 00:06:55.035
The length of all of the
members of B are 1.

00:06:55.035 --> 00:06:56.960
So we reach a contradiction.

00:06:56.960 --> 00:06:59.960
This is our contradiction.

00:06:59.960 --> 00:07:01.290
Vj is not the 0 vector.

00:07:01.290 --> 00:07:02.290
It has length 1.

00:07:02.290 --> 00:07:04.380
Contradiction.

00:07:04.380 --> 00:07:06.560
So if you have a bunch of
vectors that are orthogonal

00:07:06.560 --> 00:07:09.050
and they're non-zero, they
have to be linearly

00:07:09.050 --> 00:07:10.160
independent.

00:07:10.160 --> 00:07:11.680
Which is pretty interesting.

00:07:11.680 --> 00:07:15.460
So if I have this set, this
orthonormal set right here,

00:07:15.460 --> 00:07:19.140
it's also a set of linearly
independent vectors, so it can

00:07:19.140 --> 00:07:25.790
be a basis for a subspace.

00:07:25.790 --> 00:07:35.960
So let's say that B is the basis
for some subspace, v.

00:07:35.960 --> 00:07:47.140
Or we could say that v is equal
to the span of v1, v2,

00:07:47.140 --> 00:07:49.880
all the way to vk.

00:07:49.880 --> 00:07:52.370
Then we called B-- if it was
just a set, we'd call it a

00:07:52.370 --> 00:07:55.790
orthonormal set, but it can be
an orthonormal basis when it's

00:07:55.790 --> 00:07:57.290
spans some subspace.

00:07:57.290 --> 00:08:01.250
So we can write, we can
say that B is an

00:08:01.250 --> 00:08:10.175
orthonormal basis for v.

00:08:10.175 --> 00:08:12.890
Now everything I've done is very
abstract, but let me do

00:08:12.890 --> 00:08:14.520
some quick examples for you.

00:08:14.520 --> 00:08:17.600
Just so you understand what an
orthonormal basis looks like

00:08:17.600 --> 00:08:19.140
with real numbers.

00:08:19.140 --> 00:08:21.240
So let's say I have
two vectors.

00:08:21.240 --> 00:08:25.520
Let's say I have the vector,
v1, that is-- say we're

00:08:25.520 --> 00:08:33.700
dealing in R3 so it's 1/3,
2/3, 2/3 and 2/3.

00:08:36.260 --> 00:08:42.450
And let's say I have another
vector, v2, that is equal to

00:08:42.450 --> 00:08:47.740
2/3, 1/3, and minus 2/3.

00:08:47.740 --> 00:08:58.480
And let's say that B is
the set of v1 and v2.

00:08:58.480 --> 00:09:00.030
So the first question
is, is what are the

00:09:00.030 --> 00:09:01.830
lengths of these guys?

00:09:01.830 --> 00:09:02.816
So let's take the length.

00:09:02.816 --> 00:09:09.580
The length of v1 squared
is just v1 dot v1.

00:09:09.580 --> 00:09:13.600
Which is just 1/3 squared,
which is just 1 over 0.

00:09:13.600 --> 00:09:17.190
Plus 2/3 squared,
which is 4/9.

00:09:17.190 --> 00:09:20.370
Plus 2/3 squared,
which is 4/9.

00:09:20.370 --> 00:09:21.770
Which is equal to 1.

00:09:21.770 --> 00:09:25.230
So if the length squared is 1,
then that tells us that the

00:09:25.230 --> 00:09:28.440
length of our first vector
is equal to 1.

00:09:28.440 --> 00:09:30.640
If the square of the length is
1, you take the square root,

00:09:30.640 --> 00:09:31.970
so the length is 1.

00:09:31.970 --> 00:09:34.070
What about vector 2?

00:09:34.070 --> 00:09:43.260
Well the length of vector 2
squared is equal to v2 dot v2.

00:09:43.260 --> 00:09:47.690
Which is equal to-- let's see,
two 2/3 squared is 4/9-- plus

00:09:47.690 --> 00:09:50.680
1/3 squared is 1/9.

00:09:50.680 --> 00:09:53.470
Plus 2/3 squared is 4/9.

00:09:53.470 --> 00:09:56.340
So that is 9/9, which
is equal to 1.

00:09:56.340 --> 00:10:00.420
Which tells us that the length
of v2, the length of vector v2

00:10:00.420 --> 00:10:01.680
is equal to 1.

00:10:01.680 --> 00:10:04.200
So we know that these guys are
definitely normalized.

00:10:04.200 --> 00:10:06.360
We can call this a
normalized set.

00:10:06.360 --> 00:10:08.360
But is it an orthonormal set?

00:10:08.360 --> 00:10:10.160
Are these guys orthogonal
to each other?

00:10:10.160 --> 00:10:13.490
And to test that out we just
take their dot product.

00:10:13.490 --> 00:10:22.210
So v1 dot v2 is equal to 1/3
times 2/3, which is 2/9.

00:10:22.210 --> 00:10:27.390
Plus 2/3 times 1/3,
which is 2/9.

00:10:27.390 --> 00:10:30.360
Plus 2/3 times the minus 2/3.

00:10:30.360 --> 00:10:31.660
That's minus 4/9.

00:10:34.350 --> 00:10:35.950
2 plus 2 minus 4 is 0.

00:10:35.950 --> 00:10:36.860
So it equals 0.

00:10:36.860 --> 00:10:39.900
So these guys are indeed
orthogonal.

00:10:39.900 --> 00:10:42.140
So B is an orthonormal set.

00:10:48.600 --> 00:10:53.790
And if I have some subspace,
let's say that B is equal to

00:10:53.790 --> 00:11:01.760
the span of v1 and v2, then we
can say that the basis for v,

00:11:01.760 --> 00:11:10.400
or we could say that B is
an orthonormal basis.

00:11:13.570 --> 00:11:15.430
for V.