WEBVTT

00:00:01.000 --> 00:00:03.000
The following content is
provided under a Creative

00:00:03.000 --> 00:00:05.000
Commons license.
Your support will help MIT

00:00:05.000 --> 00:00:08.000
OpenCourseWare continue to offer
high quality educational

00:00:08.000 --> 00:00:13.000
resources for free.
To make a donation or to view

00:00:13.000 --> 00:00:18.000
additional materials from
hundreds of MIT courses,

00:00:18.000 --> 00:00:23.000
visit MIT OpenCourseWare at
ocw.mit.edu.

00:00:25.000 --> 00:00:29.000
Last time we saw things about
gradients and directional

00:00:29.000 --> 00:00:32.000
derivatives.
Before that we studied how to

00:00:32.000 --> 00:00:37.000
look for minima and maxima of
functions of several variables.

00:00:37.000 --> 00:00:41.000
And today we are going to look
again at min/max problems but in

00:00:41.000 --> 00:00:45.000
a different setting,
namely, one for variables that

00:00:45.000 --> 00:00:49.000
are not independent.
And so what we will see is you

00:00:49.000 --> 00:00:52.000
may have heard of Lagrange
multipliers.

00:00:52.000 --> 00:00:59.000
And this is the one point in
the term when I can shine with

00:00:59.000 --> 00:01:05.000
my French accent and say
Lagrange's name properly.

00:01:05.000 --> 00:01:08.000
OK.
What are Lagrange multipliers

00:01:08.000 --> 00:01:13.000
about?
Well, the goal is to minimize

00:01:13.000 --> 00:01:19.000
or maximize a function of
several variables.

00:01:19.000 --> 00:01:22.000
Let's say, for example,
f of x, y, z,

00:01:22.000 --> 00:01:27.000
but where these variables are
no longer independent.

00:01:41.000 --> 00:01:43.000
They are not independent.
That means that there is a

00:01:43.000 --> 00:01:47.000
relation between them.
The relation is maybe some

00:01:47.000 --> 00:01:52.000
equation of the form g of x,
y, z equals some constant.

00:01:52.000 --> 00:01:57.000
You take the relation between
x, y, z, you call that g and

00:01:57.000 --> 00:02:02.000
that gives you the constraint.
And your goal is to minimize f

00:02:02.000 --> 00:02:05.000
only of those values of x,
y, z that satisfy the

00:02:05.000 --> 00:02:07.000
constraint.
What is one way to do that?

00:02:07.000 --> 00:02:10.000
Well, one to do that,
if the constraint is very

00:02:10.000 --> 00:02:14.000
simple, we can maybe solve for
one of the variables.

00:02:14.000 --> 00:02:17.000
Maybe we can solve this
equation for one of the

00:02:17.000 --> 00:02:21.000
variables, plug it back into f,
and then we have a usual

00:02:21.000 --> 00:02:25.000
min/max problem that we have
seen how to do.

00:02:25.000 --> 00:02:28.000
The problem is sometimes you
cannot actually solve for x,

00:02:28.000 --> 00:02:31.000
y, z in here because this
condition is too complicated and

00:02:31.000 --> 00:02:38.000
then we need a new method.
That is what we are going to do.

00:02:38.000 --> 00:02:41.000
Why would we care about that?
Well, one example is actually

00:02:41.000 --> 00:02:43.000
in physics.
Maybe you have seen in

00:02:43.000 --> 00:02:47.000
thermodynamics that you study
quantities about gases,

00:02:47.000 --> 00:02:50.000
and those quantities that
involve pressure,

00:02:50.000 --> 00:02:53.000
volume and temperature.
And pressure,

00:02:53.000 --> 00:02:56.000
volume and temperature are not
independent of each other.

00:02:56.000 --> 00:02:59.000
I mean you know probably the
equation PV = NRT.

00:02:59.000 --> 00:03:01.000
And, of course,
there you could actually solve

00:03:01.000 --> 00:03:03.000
to express things in terms of
one or the other.

00:03:03.000 --> 00:03:07.000
But sometimes it is more
convenient to keep all three

00:03:07.000 --> 00:03:09.000
variables but treat them as
constrained.

00:03:09.000 --> 00:03:19.000
It is just an example of a
situation where you might want

00:03:19.000 --> 00:03:24.000
to do this.
Anyway, we will look mostly at

00:03:24.000 --> 00:03:28.000
particular examples,
but just to point out that this

00:03:28.000 --> 00:03:32.000
is useful when you study guesses
in physics.

00:03:32.000 --> 00:03:35.000
The first observation is we
cannot use our usual method of

00:03:35.000 --> 00:03:36.000
looking for critical points of
f.

00:03:36.000 --> 00:03:40.000
Because critical points of f
typically will not satisfy this

00:03:40.000 --> 00:03:43.000
condition and so won't be good
solutions.

00:03:43.000 --> 00:03:49.000
We need something else.
Let's look at an example,

00:03:49.000 --> 00:03:53.000
and we will see how that leads
us to the method.

00:03:53.000 --> 00:04:03.000
For example,
let's say that I want to find

00:04:03.000 --> 00:04:17.000
the point closest to the origin
-- -- on the hyperbola xy equals

00:04:17.000 --> 00:04:23.000
3 in the plane.
That means I have this

00:04:23.000 --> 00:04:26.000
hyperbola, and I am asking
myself what is the point on it

00:04:26.000 --> 00:04:29.000
that is the closest to the
origin?

00:04:29.000 --> 00:04:31.000
I mean we can solve this by
elementary geometry,

00:04:31.000 --> 00:04:34.000
we don't need actually Lagrange
multipliers,

00:04:34.000 --> 00:04:38.000
but we are going to do it with
Lagrange multipliers because it

00:04:38.000 --> 00:04:41.000
is a pretty good example.
What does it mean?

00:04:41.000 --> 00:04:47.000
Well, it means that we want to
minimize distance to the origin.

00:04:47.000 --> 00:04:49.000
What is the distance to the
origin?

00:04:49.000 --> 00:04:53.000
If I have a point,
at coordinates (x,

00:04:53.000 --> 00:04:58.000
y) and then the distance to the
origin is square root of x

00:04:58.000 --> 00:05:02.000
squared plus y squared.
Well, do we really want to

00:05:02.000 --> 00:05:05.000
minimize that or can we minimize
something easier?

00:05:05.000 --> 00:05:06.000
Yeah.
Maybe we can minimize the

00:05:06.000 --> 00:05:14.000
square of a distance.
Let's forget this guy and

00:05:14.000 --> 00:05:23.000
instead -- Actually,
we will minimize f of x,

