1
00:00:01 --> 00:00:03
The following content is
provided under a Creative
2
00:00:03 --> 00:00:05
Commons license.
Your support will help MIT
3
00:00:05 --> 00:00:08
OpenCourseWare continue to offer
high quality educational
4
00:00:08 --> 00:00:13
resources for free.
To make a donation or to view
5
00:00:13 --> 00:00:18
additional materials from
hundreds of MIT courses,
6
00:00:18 --> 00:00:23
visit MIT OpenCourseWare at
ocw.mit.edu.
7
00:00:23 --> 00:00:25
so -- OK, so remember last
time,
8
00:00:25 --> 00:00:32
on Tuesday we learned about the
chain rule,
9
00:00:32 --> 00:00:39
and so for example we saw that
if we have a function that
10
00:00:39 --> 00:00:44
depends,
sorry, on three variables,
11
00:00:44 --> 00:00:50
x,y,z,
that x,y,z themselves depend on
12
00:00:50 --> 00:00:54
some variable,
t,
13
00:00:54 --> 00:01:06
then you can find a formula for
df/dt by writing down wx/dx dt
14
00:01:06 --> 00:01:12
wy dy/dt wz dz/dt.
And, the meaning of that
15
00:01:12 --> 00:01:17
formula is that while the change
in w is caused by changes in x,
16
00:01:17 --> 00:01:21
y, and z, x,
y, and z change at rates dx/dt,
17
00:01:21 --> 00:01:25
dy/dt, dz/dt.
And, this causes a function to
18
00:01:25 --> 00:01:31
change accordingly using,
well, the partial derivatives
19
00:01:31 --> 00:01:37
tell you how sensitive w is to
changes in each variable.
20
00:01:37 --> 00:01:45
OK, so, we are going to just
rewrite this in a new notation.
21
00:01:45 --> 00:01:52
So, I'm going to rewrite this
in a more concise form as
22
00:01:52 --> 00:01:59
gradient of w dot product with
velocity vector dr/dt.
23
00:01:59 --> 00:02:04
So, the gradient of w is a
vector formed by putting
24
00:02:04 --> 00:02:08
together all of the partial
derivatives.
25
00:02:08 --> 00:02:12
OK, so it's the vector whose
components are the partials.
26
00:02:12 --> 00:02:15
And, of course,
it's a vector that depends on
27
00:02:15 --> 00:02:19
x, y, and z, right?
These guys depend on x, y, z.
28
00:02:19 --> 00:02:22
So, it's actually one vector
for each point,
29
00:02:22 --> 00:02:31
x, y, z.
You can talk about the gradient
30
00:02:31 --> 00:02:39
of w at some point,
x, y, z.
31
00:02:39 --> 00:02:41
So, at each point,
it gives you a vector.
32
00:02:41 --> 00:02:47
That actually is what we will
call later a vector field.
33
00:02:47 --> 00:02:59
We'll get back to that later.
And, dr/dt is just the velocity
34
00:02:59 --> 00:03:07
vector dx/dt,
dy/dt, dz/dt.
35
00:03:07 --> 00:03:14
OK, so the new definition for
today is the definition of the
36
00:03:14 --> 00:03:18
gradient vector.
And, our goal will be to
37
00:03:18 --> 00:03:21
understand a bit better,
what does this vector mean?
38
00:03:21 --> 00:03:24
What does it measure?
And, what can we do with it?
39
00:03:24 --> 00:03:29
But, you see that in terms of
information content,
40
00:03:29 --> 00:03:33
it's really the same
information that's already in
41
00:03:33 --> 00:03:38
the partial derivatives,
or in the differential.
42
00:03:38 --> 00:03:43
So, yes, and I should say,
of course you can also use the
43
00:03:43 --> 00:03:49
gradient and other things like
approximation formulas and so
44
00:03:49 --> 00:03:52
on.
And so far, it's just notation.
45
00:03:52 --> 00:03:57
It's a way to rewrite things.
But, so here's the first cool
46
00:03:57 --> 00:04:03
property of the gradient.
So, I claim that the gradient
47
00:04:03 --> 00:04:11
vector is perpendicular to the
level surface corresponding to
48
00:04:11 --> 00:04:18
setting the function,
w, equal to a constant.
49
00:04:18 --> 00:04:22
OK, so if I draw a contour plot
of my function,
50
00:04:22 --> 00:04:28
so, actually forget about z
because I want to draw a two
51
00:04:28 --> 00:04:32
variable contour plot.
So, say I have a function of
52
00:04:32 --> 00:04:35
two variables,
x and y, then maybe it has some
53
00:04:35 --> 00:04:38
contour plot.
And, I'm saying if I take the
54
00:04:38 --> 00:04:42
gradient of a function at this
point, (x,y).
55
00:04:42 --> 00:04:46
So, I will have a vector.
Well, if I draw that vector on
56
00:04:46 --> 00:04:51
top of a contour plot,
it's going to end up being
57
00:04:51 --> 00:04:54
perpendicular to the level
curve.
58
00:04:54 --> 00:04:57
Same thing if I have a function
of three variables.
59
00:04:57 --> 00:04:59
Then, I can try to draw its
contour plot.
60
00:04:59 --> 00:05:03
Of course, I can't really do it
because the contour plot would
61
00:05:03 --> 00:05:05
be living in space with x,
y, and z.
62
00:05:05 --> 00:05:09
But, it would be a bunch of
level faces, and the gradient
63
00:05:09 --> 00:05:11
vector would be a vector in
space.
64
00:05:11 --> 00:05:15
That vector is perpendicular to
the level faces.
65
00:05:15 --> 00:05:24
So, let's try to see that on a
couple of examples.
66
00:05:24 --> 00:05:32
So, let's do a first example.
What's the easiest case?
67
00:05:32 --> 00:05:36
Let's take a linear function of
x, y, and z.
68
00:05:36 --> 00:05:42
So, I will take w equals a1
times x plus a2 times y plus a3
69
00:05:42 --> 00:05:47
times z.
Well, so, what's the gradient
70
00:05:47 --> 00:05:53
of this function?
Well, the first component will
71
00:05:53 --> 00:05:58
be a1.
That's partial w partial x.
72
00:05:58 --> 00:06:03
Then, a2, that's partial w
partial y, and a3,
73
00:06:03 --> 00:06:15
partial w partial z.
Now, what is the levels of this?
74
00:06:15 --> 00:06:22
Well, if I set w equal to some
constant, c, that means I look
75
00:06:22 --> 00:06:27
at the points where a1x a2y a3z
equals c.
76
00:06:27 --> 00:06:30
What kind of service is that?
It's a plane.
77
00:06:30 --> 00:06:39
And, we know how to find a
normal vector to this plane just
78
00:06:39 --> 00:06:48
by looking at the coefficients.
So, it's a plane with a normal
79
00:06:48 --> 00:06:51
vector exactly this gradient.
And, in fact,
80
00:06:51 --> 00:06:55
in a way, this is the only case
you need to check because of
81
00:06:55 --> 00:06:58
linear approximations.
If you replace a function by
82
00:06:58 --> 00:07:02
its linear approximation,
that means you will replace the
83
00:07:02 --> 00:07:04
level surfaces by their tension
planes.
84
00:07:04 --> 00:07:08
And then, you'll actually end
up in this situation.
85
00:07:08 --> 00:07:09
But maybe that's not very
convincing.
86
00:07:09 --> 00:07:25
So, let's do another example.
So, let's do a second example.
87
00:07:25 --> 00:07:28
Let's say we look at the
function x^2 y^2.
88
00:07:28 --> 00:07:32
OK, so now it's a function of
just two variables because that
89
00:07:32 --> 00:07:36
way we'll be able to actually
draw a picture for you.
90
00:07:36 --> 00:07:40
OK, so what are the level sets
of this function?
91
00:07:40 --> 00:07:44
Well, they're going to be
circles, right?
92
00:07:44 --> 00:07:54
w equals c is a circle,
x^2 y^2 = c.
93
00:07:54 --> 00:07:58
So, I should say,
maybe, sorry,
94
00:07:58 --> 00:08:08
the level curve is a circle.
So, the contour plot looks
95
00:08:08 --> 00:08:16
something like that.
Now, what's the gradient vector?
96
00:08:16 --> 00:08:20
Well, the gradient of this
function, so,
97
00:08:20 --> 00:08:26
partial w partial x is 2x.
And partial w partial y is 2y.
98
00:08:26 --> 00:08:31
So, let's say I take a point,
x comma y, and I try to draw my
99
00:08:31 --> 00:08:34
gradient vector.
So, here at x,
100
00:08:34 --> 00:08:38
y, so, I have to draw the
vector, <2x,
101
00:08:38 --> 00:08:41
2y>.
What does it look like?
102
00:08:41 --> 00:08:42
Well, it's going in that
direction.
103
00:08:42 --> 00:08:49
It's parallel to the position
vector for this point.
104
00:08:49 --> 00:08:51
It's actually twice the
position vector.
105
00:08:51 --> 00:08:55
So, I guess it goes more or
less like this.
106
00:08:55 --> 00:09:01
What's interesting,
too, is it is perpendicular to
107
00:09:01 --> 00:09:04
this circle.
OK, so it's a general feature.
108
00:09:04 --> 00:09:10
Actually, let me show you more
examples, oops,
109
00:09:10 --> 00:09:16
not the one I want.
So, I don't know if you can see
110
00:09:16 --> 00:09:19
it so well.
Well, hopefully you can.
111
00:09:19 --> 00:09:22
So, here I have a contour plot
of a function,
112
00:09:22 --> 00:09:25
and I have a blue vector.
That's the gradient vector at
113
00:09:25 --> 00:09:28
the pink point on the plot.
So, you can see,
114
00:09:28 --> 00:09:32
I can move the pink point,
and the gradient vector,
115
00:09:32 --> 00:09:37
of course, changes because the
gradient depends on x and y.
116
00:09:37 --> 00:09:42
But, what doesn't change is
that it's always perpendicular
117
00:09:42 --> 00:09:46
to the level curves.
Anywhere I am,
118
00:09:46 --> 00:09:53
my gradient stays perpendicular
to the level curve.
119
00:09:53 --> 00:09:57
OK, is that convincing?
Is that visible for people who
120
00:09:57 --> 00:10:05
can't see blue?
OK, so, OK, so we have a lot of
121
00:10:05 --> 00:10:16
evidence, but let's try to prove
the theorem because it will be
122
00:10:16 --> 00:10:22
interesting.
So, first of all,
123
00:10:22 --> 00:10:30
sorry, any questions about the
statement, the example,
124
00:10:30 --> 00:10:34
anything, yes?
Ah, very good question.
125
00:10:34 --> 00:10:37
Does the gradient vector,
why is the gradient vector
126
00:10:37 --> 00:10:40
perpendicular in one direction
rather than the other?
127
00:10:40 --> 00:10:43
So, we'll see the answer to
that in a few minutes.
128
00:10:43 --> 00:10:46
But let me just tell you
immediately, to the side,
129
00:10:46 --> 00:10:50
which side it's pointing to,
it's always pointing towards
130
00:10:50 --> 00:10:54
higher values of a function.
OK, and we'll see in that maybe
131
00:10:54 --> 00:11:03
about half an hour.
So, well, let me say actually
132
00:11:03 --> 00:11:13
points towards higher values of
w.
133
00:11:13 --> 00:11:24
OK, any other questions?
I don't see any questions.
134
00:11:24 --> 00:11:28
OK, so let's try to prove this
theorem, at least this part of
135
00:11:28 --> 00:11:30
the theorem.
We're not going to prove that
136
00:11:30 --> 00:11:38
just yet.
That will come in a while.
137
00:11:38 --> 00:11:44
So, well, maybe we want to
understand first what happens if
138
00:11:44 --> 00:11:48
we move inside the level curve,
OK?
139
00:11:48 --> 00:11:52
So, let's imagine that we are
taking a moving point that stays
140
00:11:52 --> 00:11:55
on the level curve or on the
level surface.
141
00:11:55 --> 00:12:00
And then, we know,
well, what happens is that the
142
00:12:00 --> 00:12:03
function stays constant.
But, we can also know how
143
00:12:03 --> 00:12:07
quickly the function changes
using the chain rule up there.
144
00:12:07 --> 00:12:11
So, maybe the chain rule will
actually be the key to
145
00:12:11 --> 00:12:15
understanding how the gradient
vector and the motion on the
146
00:12:15 --> 00:12:23
level service relate.
So, let's take a curve,
147
00:12:23 --> 00:12:31
r equals r of t,
that stays inside,
148
00:12:31 --> 00:12:42
well, maybe I should say on the
level surface,
149
00:12:42 --> 00:12:48
w equals c.
So, let's think about what that
150
00:12:48 --> 00:12:51
means.
So, just to get you used to
151
00:12:51 --> 00:12:55
this idea, I'm going to draw a
level surface of a function of
152
00:12:55 --> 00:12:59
three variables.
OK, so it's a surface given by
153
00:12:59 --> 00:13:03
the equation w of x,
y, z equals some constant,
154
00:13:03 --> 00:13:07
c.
And, so now I'm going to have a
155
00:13:07 --> 00:13:11
point on that,
and it's going to move on that
156
00:13:11 --> 00:13:15
surface.
So, I will have some parametric
157
00:13:15 --> 00:13:19
curve that lives on this
surface.
158
00:13:19 --> 00:13:25
So, the question is,
what's going to happen at any
159
00:13:25 --> 00:13:29
given time?
Well, the first observation is
160
00:13:29 --> 00:13:32
that the velocity vector,
what can I say about the
161
00:13:32 --> 00:13:37
velocity vector of this motion?
It's going to be tangent to the
162
00:13:37 --> 00:13:39
level surface,
right?
163
00:13:39 --> 00:13:42
If I move on a surface,
then at any point,
164
00:13:42 --> 00:13:45
my velocity is tangent to the
curve.
165
00:13:45 --> 00:13:49
But, if it's tangent to the
curve, then it's also tangent to
166
00:13:49 --> 00:13:53
the surface because the curve is
inside the surface.
167
00:13:53 --> 00:13:56
So, OK, it's getting a bit
cluttered.
168
00:13:56 --> 00:13:58
Maybe I should draw a bigger
picture.
169
00:13:58 --> 00:14:06
Let me do that right away here.
So, I have my level surface,
170
00:14:06 --> 00:14:11
w equals c.
I have a curve on that,
171
00:14:11 --> 00:14:19
and at some point,
I'm going to have a certain
172
00:14:19 --> 00:14:28
velocity.
So, the claim is that the
173
00:14:28 --> 00:14:40
velocity, v,
equals dr/dt is tangent -- --
174
00:14:40 --> 00:14:48
to the level,
w equals c because it's tangent
175
00:14:48 --> 00:14:50
to the curve,
and the curve is inside the
176
00:14:50 --> 00:14:52
level,
OK?
177
00:14:52 --> 00:14:55
Now, what else can we say?
Well, we have,
178
00:14:55 --> 00:15:03
the chain rule will tell us how
the value of w changes.
179
00:15:03 --> 00:15:12
So, by the chain rule,
we have dw/dt.
180
00:15:12 --> 00:15:20
So, the rate of change of the
value of w as I move along this
181
00:15:20 --> 00:15:28
curve is given by the dot
product between the gradient and
182
00:15:28 --> 00:15:34
the velocity vector.
And, so, well,
183
00:15:34 --> 00:15:43
maybe I can rewrite it as w dot
v, and that should be,
184
00:15:43 --> 00:15:50
well, what should it be?
What happens to the value of w
185
00:15:50 --> 00:15:54
as t changes?
Well, it stays constant because
186
00:15:54 --> 00:15:58
we are moving on a curve.
That curve might be
187
00:15:58 --> 00:16:02
complicated, but it stays always
on the level,
188
00:16:02 --> 00:16:08
w equals c.
So, it's zero because w of t
189
00:16:08 --> 00:16:18
equals c, which is a constant.
OK, is that convincing?
190
00:16:18 --> 00:16:21
OK, so now if we have a dot
product that's zero,
191
00:16:21 --> 00:16:25
that tells us that these two
guys are perpendicular.
192
00:16:25 --> 00:16:37
So -- So if the gradient vector
is perpendicular to v,
193
00:16:37 --> 00:16:44
OK, that's a good start.
We know that the gradient is
194
00:16:44 --> 00:16:48
perpendicular to this vector
tangent that's tangent to the
195
00:16:48 --> 00:16:51
level surface.
What about other vectors
196
00:16:51 --> 00:16:55
tangent to the level surface?
Well, in fact,
197
00:16:55 --> 00:17:00
I could use any curve drawn on
the level of w equals c.
198
00:17:00 --> 00:17:03
So, I could move,
really, any way I wanted on
199
00:17:03 --> 00:17:06
that surface.
In particular,
200
00:17:06 --> 00:17:11
I claim that I could have
chosen my velocity vector to be
201
00:17:11 --> 00:17:15
any vector tangent to the
surface.
202
00:17:15 --> 00:17:22
OK, so let's write this.
So this is true for any curve,
203
00:17:22 --> 00:17:30
or, I'll say for any motion on
the level surface,
204
00:17:30 --> 00:17:40
w equals c.
So that means v can be any
205
00:17:40 --> 00:17:53
vector tangent to the surface
tangent to the level.
206
00:17:53 --> 00:18:01
See, for example,
OK, let me draw one more
207
00:18:01 --> 00:18:06
picture.
OK, so I have my level surface.
208
00:18:06 --> 00:18:09
So, I'm drawing more and more
levels, and they never quite
209
00:18:09 --> 00:18:12
look the same.
But I have a point.
210
00:18:12 --> 00:18:16
And, at this point,
I have the tangent plane to the
211
00:18:16 --> 00:18:24
level surface.
OK, so this is tangent plane to
212
00:18:24 --> 00:18:30
the level.
Then, if I choose any vector in
213
00:18:30 --> 00:18:35
that tangent plane.
Let's say I choose the one that
214
00:18:35 --> 00:18:39
goes in that direction.
Then, I can actually find a
215
00:18:39 --> 00:18:42
curve that goes in that
direction, and stays on the
216
00:18:42 --> 00:18:45
level.
So, here, that would be a curve
217
00:18:45 --> 00:18:50
that somehow goes from the right
to the left, and of course it
218
00:18:50 --> 00:18:53
has to end up going up or
something like that.
219
00:18:53 --> 00:19:05
OK, so given any vector tangent
-- -- let's call that vector v
220
00:19:05 --> 00:19:14
tangent to the level,
we get that the gradient is
221
00:19:14 --> 00:19:20
perpendicular to v.
So, if the gradient is
222
00:19:20 --> 00:19:24
perpendicular to this vector
tangent to this curve,
223
00:19:24 --> 00:19:28
but also to any vector,
I can draw that tangent to my
224
00:19:28 --> 00:19:29
surface.
So, what does that mean?
225
00:19:29 --> 00:19:34
Well, that means the gradient
is actually perpendicular to the
226
00:19:34 --> 00:19:38
tangent plane or to the surface
at this point.
227
00:19:38 --> 00:19:43
So, the gradient is
perpendicular.
228
00:19:43 --> 00:20:02
229
00:20:02 --> 00:20:04
And, well, here,
I've illustrated things with a
230
00:20:04 --> 00:20:06
three-dimensional example,
but really it works the same if
231
00:20:06 --> 00:20:10
you have only two variables.
Then you have a level curve
232
00:20:10 --> 00:20:13
that has a tangent line,
and the gradient is
233
00:20:13 --> 00:20:23
perpendicular to that line.
OK, any questions?
234
00:20:23 --> 00:20:36
No?
OK, so, let's see.
235
00:20:36 --> 00:20:39
That's actually pretty neat
because there is a nice
236
00:20:39 --> 00:20:43
application of this,
which is to try to figure out,
237
00:20:43 --> 00:20:44
now we know,
actually, how to find the
238
00:20:44 --> 00:20:46
tangent plane to anything,
pretty much.
239
00:20:46 --> 00:21:13
240
00:21:13 --> 00:21:19
OK, so let's see.
So, let's say that,
241
00:21:19 --> 00:21:27
for example,
I want to find -- -- the
242
00:21:27 --> 00:21:42
tangent plane -- -- to the
surface with equation,
243
00:21:42 --> 00:21:50
let's say, x^2 y^2-z^2 = 4 at
the point (2,1,
244
00:21:50 --> 00:22:01
1).
Let me write that.
245
00:22:01 --> 00:22:06
So, how do we do that?
Well, one way that we already
246
00:22:06 --> 00:22:09
know,
if we solve this for z,
247
00:22:09 --> 00:22:12
so we can write z equals a
function of x and y,
248
00:22:12 --> 00:22:16
then we know tangent plane
approximation for the graph of a
249
00:22:16 --> 00:22:19
function,
z equals some function of x and
250
00:22:19 --> 00:22:21
y.
But, that doesn't look like
251
00:22:21 --> 00:22:24
it's the best way to do it.
OK, the best way to it,
252
00:22:24 --> 00:22:27
now that we have the gradient
vector, is actually to directly
253
00:22:27 --> 00:22:30
say, oh, we know the normal
vector to this plane.
254
00:22:30 --> 00:22:35
The normal vector will just be
the gradient.
255
00:22:35 --> 00:22:40
Oh, I think I have a cool
picture to show.
256
00:22:40 --> 00:22:42
OK, so that's what it looks
like.
257
00:22:42 --> 00:22:49
OK, so here you have the
surface x2 y2-z2 equals four.
258
00:22:49 --> 00:22:52
That's called a hyperboloid
because it looks like when you
259
00:22:52 --> 00:22:55
get when you spin a hyperbola
around an axis.
260
00:22:55 --> 00:23:00
And, here's a tangent plane at
the given point.
261
00:23:00 --> 00:23:02
So, it doesn't look very
tangent because it crosses the
262
00:23:02 --> 00:23:04
surface.
But, it's really,
263
00:23:04 --> 00:23:08
if you think about it,
you will see it's really the
264
00:23:08 --> 00:23:12
plane that's approximating the
surface in the best way that you
265
00:23:12 --> 00:23:18
can at this given point.
It is really the tangent plane.
266
00:23:18 --> 00:23:27
So, how do we find this plane?
Well, you can plot it on a
267
00:23:27 --> 00:23:30
computer.
That's not exactly how you
268
00:23:30 --> 00:23:33
would look for it in the first
place.
269
00:23:33 --> 00:23:38
So, the way to do it is that we
compute the gradient.
270
00:23:38 --> 00:23:43
So, a gradient of what?
Well, a gradient of this
271
00:23:43 --> 00:23:49
function.
OK, so I should say,
272
00:23:49 --> 00:23:56
this is the level set,
w equals four,
273
00:23:56 --> 00:24:07
where w equals x^2 y^2 - z^2.
And so, we know that the
274
00:24:07 --> 00:24:14
gradient of this,
well, what is it?
275
00:24:14 --> 00:24:22
2x, then 2y,
and then negative 2z.
276
00:24:22 --> 00:24:27
So, at this given point,
I guess we are at x equals two.
277
00:24:27 --> 00:24:29
So, that's four.
And then, y and z are one.
278
00:24:29 --> 00:24:37
So, two, negative two.
OK, and that's going to be the
279
00:24:37 --> 00:24:44
normal vector to the surface or
to the tangent plane.
280
00:24:44 --> 00:24:47
That's one way to define the
tangent plane.
281
00:24:47 --> 00:24:50
All right, it has the same
normal vector as the surface.
282
00:24:50 --> 00:24:52
That's one way to define the
normal vector to the surface,
283
00:24:52 --> 00:24:56
if you prefer.
Being perpendicular to the
284
00:24:56 --> 00:25:01
surface means that you are
perpendicular to its tangent
285
00:25:01 --> 00:25:05
plane.
OK, so the equation is,
286
00:25:05 --> 00:25:12
well, 4x 2y-2z equals
something, where something is,
287
00:25:12 --> 00:25:19
well, we should just plug in
that point.
288
00:25:19 --> 00:25:26
We'll get eight plus two minus
two looks like we'll get eight.
289
00:25:26 --> 00:25:29
And, of course,
we could simplify dividing
290
00:25:29 --> 00:25:32
everything by two,
but it's not very important
291
00:25:32 --> 00:25:34
here.
OK, so now if you have a
292
00:25:34 --> 00:25:36
surface given by an evil
equation,
293
00:25:36 --> 00:25:40
and a point on the surface,
well, you know how to find the
294
00:25:40 --> 00:25:44
tangent plane to the surface at
that point.
295
00:25:44 --> 00:25:52
OK, any questions?
No.
296
00:25:52 --> 00:26:00
OK, let me give just another
reason why, another way that we
297
00:26:00 --> 00:26:04
could have seen this.
So, I claim,
298
00:26:04 --> 00:26:07
in fact, we could have done
this without the gradient,
299
00:26:07 --> 00:26:09
or using the gradient in a
somehow disguised way.
300
00:26:09 --> 00:26:18
So, here's another way.
So, the other way to do it
301
00:26:18 --> 00:26:22
would be to start with a
differential,
302
00:26:22 --> 00:26:26
OK?
dw, while it's pretty much the
303
00:26:26 --> 00:26:31
same content,
but let me write it as a
304
00:26:31 --> 00:26:35
differential,
dw is 2xdx 2ydy-2zdz.
305
00:26:35 --> 00:26:44
So, at a given point,
at (2,1, 1),
306
00:26:44 --> 00:26:52
this is 4dx 2dy-2dz.
Now, if we want to change this
307
00:26:52 --> 00:26:56
into an approximation formula,
we can.
308
00:26:56 --> 00:27:07
We know that the change in w is
approximately equal to 4 delta x
309
00:27:07 --> 00:27:15
2 delta y - 2 delta z.
OK, so when do we stay on the
310
00:27:15 --> 00:27:19
level surface?
Well, we stay on the level
311
00:27:19 --> 00:27:24
surface when w doesn't change,
so, when this becomes zero,
312
00:27:24 --> 00:27:25
OK?
Now, what does this
313
00:27:25 --> 00:27:28
approximation sign mean?
Well, it means for small
314
00:27:28 --> 00:27:31
changes in x,
y, z, this guy will be close to
315
00:27:31 --> 00:27:33
that guy.
It also means something else.
316
00:27:33 --> 00:27:36
Remember, these approximation
formulas, they are linear
317
00:27:36 --> 00:27:39
approximations.
They mean that we replace the
318
00:27:39 --> 00:27:43
function, actually,
by some closest linear formula
319
00:27:43 --> 00:27:47
that will be nearby.
And so, in particular,
320
00:27:47 --> 00:27:52
if we set this equal to zero
instead of approximately zero,
321
00:27:52 --> 00:27:56
it means we'll actually be
moving on the tangent plane to
322
00:27:56 --> 00:27:59
the level set.
If you want strict equalities
323
00:27:59 --> 00:28:03
in approximations means that we
replace the function by its
324
00:28:03 --> 00:28:04
tangent approximation.
325
00:28:04 --> 00:28:37
326
00:28:37 --> 00:28:44
So -- [APPLAUSE] OK,
so the level corresponds to
327
00:28:44 --> 00:28:53
delta w equals zero,
and its tangent plane
328
00:28:53 --> 00:29:03
corresponds to four delta x plus
two delta y minus two delta z
329
00:29:03 --> 00:29:08
equals zero.
That's what I'm trying to say,
330
00:29:08 --> 00:29:10
basically.
And, what's delta x?
331
00:29:10 --> 00:29:12
Well, that means it's the
change in x.
332
00:29:12 --> 00:29:15
So, what's the change in x here?
That means, well,
333
00:29:15 --> 00:29:19
we started with x equals two,
and we moved to some other
334
00:29:19 --> 00:29:25
value, x.
So, that's actually x- 2, right?
335
00:29:25 --> 00:29:28
That's how much x has changed
compared to 2.
336
00:29:28 --> 00:29:37
And, two times (y - 1) minus
two times z - 1 = 0.
337
00:29:37 --> 00:29:42
That's the equation of a
tangent plane.
338
00:29:42 --> 00:29:46
It's the same equation as the
one over there.
339
00:29:46 --> 00:29:48
These are just two different
methods to get it.
340
00:29:48 --> 00:29:52
OK, so this one explains to you
what's going on in terms of
341
00:29:52 --> 00:29:57
approximation formulas.
This one goes right away,
342
00:29:57 --> 00:30:02
by using the gradient factor.
So, in a way,
343
00:30:02 --> 00:30:06
with this one,
you don't have to think nearly
344
00:30:06 --> 00:30:11
as much.
But, you can use either one.
345
00:30:11 --> 00:30:17
OK, questions?
No?
346
00:30:17 --> 00:30:23
OK, so let's move on to new
topic, which is another
347
00:30:23 --> 00:30:30
application of a gradient
vector, and that is directional
348
00:30:30 --> 00:30:32
derivatives.
349
00:30:32 --> 00:30:44
350
00:30:44 --> 00:30:52
OK, so let's say that we have a
function of two variables,
351
00:30:52 --> 00:30:56
x and y.
Well, we know how to compute
352
00:30:56 --> 00:31:02
partial w over partial x or
partial w over partial y,
353
00:31:02 --> 00:31:07
which measure how w changes if
I move in the direction of the x
354
00:31:07 --> 00:31:10
axis or in the direction of the
y axis.
355
00:31:10 --> 00:31:13
So, what about moving in other
directions?
356
00:31:13 --> 00:31:16
Well, of course,
we've seen other approximation
357
00:31:16 --> 00:31:18
formulas and so on.
But, we can still ask,
358
00:31:18 --> 00:31:21
is there a derivative in every
direction?
359
00:31:21 --> 00:31:25
And that's basically,
yes, that's the directional
360
00:31:25 --> 00:31:30
derivative.
OK, so these are derivatives in
361
00:31:30 --> 00:31:40
the direction of I hat or j hat,
the vectors that go along the x
362
00:31:40 --> 00:31:50
or the y axis.
So, what if we move in another
363
00:31:50 --> 00:32:01
direction, let's say,
the direction of some unit
364
00:32:01 --> 00:32:09
vector, let's call it u .
OK, so if I give you a unit
365
00:32:09 --> 00:32:13
vector, you can ask yourself,
if I move in the direction,
366
00:32:13 --> 00:32:16
how quickly will my function
change?
367
00:32:16 --> 00:32:29
So -- So, let's look at the
straight trajectory.
368
00:32:29 --> 00:32:34
What this should mean is I
start at some value,
369
00:32:34 --> 00:32:37
x, y, and there I have my
vector u.
370
00:32:37 --> 00:32:41
And, I'm going to move in a
straight line in the direction
371
00:32:41 --> 00:32:46
of u.
And, I have the graph of my
372
00:32:46 --> 00:32:54
function -- -- and I'm asking
myself how quickly does the
373
00:32:54 --> 00:33:02
value change when I move on the
graph in that direction?
374
00:33:02 --> 00:33:10
OK, so let's look at a straight
line trajectory So,
375
00:33:10 --> 00:33:18
we have a position vector,
r, that will depend on some
376
00:33:18 --> 00:33:26
parameter which I will call s.
You'll see why very soon,
377
00:33:26 --> 00:33:30
in such a way that the
derivative is this given unit
378
00:33:30 --> 00:33:33
vector u hat.
So, why do I use s for my
379
00:33:33 --> 00:33:36
parameter rather than t.
Well, it's a convention.
380
00:33:36 --> 00:33:41
I'm moving at unit speed along
this line.
381
00:33:41 --> 00:33:45
So that means that actually,
I'm parameterizing things by
382
00:33:45 --> 00:33:48
the distance that I've traveled
along a curve,
383
00:33:48 --> 00:33:54
sorry, along this line.
So, here it's called s in the
384
00:33:54 --> 00:33:59
sense of arc length.
Actually, it's not really an
385
00:33:59 --> 00:34:06
arc because it's a straight
line, so it's the distance along
386
00:34:06 --> 00:34:09
the line.
OK, so because we are
387
00:34:09 --> 00:34:15
parameterizing by distance,
we are just using s as a
388
00:34:15 --> 00:34:21
convention just to distinguish
it from other situations.
389
00:34:21 --> 00:34:27
And, so, now,
the question will be,
390
00:34:27 --> 00:34:32
what is dw/ds?
What's the rate of change of w
391
00:34:32 --> 00:34:36
when I move like that?
Well, of course we know the
392
00:34:36 --> 00:34:40
answer because that's a special
case of the chain rule.
393
00:34:40 --> 00:34:44
So, that's how we will actually
compute it.
394
00:34:44 --> 00:34:49
But, in terms of what it means,
it really means we are asking
395
00:34:49 --> 00:34:51
ourselves,
we start at a point and we
396
00:34:51 --> 00:34:54
change the variables in a
certain direction,
397
00:34:54 --> 00:34:57
which is not necessarily the x
or the y direction,
398
00:34:57 --> 00:35:01
but really any direction.
And then, what's the derivative
399
00:35:01 --> 00:35:07
in that direction?
OK, does that make sense as a
400
00:35:07 --> 00:35:08
concept?
Kind of?
401
00:35:08 --> 00:35:10
I see some faces that are not
completely convinced.
402
00:35:10 --> 00:35:14
So, maybe you should show more
pictures.
403
00:35:14 --> 00:35:21
Well, let me first write down a
bit more and show you something.
404
00:35:21 --> 00:35:40
405
00:35:40 --> 00:35:45
So I just want to give you the
actual definition.
406
00:35:45 --> 00:35:50
Sorry, first of all in case you
wonder what this is all about,
407
00:35:50 --> 00:35:55
so let's say the components of
our unit vector are two numbers,
408
00:35:55 --> 00:36:00
a and b.
Then, it means we'll move along
409
00:36:00 --> 00:36:05
the line x of s equals some
initial value,
410
00:36:05 --> 00:36:09
the point where we are actually
at the directional derivative
411
00:36:09 --> 00:36:13
plus s times a,
or I meant to say plus a times
412
00:36:13 --> 00:36:19
s.
And, y of s equals y0 bs.
413
00:36:19 --> 00:36:38
And then, we plug that into w.
And then we take the derivative.
414
00:36:38 --> 00:36:45
So, we have a notation for that
which is going to be dw/ds with
415
00:36:45 --> 00:36:53
a subscript in the direction of
u to indicate in which direction
416
00:36:53 --> 00:37:03
we are actually going to move.
And, that's called the
417
00:37:03 --> 00:37:17
directional derivative -- -- in
the direction of u.
418
00:37:17 --> 00:37:28
OK, so, let's see what it means
geometrically.
419
00:37:28 --> 00:37:33
So, remember,
we've seen things about partial
420
00:37:33 --> 00:37:36
derivatives,
and we see that the partial
421
00:37:36 --> 00:37:41
derivatives are the slopes of
slices of the graph by vertical
422
00:37:41 --> 00:37:45
planes that are parallel to the
x or the y directions.
423
00:37:45 --> 00:37:48
OK, so, if I have a point,
at any point,
424
00:37:48 --> 00:37:52
I can slice the graph of my
function by two planes,
425
00:37:52 --> 00:37:57
one that's going along the x,
one along the y direction.
426
00:37:57 --> 00:38:02
And then, I can look at the
slices of the graph.
427
00:38:02 --> 00:38:04
Let me see if I can use that
thing.
428
00:38:04 --> 00:38:07
So, we can look at the slices
of the graph that are drawn
429
00:38:07 --> 00:38:10
here.
In fact, we look at the tangent
430
00:38:10 --> 00:38:14
lines to the slices,
and we look at the slope and
431
00:38:14 --> 00:38:17
that gives us the partial
derivatives in case you are on
432
00:38:17 --> 00:38:21
that side and want to see also
the pointer that was here.
433
00:38:21 --> 00:38:26
So, now, similarly,
the directional derivative
434
00:38:26 --> 00:38:31
means, actually,
we'll be slicing our graph by
435
00:38:31 --> 00:38:37
the vertical plane.
It's not really colorful,
436
00:38:37 --> 00:38:43
something more colorful.
We'll be slicing things by a
437
00:38:43 --> 00:38:46
plane that is now in the
direction of this vector,
438
00:38:46 --> 00:38:51
u, and we'll be looking at the
slope of the slice of the graph.
439
00:38:51 --> 00:38:57
So, what that looks like here,
so that's the same applet the
440
00:38:57 --> 00:39:03
way that you've used on your
problem set in case you are
441
00:39:03 --> 00:39:08
wondering.
So, now, I'm picking a point on
442
00:39:08 --> 00:39:12
the contour plot.
And, at that point,
443
00:39:12 --> 00:39:15
I slice the graph.
So, here I'm starting by
444
00:39:15 --> 00:39:17
slicing in the direction of the
x axis.
445
00:39:17 --> 00:39:20
So, in fact,
what I'm measuring here by the
446
00:39:20 --> 00:39:24
slope of the slice is the
partial in the x direction.
447
00:39:24 --> 00:39:28
It's really partial f partial
x, which is also the directional
448
00:39:28 --> 00:39:31
derivative in the direction of
i.
449
00:39:31 --> 00:39:37
And now, if I rotate the slice,
then I have all of these
450
00:39:37 --> 00:39:40
planes.
So, you see at the bottom left,
451
00:39:40 --> 00:39:42
I have the direction in which
I'm going.
452
00:39:42 --> 00:39:44
There's this,
like, rotating line that tells
453
00:39:44 --> 00:39:47
you in which direction I'm going
to be moving.
454
00:39:47 --> 00:39:49
And for each direction,
I have a plane.
455
00:39:49 --> 00:39:52
And, when I slice by that
plane, I will get,
456
00:39:52 --> 00:39:56
so I have this direction here
going maybe to the southwest.
457
00:39:56 --> 00:40:00
So, that gives me a slice of my
graph by a vertical plane,
458
00:40:00 --> 00:40:03
and the slice has a certain
slope.
459
00:40:03 --> 00:40:08
And, the slope is going to be
the directional derivative in
460
00:40:08 --> 00:40:14
that direction.
OK, I think that's as graphic
461
00:40:14 --> 00:40:22
as I can get.
OK, any questions about that?
462
00:40:22 --> 00:40:33
No?
OK, so let's see how we compute
463
00:40:33 --> 00:40:41
that guy.
So, let me just write again
464
00:40:41 --> 00:40:49
just in case you want to,
in case you didn't hear me it's
465
00:40:49 --> 00:40:58
the slope of the slice of the
graph by a vertical plane -- --
466
00:40:58 --> 00:41:03
that contains the given
direction,
467
00:41:03 --> 00:41:06
that's parallel to the
direction, u.
468
00:41:06 --> 00:41:11
So, how do we compute it?
Well, we can use the chain rule.
469
00:41:11 --> 00:41:22
The chain rule implies that
dw/ds is actually the gradient
470
00:41:22 --> 00:41:31
of w dot product with the
velocity vector dr/ds.
471
00:41:31 --> 00:41:35
But, remember we say that we
are going to be moving at unit
472
00:41:35 --> 00:41:39
speed in the direction of u.
So, in fact,
473
00:41:39 --> 00:41:50
that's just gradient w dot
product with the unit vector u.
474
00:41:50 --> 00:41:57
OK, so the formula that we
remember is really dw/ds in the
475
00:41:57 --> 00:42:03
direction of u is gradient w dot
product of u.
476
00:42:03 --> 00:42:13
And, maybe I should also say in
words, this is the component of
477
00:42:13 --> 00:42:19
the gradient in the direction of
u.
478
00:42:19 --> 00:42:21
And, maybe that makes more
sense.
479
00:42:21 --> 00:42:25
So, for example,
the directional derivative in
480
00:42:25 --> 00:42:29
the direction of I hat is the
component along the x axes.
481
00:42:29 --> 00:42:32
That's the same as,
indeed, the partial derivatives
482
00:42:32 --> 00:42:40
in the x direction.
Things make sense.
483
00:42:40 --> 00:42:50
dw/ds in the direction of I hat
is, sorry, gradient w dot I hat,
484
00:42:50 --> 00:42:59
which is wx,maybe I should
write, partial w of partial x.
485
00:42:59 --> 00:43:09
OK, now, so that's basically
what we need to know to compute
486
00:43:09 --> 00:43:12
these guys.
So now, let's go back to the
487
00:43:12 --> 00:43:16
gradient and see what this tells
us about the gradient.
488
00:43:16 --> 00:43:42
489
00:43:42 --> 00:43:51
[APPLAUSE]
I see you guys are having fun.
490
00:43:51 --> 00:43:54
OK, OK, let's do a little bit
of geometry here.
491
00:43:54 --> 00:44:00
That should calm you down.
So, we said dw/ds in the
492
00:44:00 --> 00:44:04
direction of u is gradient w dot
u.
493
00:44:04 --> 00:44:11
That's the same as the length
of gradient w times the length
494
00:44:11 --> 00:44:15
of u.
Well, that happens to be one
495
00:44:15 --> 00:44:23
because we are taking the unit
vector times the cosine of the
496
00:44:23 --> 00:44:30
angle between the gradient and
the given unit vector,
497
00:44:30 --> 00:44:36
u, so, have this angle, theta.
OK, that's another way of
498
00:44:36 --> 00:44:39
saying we are taking the
component of a gradient in the
499
00:44:39 --> 00:44:43
direction of u.
But now, what does that tell us?
500
00:44:43 --> 00:44:46
Well,
let's try to figure out in
501
00:44:46 --> 00:44:50
which directions w changes the
fastest,
502
00:44:50 --> 00:44:54
in which direction it increases
the most or decreases the most,
503
00:44:54 --> 00:45:03
or doesn't actually change.
So, when is this going to be
504
00:45:03 --> 00:45:05
the largest?
If I fix a point,
505
00:45:05 --> 00:45:09
if I set a point,
then the gradient vector at
506
00:45:09 --> 00:45:12
that point is given to me.
But, the question is,
507
00:45:12 --> 00:45:15
in which direction does it
change the most quickly?
508
00:45:15 --> 00:45:19
Well, what I can change is the
direction, and this will be the
509
00:45:19 --> 00:45:25
largest when the cosine is one.
So, this is largest when the
510
00:45:25 --> 00:45:33
cosine of the angle is one.
That means the angle is zero.
511
00:45:33 --> 00:45:40
That means u is actually in the
direction of the gradient.
512
00:45:40 --> 00:45:42
OK, so that's a new way to
think about the direction of a
513
00:45:42 --> 00:45:47
gradient.
The gradient is the direction
514
00:45:47 --> 00:45:57
in which the function increases
the most quickly at that point.
515
00:45:57 --> 00:46:08
So, the direction of gradient w
is the direction of fastest
516
00:46:08 --> 00:46:15
increase of w at the given
point.
517
00:46:15 --> 00:46:24
And, what is the magnitude of w?
Well, it's actually the
518
00:46:24 --> 00:46:33
directional derivative in that
direction.
519
00:46:33 --> 00:46:37
OK, so if I go in that
direction, which gives me the
520
00:46:37 --> 00:46:40
fastest increase,
then the corresponding slope
521
00:46:40 --> 00:46:44
will be the length of the
gradient.
522
00:46:44 --> 00:46:51
And, with the direction of the
fastest decrease?
523
00:46:51 --> 00:46:53
It's going in the opposite
direction, right?
524
00:46:53 --> 00:46:55
I mean, if you are on a
mountain, and you know that you
525
00:46:55 --> 00:46:57
are facing the mountain,
that's the direction of fastest
526
00:46:57 --> 00:46:59
increase.
The direction of fastest
527
00:46:59 --> 00:47:01
decrease is behind you straight
down.
528
00:47:01 --> 00:47:11
OK, so, the minimal value of
dw/ds is achieved when cosine of
529
00:47:11 --> 00:47:18
theta is minus one.
That means theta equals 180�.
530
00:47:18 --> 00:47:27
That means u is in the
direction of minus the gradient.
531
00:47:27 --> 00:47:30
It points opposite to the
gradient.
532
00:47:30 --> 00:47:43
And, finally,
when do we have dw/ds equals
533
00:47:43 --> 00:47:48
zero?
So, in which direction does the
534
00:47:48 --> 00:47:52
function not change?
Well, we have two answers to
535
00:47:52 --> 00:47:54
that.
One is to just use the formula.
536
00:47:54 --> 00:47:58
So, that's one cosine theta
equals zero.
537
00:47:58 --> 00:48:03
That means theta equals 90 degrees.
That means that u is
538
00:48:03 --> 00:48:08
perpendicular to the gradient.
The other way to think about
539
00:48:08 --> 00:48:11
it, the direction in which the
value doesn't change is a
540
00:48:11 --> 00:48:14
direction that's tangent to the
level surface.
541
00:48:14 --> 00:48:18
If we are not changing a,
it means we are moving along
542
00:48:18 --> 00:48:24
the level.
And, that's the same thing --
543
00:48:24 --> 00:48:30
-- as being tangent to the
level.
544
00:48:30 --> 00:48:36
So, let me just show that on
the picture here.
545
00:48:36 --> 00:48:39
So, if actually show you the
gradient, you can't really see
546
00:48:39 --> 00:48:41
it here.
I need to move it a bit.
547
00:48:41 --> 00:48:44
So, the gradient here is
pointing straight up at the
548
00:48:44 --> 00:48:50
point that I have chosen.
Now, if I choose a slice that's
549
00:48:50 --> 00:48:52
perpendicular,
and a direction that's
550
00:48:52 --> 00:48:55
perpendicular to the gradient,
so that's actually tangent to
551
00:48:55 --> 00:48:57
the level curve,
then you see that my slice is
552
00:48:57 --> 00:49:00
flat.
I don't actually have any slop.
553
00:49:00 --> 00:49:04
The directional derivative in a
direction that's perpendicular
554
00:49:04 --> 00:49:06
to the gradient is basically
zero.
555
00:49:06 --> 00:49:08
Now, if I rotate,
then the slope sort of
556
00:49:08 --> 00:49:11
increases, increases,
increases, and it becomes the
557
00:49:11 --> 00:49:14
largest when I'm going in the
direction of a gradient.
558
00:49:14 --> 00:49:17
So, here, I have,
actually, a pretty big slope.
559
00:49:17 --> 00:49:20
And now, if I keep rotating,
then the slope will decrease
560
00:49:20 --> 00:49:22
again.
Then it becomes zero when I
561
00:49:22 --> 00:49:25
perpendicular,
and then it becomes negative.
562
00:49:25 --> 00:49:29
It's the most negative when I
pointing away from the gradient
563
00:49:29 --> 00:49:33
and then becomes zero again when
I'm back perpendicular.
564
00:49:33 --> 00:49:38
OK, so for example,
if I give you a contour plot,
565
00:49:38 --> 00:49:41
and I ask you to draw the
direction of the gradient
566
00:49:41 --> 00:49:43
vector,
well, at this point,
567
00:49:43 --> 00:49:46
for example,
you would look at the picture.
568
00:49:46 --> 00:49:49
The gradient vector would be
going perpendicular to the
569
00:49:49 --> 00:49:52
level.
And, it would be going towards
570
00:49:52 --> 00:49:55
higher values of a function.
I don't know if you can see the
571
00:49:55 --> 00:49:57
labels, but the thing in the
middle is a minimum.
572
00:49:57 --> 00:50:03
So, it will actually be
pointing in this kind of
573
00:50:03 --> 00:50:08
direction.
OK, so that's it for today.
574
00:50:08 --> 00:50:10