00:05:23.000 --> 00:05:27.000
y equals x squared plus y
squared,

00:05:27.000 --> 00:05:39.000
that looks better,
subject to the constraint xy =

00:05:39.000 --> 00:05:44.000
3.
And so we will call this thing

00:05:44.000 --> 00:05:50.000
g of x, y to illustrate the
general method.

00:05:50.000 --> 00:05:58.000
Let's look at a picture.
Here you can see in yellow the

00:05:58.000 --> 00:06:02.000
hyperbola xy equals three.
And we are going to look for

00:06:02.000 --> 00:06:05.000
the points that are the closest
to the origin.

00:06:05.000 --> 00:06:08.000
What can we do?
Well, for example,

00:06:08.000 --> 00:06:13.000
we can plot the function x
squared plus y squared,

00:06:13.000 --> 00:06:17.000
function f.
That is the contour plot of f

00:06:17.000 --> 00:06:21.000
with a hyperbola on top of it.
Now let's see what we can do

00:06:21.000 --> 00:06:25.000
with that.
Well, let's ask ourselves,

00:06:25.000 --> 00:06:30.000
for example,
if I look at points where f

00:06:30.000 --> 00:06:34.000
equals 20 now.
I think I am at 20 but you

00:06:34.000 --> 00:06:37.000
cannot really see it.
That is a circle with a point

00:06:37.000 --> 00:06:41.000
whose distant square is 20.
Well, can I find a solution if

00:06:41.000 --> 00:06:44.000
I am on the hyperbola?
Yes, there are four points at

00:06:44.000 --> 00:06:46.000
this distance.
Can I do better?

00:06:46.000 --> 00:06:49.000
Well, let's decrease for
distance.

00:06:49.000 --> 00:06:52.000
Yes, we can still find points
on the hyperbola and so on.

00:06:52.000 --> 00:06:56.000
Except if we go too low then
there are no points on this

00:06:56.000 --> 00:07:00.000
circle anymore in the hyperbola.
If we decrease the value of f

00:07:00.000 --> 00:07:03.000
that we want to look at that
will somehow limit value beyond

00:07:03.000 --> 00:07:07.000
which we cannot go,
and that is the minimum of f.

00:07:07.000 --> 00:07:13.000
We are trying to look for the
smallest value of f that will

00:07:13.000 --> 00:07:17.000
actually be realized on the
hyperbola.

00:07:17.000 --> 00:07:20.000
When does that happen?
Well, I have to backtrack a

00:07:20.000 --> 00:07:23.000
little bit.
It seems like the limiting case

00:07:23.000 --> 00:07:26.000
is basically here.
It is when the circle is

00:07:26.000 --> 00:07:31.000
tangent to the hyperbola.
That is the smallest circle

00:07:31.000 --> 00:07:37.000
that will hit the hyperbola.
If I take a larger value of f,

00:07:37.000 --> 00:07:39.000
I will have solutions.
If I take a smaller value of f,

00:07:39.000 --> 00:07:41.000
I will not have any solutions
anymore.

00:07:41.000 --> 00:07:49.000
So, that is the situation that
we want to solve for.

00:07:49.000 --> 00:07:54.000
How do we find that minimum?
Well, a key observation that is

00:07:54.000 --> 00:07:58.000
valid on this picture,
and that actually remain true

00:07:58.000 --> 00:08:03.000
in the completely general case,
is that when we have a minimum

00:08:03.000 --> 00:08:09.000
the level curve of f is actually
tangent to our hyperbola.

00:08:09.000 --> 00:08:15.000
It is tangent to the set of
points where x,

00:08:15.000 --> 00:08:20.000
y equals three,
to the hyperbola.

00:08:20.000 --> 00:08:32.000
Let's write that down.
We observe that at the minimum

00:08:32.000 --> 00:08:49.000
the level curve of f is tangent
to the hyperbola.

00:08:49.000 --> 00:08:53.000
Remember, the hyperbola is
given by the equal g equals

00:08:53.000 --> 00:08:56.000
three, so it is a level curve of
g.

00:08:56.000 --> 00:08:59.000
We have a level curve of f and
a level curve of g that are

00:08:59.000 --> 00:09:03.000
tangent to each other.
And I claim that is going to be

00:09:03.000 --> 00:09:07.000
the general situation that we
are interested in.

00:09:07.000 --> 00:09:12.000
How do we try to solve for
points where this happens?

00:09:28.000 --> 00:09:36.000
How do we find x,
y where the level curves of f

00:09:36.000 --> 00:09:47.000
and g are tangent to each other?
Let's think for a second.

00:09:47.000 --> 00:09:51.000
If the two level curves are
tangent to each other that means

00:09:51.000 --> 00:09:57.000
they have the same tangent line.
That means that the normal

00:09:57.000 --> 00:10:03.000
vectors should be parallel.
Let me maybe draw a picture

00:10:03.000 --> 00:10:06.000
here.
This is the level curve maybe f

00:10:06.000 --> 00:10:11.000
equals something.
And this is the level curve g

00:10:11.000 --> 00:10:16.000
equals constant.
Here my constant is three.

00:10:16.000 --> 00:10:20.000
Well, if I look for gradient
vectors, the gradient of f will

00:10:20.000 --> 00:10:23.000
be perpendicular to the level
curve of f.

00:10:23.000 --> 00:10:27.000
The gradient of g will be
perpendicular to the level curve

00:10:27.000 --> 00:10:29.000
of g.
They don't have any reason to

00:10:29.000 --> 00:10:32.000
be of the same size,
but they have to be parallel to

00:10:32.000 --> 00:10:35.000
each other.
Of course, they could also be

00:10:35.000 --> 00:10:38.000
parallel pointing in opposite
directions.

00:10:38.000 --> 00:10:48.000
But the key point is that when
this happens the gradient of f

00:10:48.000 --> 00:10:54.000
is parallel to the gradient of
g.

00:10:54.000 --> 00:11:03.000
Well, let's check that.
Here is a point.

00:11:03.000 --> 00:11:05.000
And I can plot the gradient of
f in blue.

00:11:05.000 --> 00:11:08.000
The gradient of g in yellow.
And you see,

00:11:08.000 --> 00:11:12.000
in most of these places,
somehow the two gradients are

00:11:12.000 --> 00:11:14.000
not really parallel.
Actually, I should not be

00:11:14.000 --> 00:11:17.000
looking at random points.
I should be looking only on the

00:11:17.000 --> 00:11:19.000
hyperbola.
I want points on the hyperbola

00:11:19.000 --> 00:11:22.000
where the two gradients are
parallel.

00:11:22.000 --> 00:11:28.000
Well, when does that happen?
Well, it looks like it will

00:11:28.000 --> 00:11:31.000
happen here.
When I am at a minimum,

00:11:31.000 --> 00:11:34.000
the two gradient vectors are
parallel.

00:11:34.000 --> 00:11:37.000
It is not really proof.
It is an example that seems to

00:11:37.000 --> 00:11:43.000
be convincing.
So far things work pretty well.

00:11:43.000 --> 00:11:46.000
How do we decide if two vectors
are parallel?

00:11:46.000 --> 00:11:50.000
Well, they are parallel when
they are proportional to each

00:11:50.000 --> 00:11:54.000
other.
You can write one of them as a

00:11:54.000 --> 00:12:02.000
constant times the other one,
and that constant usually one

00:12:02.000 --> 00:12:07.000
uses the Greek letter lambda.
I don't know if you have seen

00:12:07.000 --> 00:12:10.000
it before.
It is the Greek letter for L.

00:12:10.000 --> 00:12:15.000
And probably,
I am sure, it is somebody's

00:12:15.000 --> 00:12:22.000
idea of paying tribute to
Lagrange by putting an L in

00:12:22.000 --> 00:12:25.000
there.
Lambda is just a constant.

00:12:25.000 --> 00:12:31.000
And we are looking for a scalar
lambda and points x and y where

00:12:31.000 --> 00:12:33.000
this holds.
In fact,

00:12:33.000 --> 00:12:37.000
what we are doing is replacing
min/max problems in two

00:12:37.000 --> 00:12:41.000
variables with a constraint
between them by a set of

00:12:41.000 --> 00:12:47.000
equations involving,
you will see, three variables.

00:12:47.000 --> 00:12:54.000
We had min/max with two
variables x, y,

00:12:54.000 --> 00:13:00.000
but no independent.
We had a constraint g of x,

00:13:00.000 --> 00:13:06.000
y equals constant.
And that becomes something new.

00:13:06.000 --> 00:13:12.000
That becomes a system of
equations where we have to

00:13:12.000 --> 00:13:19.000
solve, well, let's write down
what it means for gradient f to

00:13:19.000 --> 00:13:26.000
be proportional to gradient g.
That means that f sub x should

00:13:26.000 --> 00:13:32.000
be lambda times g sub x,
and f sub y should be lambda

00:13:32.000 --> 00:13:36.000
times g sub y.
Because the gradient vectors

00:13:36.000 --> 00:13:39.000
here are f sub x,
f sub y and g sub x,

00:13:39.000 --> 00:13:43.000
g sub y.
If you have a third variable z

00:13:43.000 --> 00:13:49.000
then you have also an equation f
sub z equals lambda g sub z.

00:13:49.000 --> 00:13:53.000
Now, let's see.
How many unknowns do we have in

00:13:53.000 --> 00:13:55.000
these equations?
Well, there is x,

00:13:55.000 --> 00:14:01.000
there is y and there is lambda.
We have three unknowns and have

00:14:01.000 --> 00:14:06.000
only two equations.
Something is missing.

00:14:06.000 --> 00:14:10.000
Well, I mean x and y are not
actually independent.

00:14:10.000 --> 00:14:14.000
They are related by the
equation g of x,

00:14:14.000 --> 00:14:21.000
y equals c, so we need to add
the constraint g equals c.

00:14:21.000 --> 00:14:26.000
And now we have three equations
involving three variables.

00:14:26.000 --> 00:14:39.000
Let's see how that works.
Here remember we have f equals

00:14:39.000 --> 00:14:45.000
x squared y squared and g = xy.
What is f sub x?

00:14:45.000 --> 00:14:52.000
It is going to be 2x equals
lambda times,

00:14:52.000 --> 00:14:55.000
what is g sub x,
y.

00:14:55.000 --> 00:14:59.000
Maybe I should write here f sub
x equals lambda g sub x just to

00:14:59.000 --> 00:15:03.000
remind you.
Then we have f sub y equals

00:15:03.000 --> 00:15:10.000
lambda g sub y.
F sub y is 2y equals lambda

00:15:10.000 --> 00:15:18.000
times g sub y is x.
And then our third equation g

00:15:18.000 --> 00:15:22.000
equals c becomes xy equals
three.

00:15:22.000 --> 00:15:26.000
So, that is what you would have
to solve.

00:15:26.000 --> 00:15:33.000
Any questions at this point?
No.

00:15:33.000 --> 00:15:44.000
Yes?
How do I know the direction of

00:15:44.000 --> 00:15:47.000
a gradient?
Do you mean how do I know that

00:15:47.000 --> 00:15:50.000
it is perpendicular to a level
curve?

00:15:50.000 --> 00:15:54.000
Oh, how do I know if it points
in that direction on the

00:15:54.000 --> 00:15:56.000
opposite one?
Well, that depends.

00:15:56.000 --> 00:15:59.000
I mean we'd seen in last time,
but the gradient is

00:15:59.000 --> 00:16:02.000
perpendicular to the level and
points towards higher values of

00:16:02.000 --> 00:16:05.000
a function.
So it could be -- Wait.

00:16:05.000 --> 00:16:08.000
What did I have?
It could be that my gradient

00:16:08.000 --> 00:16:11.000
vectors up there actually point
in opposite directions.

00:16:11.000 --> 00:16:15.000
It doesn't matter to me because
it will still look the same in

00:16:15.000 --> 00:16:18.000
terms of the equation,
just lambda will be positive or

00:16:18.000 --> 00:16:22.000
negative, depending on the case.
I can handle both situations.

00:16:22.000 --> 00:16:30.000
It's not a problem.
I can allow lambda to be

00:16:30.000 --> 00:16:34.000
positive or negative.
Well, in this example,

00:16:34.000 --> 00:16:35.000
it looks like lambda will be
positive.

00:16:35.000 --> 00:16:38.000
If you look at the picture on
the plot.

00:16:38.000 --> 00:16:48.000
Yes?
Well, because actually they are

00:16:48.000 --> 00:16:51.000
not equal to each other.
If you look at this point where

00:16:51.000 --> 00:16:55.000
the hyperbola and the circle
touch each other,

00:16:55.000 --> 00:16:58.000
first of all,
I don't know which circle I am

00:16:58.000 --> 00:17:01.000
going to look at.
I am trying to solve,

00:17:01.000 --> 00:17:04.000
actually, for the radius of the
circle.

00:17:04.000 --> 00:17:07.000
I am trying to find what the
minimum value of f is.

00:17:07.000 --> 00:17:10.000
And, second,
at that point,

00:17:10.000 --> 00:17:14.000
the value of f and the value of
g are not equal.

00:17:14.000 --> 00:17:17.000
g is equal to three because I
want the hyperbola x equals

00:17:17.000 --> 00:17:19.000
three.
The value of f will be the

00:17:19.000 --> 00:17:22.000
square of a distance,
whatever that is.

00:17:22.000 --> 00:17:27.000
I think it will end up being 6,
but we will see.

00:17:27.000 --> 00:17:29.000
So, you cannot really set them
equal because you don't know

00:17:29.000 --> 00:17:45.000
what f is equal to in advance.
Yes?

00:17:45.000 --> 00:17:49.000
Not quite.
Actually, here I am just using

00:17:49.000 --> 00:17:52.000
this idea of finding a point
closest to the origin to

00:17:52.000 --> 00:17:55.000
illustrate an example of a
min/max problem.

00:17:55.000 --> 00:17:59.000
The general problem we are
trying to solve is minimize f

00:17:59.000 --> 00:18:03.000
subject to g equals constant.
And what we are going to do for

00:18:03.000 --> 00:18:07.000
that is we are really going to
say instead let's look at places

00:18:07.000 --> 00:18:10.000
where gradient f and gradient g
are parallel to each other and

00:18:10.000 --> 00:18:14.000
solve for equations of that.
I think we completely lose the

00:18:14.000 --> 00:18:19.000
notion of closest point if we
just look at these equations.

00:18:19.000 --> 00:18:21.000
We don't really say anything
about closest points anymore.

00:18:21.000 --> 00:18:24.000
Of course, that is what they
mean in the end.

00:18:24.000 --> 00:18:28.000
But, in the general setting,
there is no closest point

00:18:28.000 --> 00:18:31.000
involved anymore.
OK.

00:18:31.000 --> 00:18:40.000
Yes?
Yes.

00:18:40.000 --> 00:18:43.000
It is always going to be the
case that,

00:18:43.000 --> 00:18:46.000
at the minimum,
or at the maximum of a function

00:18:46.000 --> 00:18:49.000
subject to a constraint,
the level curves of f and the

00:18:49.000 --> 00:18:52.000
level curves of g will be
tangent to each other.

00:18:52.000 --> 00:18:54.000
That is the basis for this
method.

00:18:54.000 --> 00:19:00.000
I am going to justify that soon.
It could be minimum or maximum.

00:19:00.000 --> 00:19:02.000
In three-dimensions it could
even be a saddle point.

00:19:02.000 --> 00:19:03.000
And, in fact,
I should say in advance,

00:19:03.000 --> 00:19:06.000
this method will not tell us
whether it is a minimum or a

00:19:06.000 --> 00:19:08.000
maximum.
We do not have any way of

00:19:08.000 --> 00:19:10.000
knowing, except for testing
values.

00:19:10.000 --> 00:19:13.000
We cannot use second derivative
tests or anything like that.

00:19:13.000 --> 00:19:21.000
I will get back to that.
Yes?

00:19:21.000 --> 00:19:23.000
Yes.
Here you can set y equals to

00:19:23.000 --> 00:19:26.000
favor x.
Then you can minimize x squared

00:19:26.000 --> 00:19:30.000
plus nine over x squared.
In general, if I am trying to

00:19:30.000 --> 00:19:33.000
solve a more complicated
problem, I might not be able to

00:19:33.000 --> 00:19:35.000
solve.
I am doing an example where,

00:19:35.000 --> 00:19:38.000
indeed, here you could solve
and remove one variable,

00:19:38.000 --> 00:19:41.000
but you cannot always do that.
And this method will still work.

00:19:41.000 --> 00:19:47.000
The other one won't.
OK.

00:19:47.000 --> 00:19:53.000
I don't see any other questions.
Are there any other questions?

00:19:53.000 --> 00:19:56.000
No.
OK.

00:19:56.000 --> 00:20:02.000
I see a lot of students
stretching and so on,

00:20:02.000 --> 00:20:08.000
so it is very confusing for me.
How do we solve these equations?

00:20:08.000 --> 00:20:14.000
Well, the answer is in general
we might be in deep trouble.

00:20:14.000 --> 00:20:18.000
There is no general method for
solving the equations that you

00:20:18.000 --> 00:20:21.000
get from this method.
You just have to think about

00:20:21.000 --> 00:20:25.000
them.
Sometimes it will be very easy.

00:20:25.000 --> 00:20:28.000
Sometimes it will be so hard
that you cannot actually do it

00:20:28.000 --> 00:20:31.000
without the computer.
Sometimes it will be just hard

00:20:31.000 --> 00:20:33.000
enough to be on Part B of this
week's problem set.

00:20:50.000 --> 00:20:56.000
I claim in this case we can
actually do it without so much

00:20:56.000 --> 00:21:03.000
trouble, because actually we can
think of this as a two by two

00:21:03.000 --> 00:21:10.000
linear system in x and y.
Well, let me do something.

00:21:10.000 --> 00:21:18.000
Let me rewrite the first two
equations as 2x - lambda y = 0.

00:21:18.000 --> 00:21:30.000
And lambda x - 2y = 0.
And xy = 3.

00:21:30.000 --> 00:21:36.000
That is what we want to solve.
Well, I can put this into

00:21:36.000 --> 00:21:41.000
matrix form.
Two minus lambda,

00:21:41.000 --> 00:21:48.000
lambda minus two times x,
y equals 0,0.

00:21:48.000 --> 00:21:52.000
Now, how do I solve a linear
system matrix times x,

00:21:52.000 --> 00:21:54.000
y equals zero?
Well, I always have an obvious

00:21:54.000 --> 00:21:56.000
solution.
X and y both equal to zero.

00:21:56.000 --> 00:22:02.000
Is that a good solution?
No, because zero times zero is

00:22:02.000 --> 00:22:07.000
not three.
We want another solution,

00:22:07.000 --> 00:22:14.000
the trivial solution.
0,0 does not solve the

00:22:14.000 --> 00:22:20.000
constraint equation xy equals
three, so we want another

00:22:20.000 --> 00:22:24.000
solution.
When do we have another

00:22:24.000 --> 00:22:29.000
solution?
Well, when the determinant of a

00:22:29.000 --> 00:22:37.000
matrix is zero.
We have other solutions that

00:22:37.000 --> 00:22:46.000
exist only if determinant of a
matrix is zero.

00:22:46.000 --> 00:23:01.000
M is this guy.
Let's compute the determinant.

00:23:01.000 --> 00:23:08.000
Well, that seems to be negative
four plus lambda squared.

00:23:08.000 --> 00:23:15.000
That is zero exactly when
lambda squared equals four,

00:23:15.000 --> 00:23:20.000
which is lambda is plus or
minus two.

00:23:20.000 --> 00:23:25.000
Already you see here it is a
the level of difficulty that is

00:23:25.000 --> 00:23:30.000
a little bit much for an exam
but perfectly fine for a problem

00:23:30.000 --> 00:23:33.000
set or for a beautiful lecture
like this one.

00:23:33.000 --> 00:23:37.000
How do we deal with -- Well,
we have two cases to look at.

00:23:37.000 --> 00:23:40.000
Lambda equals two or lambda
equals minus two.

00:23:40.000 --> 00:23:43.000
Let's start with lambda equals
two.

00:23:43.000 --> 00:23:47.000
If I set lambda equals two,
what does this equation become?

00:23:47.000 --> 00:23:53.000
Well, it becomes x equals y.
This one becomes y equals x.

00:23:53.000 --> 00:23:57.000
Well, they seem to be the same.
x equals y.

00:23:57.000 --> 00:24:01.000
And then the equation xy equals
three becomes,

00:24:01.000 --> 00:24:06.000
well, x squared equals three.
I have two solutions.

00:24:06.000 --> 00:24:15.000
One is x equals root three and,
therefore, y equals root three

00:24:15.000 --> 00:24:23.000
as well, or negative root three
and negative root three.

00:24:23.000 --> 00:24:26.000
Let's look at the other case.
If I set lambda equal to

00:24:26.000 --> 00:24:30.000
negative two then I get 2x
equals negative 2y.

00:24:30.000 --> 00:24:37.000
That means x equals negative y.
The second one,

00:24:37.000 --> 00:24:40.000
2y equals negative 2x.
That is y equals negative x.

00:24:40.000 --> 00:24:45.000
Well, that is the same thing.
And xy equals three becomes

00:24:45.000 --> 00:24:51.000
negative x squared equals three.
Can we solve that?

00:24:51.000 --> 00:24:58.000
No.
There are no solutions here.

00:24:58.000 --> 00:25:03.000
Now we have two candidate
points which are these two

00:25:03.000 --> 00:25:07.000
points, root three,
root three or negative root

00:25:07.000 --> 00:25:13.000
three, negative root three.
OK.

00:25:13.000 --> 00:25:16.000
Let's actually look at what we
have here.

00:25:16.000 --> 00:25:20.000
Maybe you cannot read the
coordinates, but the point that

00:25:20.000 --> 00:25:23.000
I have here is indeed root
three, root three.

00:25:23.000 --> 00:25:26.000
How do we see that lambda
equals two?

00:25:26.000 --> 00:25:29.000
Well, if you look at this
picture, the gradient of f,

00:25:29.000 --> 00:25:32.000
that is the blue vector,
is indeed twice the yellow

00:25:32.000 --> 00:25:36.000
vector, gradient g.
That is where you read the

00:25:36.000 --> 00:25:41.000
value of lambda.
And we have the other solution

00:25:41.000 --> 00:25:45.000
which is somewhere here.
Negative root three,

00:25:45.000 --> 00:25:48.000
negative root there.
And there, again,

00:25:48.000 --> 00:25:51.000
lambda equals two.
The two vectors are

00:25:51.000 --> 00:25:59.000
proportional by a factor of two.
Yes?

00:25:59.000 --> 00:26:01.000
No, solutions are not quite
guaranteed to be absolute minima

00:26:01.000 --> 00:26:03.000
or maxima.
They are guaranteed to be

00:26:03.000 --> 00:26:06.000
somehow critical points end of a
constraint.

00:26:06.000 --> 00:26:09.000
That means if you were able to
solve and eliminate the variable

00:26:09.000 --> 00:26:12.000
that would be a critical point.
When you have the same problem,

00:26:12.000 --> 00:26:14.000
as we have critical points,
are they maxima or minima?

00:26:14.000 --> 00:26:22.000
And the answer is,
well, we won't know until we

00:26:22.000 --> 00:26:28.000
check.
More questions?

00:26:28.000 --> 00:26:32.000
No.
Yes?

00:26:32.000 --> 00:26:36.000
What is a Lagrange multiplier?
Well, it is this number lambda

00:26:36.000 --> 00:26:39.000
that is called the multiplier
here.

00:26:39.000 --> 00:26:44.000
It is a multiplier because it
is what you have to multiply

00:26:44.000 --> 00:26:48.000
gradient of g by to get gradient
of f.

00:26:48.000 --> 00:26:49.000
It multiplies.

00:27:04.000 --> 00:27:11.000
Let's try to see why is this
method valid?

00:27:11.000 --> 00:27:18.000
Because so far I have shown you
pictures and have said see they

00:27:18.000 --> 00:27:23.000
are tangent.
But why is it that they have to

00:27:23.000 --> 00:27:28.000
be tangent in general?
Let's think about it.

00:27:28.000 --> 00:27:37.000
Let's say that we are at
constrained min or max.

00:27:37.000 --> 00:27:42.000
What that means is that if I
move on the level g equals

00:27:42.000 --> 00:27:46.000
constant then the value of f
should only increase or only

00:27:46.000 --> 00:27:49.000
decrease.
But it means,

00:27:49.000 --> 00:27:53.000
in particular,
to first order it will not

00:27:53.000 --> 00:27:56.000
change.
At an unconstrained min or max,

00:27:56.000 --> 00:27:59.000
partial derivatives are zero.
In this case,

00:27:59.000 --> 00:28:02.000
derivatives are zero only in
the allowed directions.

00:28:02.000 --> 00:28:09.000
And the allowed directions are
those that stay on the levels of

00:28:09.000 --> 00:28:21.000
this g equals constant.
In any direction along the

00:28:21.000 --> 00:28:40.000
level set g = c the rate of
change of f must be zero.

00:28:40.000 --> 00:28:44.000
That is what happens at minima
or maxima.

00:28:44.000 --> 00:28:49.000
Except here,
of course, we look only at the

00:28:49.000 --> 00:28:54.000
allowed directions.
Let's say the same thing in

00:28:54.000 --> 00:28:57.000
terms of directional
derivatives.

00:29:23.000 --> 00:29:35.000
That means for any direction
that is tangent to the

00:29:35.000 --> 00:29:49.000
constraint level g equal c,
we must have df over ds in the

00:29:49.000 --> 00:30:00.000
direction of u equals zero.
I will draw a picture.

00:30:00.000 --> 00:30:05.000
Let's say now I am in three
variables just to give you

00:30:05.000 --> 00:30:09.000
different examples.
Here I have a level surface g

00:30:09.000 --> 00:30:11.000
equals c.
I am at my point.

00:30:11.000 --> 00:30:18.000
And if I move in any direction
that is on the level surface,

00:30:18.000 --> 00:30:24.000
so I move in the direction u
tangent to the level surface,

00:30:24.000 --> 00:30:32.000
then the rate of change of f in
that direction should be zero.

00:30:32.000 --> 00:30:34.000
Now, remember what the formula
is for this guy.

00:30:34.000 --> 00:30:44.000
Well, we have seen that this
guy is actually radiant f dot u.

00:30:44.000 --> 00:30:58.000
That means any such vector u
must be perpendicular to the

00:30:58.000 --> 00:31:05.000
gradient of f.
That means that the gradient of

00:31:05.000 --> 00:31:10.000
f should be perpendicular to
anything that is tangent to this

00:31:10.000 --> 00:31:12.000
level.
That means the gradient of f

00:31:12.000 --> 00:31:16.000
should be perpendicular to the
level set.

00:31:16.000 --> 00:31:17.000
That is what we have shown.

00:31:37.000 --> 00:31:40.000
But we know another vector that
is also perpendicular to the

00:31:40.000 --> 00:31:57.000
level set of g.
That is the gradient of g.

00:31:57.000 --> 00:32:02.000
We conclude that the gradient
of f must be parallel to the

00:32:02.000 --> 00:32:07.000
gradient of g because both are
perpendicular to the level set

00:32:07.000 --> 00:32:09.000
of g.
I see confused faces,

00:32:09.000 --> 00:32:13.000
so let me try to tell you again
where that comes from.

00:32:13.000 --> 00:32:16.000
We said if we had a constrained
minimum or maximum,

00:32:16.000 --> 00:32:19.000
if we move in the level set of
g, f doesn't change.

00:32:19.000 --> 00:32:20.000
Well, it doesn't change to
first order.

00:32:20.000 --> 00:32:24.000
It is the same idea as when you
are looking for a minimum you

00:32:24.000 --> 00:32:26.000
set the derivative equal to
zero.

00:32:26.000 --> 00:32:31.000
So the derivative in any
direction, tangent to g equals

00:32:31.000 --> 00:32:34.000
c, should be the directional
derivative of f,

00:32:34.000 --> 00:32:38.000
in any such direction,
should be zero.

00:32:38.000 --> 00:32:43.000
That is what we mean by
critical point of f.

00:32:43.000 --> 00:32:48.000
And so that means that any
vector u, any unit vector

00:32:48.000 --> 00:32:55.000
tangent to the level set of g is
going to be perpendicular to the

00:32:55.000 --> 00:33:00.000
gradient of f.
That means that the gradient of

00:33:00.000 --> 00:33:04.000
f is perpendicular to the level
set of g.

00:33:04.000 --> 00:33:06.000
If you want,
that means the level sets of f

00:33:06.000 --> 00:33:10.000
and g are tangent to each other.
That is justifying what we have

00:33:10.000 --> 00:33:15.000
observed in the picture that the
two level sets have to be

00:33:15.000 --> 00:33:20.000
tangent to each other at the
prime minimum or maximum.

00:33:20.000 --> 00:33:23.000
Does that make a little bit of
sense?

00:33:23.000 --> 00:33:28.000
Kind of.
I see at least a few faces

00:33:28.000 --> 00:33:35.000
nodding so I take that to be a
positive answer.

00:33:35.000 --> 00:33:39.000
Since I have been asked by
several of you,

00:33:39.000 --> 00:33:43.000
how do I know if it is a
maximum or a minimum?

00:33:43.000 --> 00:33:57.000
Well, warning,
the method doesn't tell whether

00:33:57.000 --> 00:34:09.000
a solution is a minimum or a
maximum.

00:34:09.000 --> 00:34:13.000
How do we do it?
Well, more bad news.

00:34:13.000 --> 00:34:26.000
We cannot use the second
derivative test.

00:34:26.000 --> 00:34:30.000
And the reason for that is that
we care actually only about

00:34:30.000 --> 00:34:34.000
these specific directions that
are tangent to variable of g.

00:34:34.000 --> 00:34:39.000
And we don't want to bother to
try to define directional second

00:34:39.000 --> 00:34:42.000
derivatives.
Not to mention that actually it

00:34:42.000 --> 00:34:45.000
wouldn't work.
There is a criterion but it is

00:34:45.000 --> 00:34:49.000
much more complicated than that.
Basically, the answer for us is

00:34:49.000 --> 00:34:52.000
that we don't have a second
derivative test in this

00:34:52.000 --> 00:34:54.000
situation.
What are we left with?

00:34:54.000 --> 00:34:57.000
Well, we are just left with
comparing values.

00:34:57.000 --> 00:35:00.000
Say that in this problem you
found a point where f equals

00:35:00.000 --> 00:35:04.000
three, a point where f equals
nine, a point where f equals 15.

00:35:04.000 --> 00:35:08.000
Well, then probably the minimum
is the point where f equals

00:35:08.000 --> 00:35:12.000
three and the maximum is 15.
Actually, in this case,

00:35:12.000 --> 00:35:17.000
where we found minima,
these two points are tied for

00:35:17.000 --> 00:35:19.000
minimum.
What about the maximum?

00:35:19.000 --> 00:35:22.000
What is the maximum of f on the
hyperbola?

00:35:22.000 --> 00:35:25.000
Well, it is infinity because
the point can go as far as you

00:35:25.000 --> 00:35:29.000
want from the origin.
But the general idea is if we

00:35:29.000 --> 00:35:35.000
have a good reason to believe
that there should be a minimum,

00:35:35.000 --> 00:35:38.000
and it's not like at infinity
or something weird like that,

00:35:38.000 --> 00:35:42.000
then the minimum will be a
solution of the Lagrange

00:35:42.000 --> 00:35:46.000
multiplier equations.
We just look for all the

00:35:46.000 --> 00:35:51.000
solutions and then we choose the
one that gives us the lowest

00:35:51.000 --> 00:35:55.000
value.
Is that good enough?

00:35:55.000 --> 00:35:57.000
Let me actually write that down.

00:36:23.000 --> 00:36:35.000
To find the minimum or the
maximum, we compare values of f

00:36:35.000 --> 00:36:46.000
at the various solutions -- --
to Lagrange multiplier

00:36:46.000 --> 00:36:49.000
equations.

00:37:08.000 --> 00:37:11.000
I should say also that
sometimes you can just conclude

00:37:11.000 --> 00:37:14.000
by thinking geometrically.
In this case,

00:37:14.000 --> 00:37:18.000
when it is asking you which
point is closest to the origin

00:37:18.000 --> 00:37:23.000
you can just see that your
answer is the correct one.

00:37:23.000 --> 00:37:32.000
Let's do an advanced example.
Advanced means that -- Well,

00:37:32.000 --> 00:37:37.000
this one I didn't actually dare
to put on top of the other

00:37:37.000 --> 00:37:48.000
problem sets.
Instead, I am going to do it.

00:37:48.000 --> 00:37:51.000
What is this going to be about?
We are going to look for a

00:37:51.000 --> 00:38:03.000
surface minimizing pyramid.
Let's say that we want to build

00:38:03.000 --> 00:38:19.000
a pyramid with a given
triangular base -- -- and a

00:38:19.000 --> 00:38:28.000
given volume.
Say that I have maybe in the x,

00:38:28.000 --> 00:38:33.000
y plane I am giving you some
triangle.

00:38:33.000 --> 00:38:40.000
And I am going to try to build
a pyramid.

00:38:40.000 --> 00:38:48.000
Of course, I can choose where
to put the top of a pyramid.

00:38:48.000 --> 00:38:53.000
This guy will end up being
behind now.

00:38:53.000 --> 00:39:09.000
And the constraint and the goal
is to minimize the total surface

00:39:09.000 --> 00:39:13.000
area.
The first time I taught this

00:39:13.000 --> 00:39:15.000
class, it was a few years ago,
was just before they built the

00:39:15.000 --> 00:39:17.000
Stata Center.
And then I used to motivate

00:39:17.000 --> 00:39:20.000
this problem by saying Frank
Gehry has gone crazy and has

00:39:20.000 --> 00:39:23.000
been given a triangular plot of
land he wants to put a pyramid.

00:39:23.000 --> 00:39:26.000
There needs to be the right
amount of volume so that you can

00:39:26.000 --> 00:39:28.000
put all the offices in there.
And he wants it to be,

00:39:28.000 --> 00:39:31.000
actually, covered in solid
gold.

00:39:31.000 --> 00:39:34.000
And because that is expensive,
the administration wants him to

00:39:34.000 --> 00:39:38.000
cut the costs a bit.
And so you have to minimize the

00:39:38.000 --> 00:39:42.000
total size so that it doesn't
cost too much.

00:39:42.000 --> 00:39:45.000
We will see if MIT comes up
with a triangular pyramid

00:39:45.000 --> 00:39:48.000
building.
Hopefully not.

00:39:48.000 --> 00:39:58.000
It could be our next dorm,
you never know.

00:39:58.000 --> 00:40:01.000
Anyway, it is a fine geometry
problem.

00:40:01.000 --> 00:40:07.000
Let's try to think about how we
can do this.

00:40:07.000 --> 00:40:10.000
The natural way to think about
it would be -- Well,

00:40:10.000 --> 00:40:11.000
what do we have to look for
first?

00:40:11.000 --> 00:40:18.000
We have to look for the
position of that top point.

00:40:18.000 --> 00:40:29.000
Remember we know that the
volume of a pyramid is one-third

00:40:29.000 --> 00:40:37.000
the area of base times height.
In fact, fixing the volume,

00:40:37.000 --> 00:40:39.000
knowing that we have fixed the
area of a base,

00:40:39.000 --> 00:40:43.000
means that we are fixing the
height of the pyramid.

00:40:43.000 --> 00:40:47.000
The height is completely fixed.
What we have to choose just is

00:40:47.000 --> 00:40:52.000
where do we put that top point?
Do we put it smack in the

00:40:52.000 --> 00:40:58.000
middle of a triangle or to a
side or even anywhere we want?

00:40:58.000 --> 00:41:15.000
Its z coordinate is fixed.
Let's call h the height.

00:41:15.000 --> 00:41:20.000
What we could do is something
like this.

00:41:20.000 --> 00:41:24.000
We say we have three points of
a base.

00:41:24.000 --> 00:41:32.000
Let's call them p1 at (x1,
y1,0); p2 at (x2,

00:41:32.000 --> 00:41:36.000
y2,0); p3 at (x3,
y3,0).

00:41:36.000 --> 00:41:40.000
This point p is the unknown
point at (x, y,

00:41:40.000 --> 00:41:42.000
h).
We know the height.

00:41:42.000 --> 00:41:46.000
And then we want to minimize
the sum of the areas of these

00:41:46.000 --> 00:41:50.000
three triangles.
One here, one here and one at

00:41:50.000 --> 00:41:53.000
the back.
And areas of triangles we know

00:41:53.000 --> 00:41:57.000
how to express by using length
of cross-product.

00:41:57.000 --> 00:42:00.000
It becomes a function of x and
y.

00:42:00.000 --> 00:42:04.000
And you can try to minimize it.
Actually, it doesn't quite work.

00:42:04.000 --> 00:42:05.000
The formulas are just too
complicated.

00:42:05.000 --> 00:42:14.000
You will never get there.
What happens is actually maybe

00:42:14.000 --> 00:42:18.000
we need better coordinates.
Why do we need better

00:42:18.000 --> 00:42:21.000
coordinates?
That is because the geometry is

00:42:21.000 --> 00:42:24.000
kind of difficult to do if you
use x, y coordinates.

00:42:24.000 --> 00:42:28.000
I mean formula for
cross-product is fine,

00:42:28.000 --> 00:42:33.000
but then the length of the
vector will be annoying and just

00:42:33.000 --> 00:42:37.000
doesn't look good.
Instead, let's think about it

00:42:37.000 --> 00:42:38.000
differently.

00:42:54.000 --> 00:43:01.000
I claim if we do it this way
and we express the area as a

00:43:01.000 --> 00:43:06.000
function of x,
y, well, actually we can't

00:43:06.000 --> 00:43:13.000
solve for a minimum.
Here is another way to do it.

00:43:13.000 --> 00:43:17.000
Well, what has worked pretty
well for us so far is this

00:43:17.000 --> 00:43:19.000
geometric idea of base times
height.

00:43:19.000 --> 00:43:29.000
So let's think in terms of the
heights of side triangles.

00:43:29.000 --> 00:43:37.000
I am going to use the height of
these things.

00:43:37.000 --> 00:43:43.000
And I am going to say that the
area will be the sum of three

00:43:43.000 --> 00:43:48.000
terms, which are three bases
times three heights.

00:43:48.000 --> 00:43:53.000
Let's give names to these
quantities.

00:43:53.000 --> 00:43:58.000
Actually, for that it is going
to be good to have the point in

00:43:58.000 --> 00:44:01.000
the xy plane that lives directly
below p.

00:44:01.000 --> 00:44:08.000
Let's call it q.
P is the point that coordinates

00:44:08.000 --> 00:44:13.000
x, y, h.
And let's call q the point that

00:44:13.000 --> 00:44:19.000
is just below it and so it'
coordinates are x,

00:44:19.000 --> 00:44:22.000
y, 0.
Let's see.

00:44:22.000 --> 00:44:34.000
Let me draw a map of this thing.
p1, p2, p3 and I have my point

00:44:34.000 --> 00:44:37.000
q in the middle.
Let's see.

00:44:37.000 --> 00:44:40.000
To know these areas,
I need to know the base.

00:44:40.000 --> 00:44:44.000
Well, the base I can decide
that I know it because it is

00:44:44.000 --> 00:44:48.000
part of my given data.
I know the sides of this

00:44:48.000 --> 00:44:53.000
triangle.
Let me call the lengths a1,

00:44:53.000 --> 00:44:56.000
a2, a3.
I also need to know the height,

00:44:56.000 --> 00:44:58.000
so I need to know these
lengths.

00:44:58.000 --> 00:45:01.000
How do I know these lengths?
Well, its distance in space,

00:45:01.000 --> 00:45:03.000
but it is a little bit
annoying.

00:45:03.000 --> 00:45:10.000
But maybe I can reduce it to a
distance in the plane by looking

00:45:10.000 --> 00:45:17.000
instead at this distance here.
Let me give names to the

00:45:17.000 --> 00:45:24.000
distances from q to the sides.
Let's call u1,

00:45:24.000 --> 00:45:35.000
u2, u3 the distances from q to
the sides.

00:45:47.000 --> 00:45:49.000
Well, now I can claim I can
find, actually,

00:45:49.000 --> 00:45:53.000
sorry.
I need to draw one more thing.

00:45:53.000 --> 00:45:57.000
I claim I have a nice formula
for the area,

00:45:57.000 --> 00:46:01.000
because this is vertical and
this is horizontal so this

00:46:01.000 --> 00:46:05.000
length here is u3,
this length here is h.

00:46:05.000 --> 00:46:13.000
So what is this length here?
It is the square root of u3

00:46:13.000 --> 00:46:17.000
squared plus h squared.
And similarly for these other

00:46:17.000 --> 00:46:23.000
guys.
They are square roots of a u

00:46:23.000 --> 00:46:31.000
squared plus h squared.
The heights of the faces are

00:46:31.000 --> 00:46:36.000
square root of u1 squared times
h squared.

00:46:36.000 --> 00:46:43.000
And similarly with u2 and u3.
So the total side area is going

00:46:43.000 --> 00:46:47.000
to be the area of the first
faces,

00:46:47.000 --> 00:46:58.000
one-half of base times height,
plus one-half of a base times a

00:46:58.000 --> 00:47:06.000
height plus one-half of the
third one.

00:47:06.000 --> 00:47:09.000
It doesn't look so much better.
But, trust me,

00:47:09.000 --> 00:47:15.000
it will get better.
Now, that is a function of

00:47:15.000 --> 00:47:19.000
three variables,
u1, u2, u3.

00:47:19.000 --> 00:47:22.000
And how do we relate u1,
u2, u3 to each other?

00:47:22.000 --> 00:47:25.000
They are probably not
independent.

00:47:25.000 --> 00:47:32.000
Well, let's cut this triangle
here into three pieces like

00:47:32.000 --> 00:47:35.000
that.
Then each piece has side --

00:47:35.000 --> 00:47:40.000
Well, let's look at it the piece
of the bottom.

00:47:40.000 --> 00:47:50.000
It has base a3, height u3.
Cutting base into three tells

00:47:50.000 --> 00:47:57.000
you that the area of a base is
one-half of a1,

00:47:57.000 --> 00:48:04.000
u1 plus one-half of a2,
u2 plus one-half of a3,

00:48:04.000 --> 00:48:09.000
u3.
And that is our constraint.

00:48:09.000 --> 00:48:12.000
My three variables,
u1, u2, u3, are constrained in

00:48:12.000 --> 00:48:14.000
this way.
The sum of this figure must be

00:48:14.000 --> 00:48:17.000
the area of a base.
And I want to minimize that guy.

00:48:17.000 --> 00:48:23.000
So that is my g and that guy
here is my f.

00:48:23.000 --> 00:48:28.000
Now we try to apply our
Lagrange multiplier equations.

00:48:28.000 --> 00:48:33.000
Well, partial f of a partial u1
is -- Well,

00:48:33.000 --> 00:48:36.000
if you do the calculation,
you will see it is one-half a1,

00:48:36.000 --> 00:48:43.000
u1 over square root of u1^2
plus h^2 equals lambda,

00:48:43.000 --> 00:48:46.000
what is partial g,
partial a1?

00:48:46.000 --> 00:48:50.000
That one you can do, I am sure.
It is one-half a1.

00:48:50.000 --> 00:49:00.000
Oh, these guys simplify.
If you do the same with the

00:49:00.000 --> 00:49:09.000
second one -- -- things simplify
again.

00:49:09.000 --> 00:49:17.000
And the same with the third one.
Well, you will get,

00:49:17.000 --> 00:49:21.000
after simplifying,
u3 over square root of u3

00:49:21.000 --> 00:49:24.000
squared plus h squared equals
lambda.

00:49:24.000 --> 00:49:27.000
Now, that means this guy equals
this guy equals this guy.

00:49:27.000 --> 00:49:33.000
They are all equal to lambda.
And, if you think about it,

00:49:33.000 --> 00:49:39.000
that means that u1 = u2 = u3.
See, it looked like scary

00:49:39.000 --> 00:49:42.000
equations but the solution is
very simple.

00:49:42.000 --> 00:49:45.000
What does it mean?
It means that our point q

00:49:45.000 --> 00:49:47.000
should be equidistant from all
three sides.

00:49:47.000 --> 00:49:52.000
That is called the incenter.
Q should be in the incenter.

00:49:52.000 --> 00:49:56.000
The next time you have to build
a golden pyramid and don't want

00:49:56.000 --> 00:49:59.000
to go broke, well,
you know where to put the top.

00:49:59.000 --> 00:50:03.000
If that was a bit fast, sorry.
Anyway, it is not completely

00:50:03.000 --> 00:50:06.000
crucial.
But go over it and you will see

00:50:06.000 --> 00:50:08.000
it works.
Have a nice weekend.