Sentence
stringlengths 131
8.39k
| video_title
stringlengths 12
104
|
|---|---|
Okay, so this is the function that we're using, and you evaluate it at that point, and this will give you your point in three-dimensional space that our linear function, that our tangent plane has to pass through. So we can start writing out our function, right? We can say, okay, so our linear function has a function of x and y. It's gotta make sure it goes through that one and that negative two. So this is gonna be some constant a that we'll fill in in a moment, multiplied by x minus that one, plus, and then b, also a constant that we'll specify in a moment, times y minus that negative two. So it's minus a negative two. And then the whole, the thing that we add to it is f of one, negative two.
|
Computing a tangent plane.mp3
|
It's gotta make sure it goes through that one and that negative two. So this is gonna be some constant a that we'll fill in in a moment, multiplied by x minus that one, plus, and then b, also a constant that we'll specify in a moment, times y minus that negative two. So it's minus a negative two. And then the whole, the thing that we add to it is f of one, negative two. And let's just go ahead and evaluate that. Let's say we plug in one and negative two. So if we go up here and we plug in, so that would be three minus x equals one, whoop, three minus 1 3rd of, if x equals one, 1 3rd of one squared.
|
Computing a tangent plane.mp3
|
And then the whole, the thing that we add to it is f of one, negative two. And let's just go ahead and evaluate that. Let's say we plug in one and negative two. So if we go up here and we plug in, so that would be three minus x equals one, whoop, three minus 1 3rd of, if x equals one, 1 3rd of one squared. So that's 1 3rd, one squared, minus, and then y is negative two. So that will be minus negative two squared. So that's three minus 1 3rd, minus four.
|
Computing a tangent plane.mp3
|
So if we go up here and we plug in, so that would be three minus x equals one, whoop, three minus 1 3rd of, if x equals one, 1 3rd of one squared. So that's 1 3rd, one squared, minus, and then y is negative two. So that will be minus negative two squared. So that's three minus 1 3rd, minus four. So the whole thing is equal to, let's see, three minus four is negative one, minus another 1 3rd is negative 4 3rds. Okay, so that's what we add to this entire thing. We add negative 4 3rds.
|
Computing a tangent plane.mp3
|
So that's three minus 1 3rd, minus four. So the whole thing is equal to, let's see, three minus four is negative one, minus another 1 3rd is negative 4 3rds. Okay, so that's what we add to this entire thing. We add negative 4 3rds. And maybe I should just kind of make clear the separation here. So this is our function, but we don't know what a and b are. Those are things that we need to plug in.
|
Computing a tangent plane.mp3
|
We add negative 4 3rds. And maybe I should just kind of make clear the separation here. So this is our function, but we don't know what a and b are. Those are things that we need to plug in. Now the whole idea of a tangent plane is that the partial derivative with respect to x should match that of the original function. So if we go over to the graph here and start thinking about partial derivative information, if we want the partial derivative with respect to x, and you imagine moving purely in the x direction here, this intersects the graph along some kind of curve. And what the partial derivative with respect to x at this point tells you is the slope of the tangent line.
|
Computing a tangent plane.mp3
|
Those are things that we need to plug in. Now the whole idea of a tangent plane is that the partial derivative with respect to x should match that of the original function. So if we go over to the graph here and start thinking about partial derivative information, if we want the partial derivative with respect to x, and you imagine moving purely in the x direction here, this intersects the graph along some kind of curve. And what the partial derivative with respect to x at this point tells you is the slope of the tangent line. I'm kind of bad at drawing there. Is the slope of the tangent line in that direction of that point. So that's what the partial derivative with respect to x is telling you.
|
Computing a tangent plane.mp3
|
And what the partial derivative with respect to x at this point tells you is the slope of the tangent line. I'm kind of bad at drawing there. Is the slope of the tangent line in that direction of that point. So that's what the partial derivative with respect to x is telling you. And what you want when you look at the tangent plane is that the tangent plane also has that same slope. You know, you kind of, if I line things up here, you'd want it also to have that same slope. So you can specify over here and say a, we want a to be equal to the partial derivative of the function with respect to x evaluated at this one negative two, evaluated at that special point, one negative two.
|
Computing a tangent plane.mp3
|
So that's what the partial derivative with respect to x is telling you. And what you want when you look at the tangent plane is that the tangent plane also has that same slope. You know, you kind of, if I line things up here, you'd want it also to have that same slope. So you can specify over here and say a, we want a to be equal to the partial derivative of the function with respect to x evaluated at this one negative two, evaluated at that special point, one negative two. And then similarly, b, for pretty much the same reasons, and I'll draw it out here, so let's kind of, ah, ah, let's erase this line. So instead of intersecting it with that slice, let's see what movement in the y direction looks like. So in this case, it looks like a very steep slope, right?
|
Computing a tangent plane.mp3
|
So you can specify over here and say a, we want a to be equal to the partial derivative of the function with respect to x evaluated at this one negative two, evaluated at that special point, one negative two. And then similarly, b, for pretty much the same reasons, and I'll draw it out here, so let's kind of, ah, ah, let's erase this line. So instead of intersecting it with that slice, let's see what movement in the y direction looks like. So in this case, it looks like a very steep slope, right? Because in this case, the tangent line in that direction is a pretty steep slope. And now when we bring in, when we bring in the tangent plane, it should intersect with that constant x value plane along that same slope. Made it kind of messy there, but you can see that the line formed by intersecting these two planes should be that desired tangent.
|
Computing a tangent plane.mp3
|
So in this case, it looks like a very steep slope, right? Because in this case, the tangent line in that direction is a pretty steep slope. And now when we bring in, when we bring in the tangent plane, it should intersect with that constant x value plane along that same slope. Made it kind of messy there, but you can see that the line formed by intersecting these two planes should be that desired tangent. And what that corresponds to in formulas is that this b, which represents the partial derivative of L, L is the tangent plane function, that should be the same as if we take the partial derivative of f with respect to y at that point, at this point, one, negative two. And this is stuff that we can compute and that we can figure out. So let's just kind of start plugging that in.
|
Computing a tangent plane.mp3
|
Made it kind of messy there, but you can see that the line formed by intersecting these two planes should be that desired tangent. And what that corresponds to in formulas is that this b, which represents the partial derivative of L, L is the tangent plane function, that should be the same as if we take the partial derivative of f with respect to y at that point, at this point, one, negative two. And this is stuff that we can compute and that we can figure out. So let's just kind of start plugging that in. First, let me just copy this function because we're gonna need it. Copy, and now let's go on down here. I'm just gonna, let's paste it down here, kind of in the bottom, because that's what we'll need.
|
Computing a tangent plane.mp3
|
So let's just kind of start plugging that in. First, let me just copy this function because we're gonna need it. Copy, and now let's go on down here. I'm just gonna, let's paste it down here, kind of in the bottom, because that's what we'll need. So let's compute the partial derivative of f with respect to x. So we look down here, the only place where x shows up is in this negative 1 3rd of x squared context. So the partial derivative of f with respect to x is gonna be just the derivative of this little guy, which is negative, we bring down the two, negative 2 3rds of x.
|
Computing a tangent plane.mp3
|
I'm just gonna, let's paste it down here, kind of in the bottom, because that's what we'll need. So let's compute the partial derivative of f with respect to x. So we look down here, the only place where x shows up is in this negative 1 3rd of x squared context. So the partial derivative of f with respect to x is gonna be just the derivative of this little guy, which is negative, we bring down the two, negative 2 3rds of x. So when we go ahead and plug in, you know, x equals one, to see what it looks like when we evaluate at this point, that's just gonna be equal to negative 2 3rds. So that tells us that a is gonna have to be negative 2 3rds. Now for similar reasons, let's go ahead and compute the partial derivative with respect to y.
|
Computing a tangent plane.mp3
|
So the partial derivative of f with respect to x is gonna be just the derivative of this little guy, which is negative, we bring down the two, negative 2 3rds of x. So when we go ahead and plug in, you know, x equals one, to see what it looks like when we evaluate at this point, that's just gonna be equal to negative 2 3rds. So that tells us that a is gonna have to be negative 2 3rds. Now for similar reasons, let's go ahead and compute the partial derivative with respect to y. We look down here, well the only place that y shows up in the entire expression is this negative y squared. So the partial derivative of f with respect to y is equal to just negative 2y, negative 2y. And now when we plug in y equals negative 2, what we get is negative 2 multiplied coincidentally by negative 2, that didn't have to be the case that those were the same, and that whole thing equals 4.
|
Computing a tangent plane.mp3
|
Now for similar reasons, let's go ahead and compute the partial derivative with respect to y. We look down here, well the only place that y shows up in the entire expression is this negative y squared. So the partial derivative of f with respect to y is equal to just negative 2y, negative 2y. And now when we plug in y equals negative 2, what we get is negative 2 multiplied coincidentally by negative 2, that didn't have to be the case that those were the same, and that whole thing equals 4. So the partial derivative of f with respect to y evaluated at this point, 1 negative 2, is equal to 4. So if we were to plug this information back up into our formula, we would replace a with negative 2 3rds. We would say negative 2 3rds.
|
Computing a tangent plane.mp3
|
And now when we plug in y equals negative 2, what we get is negative 2 multiplied coincidentally by negative 2, that didn't have to be the case that those were the same, and that whole thing equals 4. So the partial derivative of f with respect to y evaluated at this point, 1 negative 2, is equal to 4. So if we were to plug this information back up into our formula, we would replace a with negative 2 3rds. We would say negative 2 3rds. And we would replace b with 4. We would replace b with 4. And that would give us the full formula, the full formula for the tangent plane.
|
Computing a tangent plane.mp3
|
We would say negative 2 3rds. And we would replace b with 4. We would replace b with 4. And that would give us the full formula, the full formula for the tangent plane. And this could be kind of a lot to look at at first, because we have to specify the input point, you know, 1 negative 2, and then we had to figure out where the function evaluates at that point. And then we had to figure out both of the partial derivatives with respect to x and with respect to y. But all in all, there's not actually a lot to remember for how you go about computing this.
|
Computing a tangent plane.mp3
|
And that would give us the full formula, the full formula for the tangent plane. And this could be kind of a lot to look at at first, because we have to specify the input point, you know, 1 negative 2, and then we had to figure out where the function evaluates at that point. And then we had to figure out both of the partial derivatives with respect to x and with respect to y. But all in all, there's not actually a lot to remember for how you go about computing this. Looking at the graph actually makes things seem a lot more reasonable, because each of those terms has an actual meaning. If we look at the 1 and negative 2, that's just telling us the input, the kind of x and y coordinates of the input. And of course we have to evaluate that, because that tells us the z coordinate that'll put us on the graph corresponding to that point.
|
Computing a tangent plane.mp3
|
But all in all, there's not actually a lot to remember for how you go about computing this. Looking at the graph actually makes things seem a lot more reasonable, because each of those terms has an actual meaning. If we look at the 1 and negative 2, that's just telling us the input, the kind of x and y coordinates of the input. And of course we have to evaluate that, because that tells us the z coordinate that'll put us on the graph corresponding to that point. And then to get us a tangent plane, you just need to specify the two bits of partial differential information, and that'll tell you kind of how this graph needs to be oriented. And once you start thinking of things in that way, you know, geometrically, even though there's a lot going on here, there's five different numbers you have to put in, each one of them feels like, yeah, yeah, of course you need that number, otherwise you couldn't specify a tangent plane. There's kind of a lot of information required to put it on the appropriate spot.
|
Computing a tangent plane.mp3
|
It's a very nonlinear function, and we were picturing it as a transformation that takes every point x, y in space to the point x plus sine y, y plus sine of x. And moreover, we zoomed in on a specific point. And let me actually write down what point we zoomed in on. It was negative 2, 1. That's something we're going to want to record here. Negative 2, 1. And I added a couple extra grid lines around it just so we can see in detail what the transformation does to points that are in a neighborhood of that point.
|
The Jacobian matrix.mp3
|
It was negative 2, 1. That's something we're going to want to record here. Negative 2, 1. And I added a couple extra grid lines around it just so we can see in detail what the transformation does to points that are in a neighborhood of that point. And over here, this square shows the zoomed-in version of that neighborhood. And what we saw was that even though the function as a whole, as a transformation, looks rather complicated, around that one point, it looks like a linear function. It's locally linear.
|
The Jacobian matrix.mp3
|
And I added a couple extra grid lines around it just so we can see in detail what the transformation does to points that are in a neighborhood of that point. And over here, this square shows the zoomed-in version of that neighborhood. And what we saw was that even though the function as a whole, as a transformation, looks rather complicated, around that one point, it looks like a linear function. It's locally linear. So what I'll show you here is what matrix is going to tell you the linear function that this looks like. And this is going to be some kind of 2x2 matrix. I'll make a lot of room for ourselves here.
|
The Jacobian matrix.mp3
|
It's locally linear. So what I'll show you here is what matrix is going to tell you the linear function that this looks like. And this is going to be some kind of 2x2 matrix. I'll make a lot of room for ourselves here. It'll be a 2x2 matrix. And the way to think about it is to first go back to our original setup before the transformation and think of just a tiny step to the right, what I'm going to think of as a little partial x, a tiny step in the x direction. And what that turns into after the transformation is going to be some tiny step in the output space.
|
The Jacobian matrix.mp3
|
I'll make a lot of room for ourselves here. It'll be a 2x2 matrix. And the way to think about it is to first go back to our original setup before the transformation and think of just a tiny step to the right, what I'm going to think of as a little partial x, a tiny step in the x direction. And what that turns into after the transformation is going to be some tiny step in the output space. And here, let me actually kind of draw on what that tiny step turned into. It's no longer purely in the x direction. It has some rightward component, but now also some downward component.
|
The Jacobian matrix.mp3
|
And what that turns into after the transformation is going to be some tiny step in the output space. And here, let me actually kind of draw on what that tiny step turned into. It's no longer purely in the x direction. It has some rightward component, but now also some downward component. And to be able to represent this in a nice way, what I'm going to do is instead of writing the entire function as something with a vector-valued output, I'm going to go ahead and represent this as two separate scalar-valued functions. I'm going to write the scalar-valued functions f1 of x, y. So I'm just giving a name to x plus sine y.
|
The Jacobian matrix.mp3
|
It has some rightward component, but now also some downward component. And to be able to represent this in a nice way, what I'm going to do is instead of writing the entire function as something with a vector-valued output, I'm going to go ahead and represent this as two separate scalar-valued functions. I'm going to write the scalar-valued functions f1 of x, y. So I'm just giving a name to x plus sine y. And f2 of x, y. Again, all I'm doing is giving a name to the functions we already have written down. When I look at this vector, the consequence of taking a tiny dx step in the input space that corresponds to some 2D movement in the output space and the x component of that movement, right, if I was going to draw this out and say, hey, what's the x component of that movement?
|
The Jacobian matrix.mp3
|
So I'm just giving a name to x plus sine y. And f2 of x, y. Again, all I'm doing is giving a name to the functions we already have written down. When I look at this vector, the consequence of taking a tiny dx step in the input space that corresponds to some 2D movement in the output space and the x component of that movement, right, if I was going to draw this out and say, hey, what's the x component of that movement? That's something we think of as a little partial change in f1. That's the x component of our output. And if we divide this, if we take, you know, partial f1 divided by the size of that initial tiny change, it basically scales it up to be a normal-sized vector, not a tiny nudge, but something that's more constant, that doesn't shrink as we zoom in further and further.
|
The Jacobian matrix.mp3
|
When I look at this vector, the consequence of taking a tiny dx step in the input space that corresponds to some 2D movement in the output space and the x component of that movement, right, if I was going to draw this out and say, hey, what's the x component of that movement? That's something we think of as a little partial change in f1. That's the x component of our output. And if we divide this, if we take, you know, partial f1 divided by the size of that initial tiny change, it basically scales it up to be a normal-sized vector, not a tiny nudge, but something that's more constant, that doesn't shrink as we zoom in further and further. And then similarly, the change in the y direction, right, the vertical component of that step that was still caused by the dx, right, it's still caused by that initial step to the right, that is going to be the tiny partial change in f2. The y component of the output, because here we're all just looking in the output space, that was caused by a partial change in the x direction. And again, I kind of like to think about this, we're dividing by a tiny amount.
|
The Jacobian matrix.mp3
|
And if we divide this, if we take, you know, partial f1 divided by the size of that initial tiny change, it basically scales it up to be a normal-sized vector, not a tiny nudge, but something that's more constant, that doesn't shrink as we zoom in further and further. And then similarly, the change in the y direction, right, the vertical component of that step that was still caused by the dx, right, it's still caused by that initial step to the right, that is going to be the tiny partial change in f2. The y component of the output, because here we're all just looking in the output space, that was caused by a partial change in the x direction. And again, I kind of like to think about this, we're dividing by a tiny amount. This partial f2 is really a tiny, tiny nudge, but by dividing by the size of the initial tiny nudge that caused it, we're getting something that's basically a number, something that doesn't shrink when we consider more and more zoomed-in versions. So that, that's all what happens when we take a tiny step in the x direction. But another thing you could do, another thing you can consider, is a tiny step in the y direction, right?
|
The Jacobian matrix.mp3
|
And again, I kind of like to think about this, we're dividing by a tiny amount. This partial f2 is really a tiny, tiny nudge, but by dividing by the size of the initial tiny nudge that caused it, we're getting something that's basically a number, something that doesn't shrink when we consider more and more zoomed-in versions. So that, that's all what happens when we take a tiny step in the x direction. But another thing you could do, another thing you can consider, is a tiny step in the y direction, right? Because we want to know, hey, if you take a single step some tiny unit upward, what does that turn into after the transformation? And what that looks like, what that looks like is this vector that still has some upward component, but it also has a rightward component. And now I'm going to write its components as the second column of the matrix, because as we know, when you're representing a linear transformation with a matrix, the first column tells you where the first basis vector goes, and the second column shows where the second basis vector goes.
|
The Jacobian matrix.mp3
|
But another thing you could do, another thing you can consider, is a tiny step in the y direction, right? Because we want to know, hey, if you take a single step some tiny unit upward, what does that turn into after the transformation? And what that looks like, what that looks like is this vector that still has some upward component, but it also has a rightward component. And now I'm going to write its components as the second column of the matrix, because as we know, when you're representing a linear transformation with a matrix, the first column tells you where the first basis vector goes, and the second column shows where the second basis vector goes. If that feels unfamiliar, either check out the refresher video, or maybe go and look at some of the linear algebra content. But to figure out the coordinates of this guy, we do basically the same thing. We say, first of all, the change in the x direction here, the x component of this nudge vector, that's going to be given as a partial change to f1, right, to the x component of the output.
|
The Jacobian matrix.mp3
|
And now I'm going to write its components as the second column of the matrix, because as we know, when you're representing a linear transformation with a matrix, the first column tells you where the first basis vector goes, and the second column shows where the second basis vector goes. If that feels unfamiliar, either check out the refresher video, or maybe go and look at some of the linear algebra content. But to figure out the coordinates of this guy, we do basically the same thing. We say, first of all, the change in the x direction here, the x component of this nudge vector, that's going to be given as a partial change to f1, right, to the x component of the output. Here we're looking in the output space, so we're dealing with f1 and f2. And we're asking what that change was that was caused by a tiny change in the y direction. So the change in f1 caused by some tiny step in the y direction divided by the size of that tiny step.
|
The Jacobian matrix.mp3
|
We say, first of all, the change in the x direction here, the x component of this nudge vector, that's going to be given as a partial change to f1, right, to the x component of the output. Here we're looking in the output space, so we're dealing with f1 and f2. And we're asking what that change was that was caused by a tiny change in the y direction. So the change in f1 caused by some tiny step in the y direction divided by the size of that tiny step. And then the y component of our output here, the y component of the step in the output space that was caused by the initial tiny step upward in the input space, well, that is the change of f2, the second component of our output, as caused by dy, as caused by that little partial y. And of course, all of this is very specific to the point that we started at, right? We started at the point (-2,1).
|
The Jacobian matrix.mp3
|
So the change in f1 caused by some tiny step in the y direction divided by the size of that tiny step. And then the y component of our output here, the y component of the step in the output space that was caused by the initial tiny step upward in the input space, well, that is the change of f2, the second component of our output, as caused by dy, as caused by that little partial y. And of course, all of this is very specific to the point that we started at, right? We started at the point (-2,1). So each of these partial derivatives is something that really we're saying, don't take the function, evaluate it at the point (-2,1). And when you evaluate each one of these at the point (-2,1), you'll get some number. And that will give you a very concrete 2x2 matrix that's going to represent the linear transformation that this guy looks like once you've zoomed in.
|
The Jacobian matrix.mp3
|
We started at the point (-2,1). So each of these partial derivatives is something that really we're saying, don't take the function, evaluate it at the point (-2,1). And when you evaluate each one of these at the point (-2,1), you'll get some number. And that will give you a very concrete 2x2 matrix that's going to represent the linear transformation that this guy looks like once you've zoomed in. So this matrix here that's full of all of the different partial derivatives has a very special name. It's called, as you may have guessed, the Jacobian. Or more fully, you'd call it the Jacobian matrix.
|
The Jacobian matrix.mp3
|
And that will give you a very concrete 2x2 matrix that's going to represent the linear transformation that this guy looks like once you've zoomed in. So this matrix here that's full of all of the different partial derivatives has a very special name. It's called, as you may have guessed, the Jacobian. Or more fully, you'd call it the Jacobian matrix. And one way to think about it is that it carries all of the partial differential information, right? It's taking into account both of these components of the output and both possible inputs, and giving you kind of a grid of what all the partial derivatives are. But as I hope you see, it's much more than just a way of recording what all the partial derivatives are.
|
The Jacobian matrix.mp3
|
Or more fully, you'd call it the Jacobian matrix. And one way to think about it is that it carries all of the partial differential information, right? It's taking into account both of these components of the output and both possible inputs, and giving you kind of a grid of what all the partial derivatives are. But as I hope you see, it's much more than just a way of recording what all the partial derivatives are. There's a reason for organizing it like this in particular. And it really does come down to this idea of local linearity. If you understand that the Jacobian matrix is fundamentally supposed to represent what a transformation looks like when you zoom in near a specific point, almost everything else about it will start to fall in place.
|
The Jacobian matrix.mp3
|
Hello everyone. So I'm talking about how to find the tangent plane to a graph, and I think the first step of that is to just figure out how we control planes in three dimensions in the first place. So what I have pictured here is a red dot representing a point in three dimensions, and the coordinates of that point, easily enough, are one, two, three. So the x coordinate is one, the y coordinate's two, and the z coordinate is three. And then I have a plane that passes through it, and the goal of the video is going to be to find a function, a function that I'll call L, that takes in a two-dimensional input, whoop, x and y, and this function L should have this plane as its graph. Now the first thing to notice is that there's lots of different planes that could be passing through this point, right? At the moment it's one that's got a certain kind of angle, you could think of it going up in one direction, but you could give this a lot of different directions and get a lot of different planes that all pass through that one point.
|
Controlling a plane in space.mp3
|
So the x coordinate is one, the y coordinate's two, and the z coordinate is three. And then I have a plane that passes through it, and the goal of the video is going to be to find a function, a function that I'll call L, that takes in a two-dimensional input, whoop, x and y, and this function L should have this plane as its graph. Now the first thing to notice is that there's lots of different planes that could be passing through this point, right? At the moment it's one that's got a certain kind of angle, you could think of it going up in one direction, but you could give this a lot of different directions and get a lot of different planes that all pass through that one point. So we're going to need to find some way of distinguishing the specific one that we're looking at, which is this one right here, from other possible planes that can pass through it. And as we work through, you'll see how this is done in terms of partial derivatives. But as we are getting our head around what the formula for this graph can be, let's just start observing properties that it has.
|
Controlling a plane in space.mp3
|
At the moment it's one that's got a certain kind of angle, you could think of it going up in one direction, but you could give this a lot of different directions and get a lot of different planes that all pass through that one point. So we're going to need to find some way of distinguishing the specific one that we're looking at, which is this one right here, from other possible planes that can pass through it. And as we work through, you'll see how this is done in terms of partial derivatives. But as we are getting our head around what the formula for this graph can be, let's just start observing properties that it has. The first property is that the graph actually passes through this point, one, two, three. And what that means, in terms of functions over here, is that if you evaluate it at the point one, two, the input pair where x is one and y is two, then it should equal three. It should equal three, because that's telling you that when you go to x equals one and y equals two, and then you say, what's the height of the graph above that point, it should be the z-coordinate of the desired point.
|
Controlling a plane in space.mp3
|
But as we are getting our head around what the formula for this graph can be, let's just start observing properties that it has. The first property is that the graph actually passes through this point, one, two, three. And what that means, in terms of functions over here, is that if you evaluate it at the point one, two, the input pair where x is one and y is two, then it should equal three. It should equal three, because that's telling you that when you go to x equals one and y equals two, and then you say, what's the height of the graph above that point, it should be the z-coordinate of the desired point. So this right here is kind of fact number one that we can take into consideration. And beyond that, let's start thinking about what makes planes, what makes these kind of flat graphs different from the sort of curvy graphs that you might be used to in other multivariable functions. The main idea is that if you intersect it with another plane, so here I'm gonna intersect it with y equals two, this kind of constant plane.
|
Controlling a plane in space.mp3
|
It should equal three, because that's telling you that when you go to x equals one and y equals two, and then you say, what's the height of the graph above that point, it should be the z-coordinate of the desired point. So this right here is kind of fact number one that we can take into consideration. And beyond that, let's start thinking about what makes planes, what makes these kind of flat graphs different from the sort of curvy graphs that you might be used to in other multivariable functions. The main idea is that if you intersect it with another plane, so here I'm gonna intersect it with y equals two, this kind of constant plane. So I'll go ahead and write that down. That plane that you're looking at is y equals two. And you can think of this as representing, you know, what does movement in the x direction look like?
|
Controlling a plane in space.mp3
|
The main idea is that if you intersect it with another plane, so here I'm gonna intersect it with y equals two, this kind of constant plane. So I'll go ahead and write that down. That plane that you're looking at is y equals two. And you can think of this as representing, you know, what does movement in the x direction look like? As we move along the x direction, this kind of has a slope. The two planes intersect along a line. And that's one of the crucial features of a plane, is that if you intersect it with another plane, you just get a straight line, meaning the slope is constant as you move in the x direction.
|
Controlling a plane in space.mp3
|
And you can think of this as representing, you know, what does movement in the x direction look like? As we move along the x direction, this kind of has a slope. The two planes intersect along a line. And that's one of the crucial features of a plane, is that if you intersect it with another plane, you just get a straight line, meaning the slope is constant as you move in the x direction. But it's also constant, that same slope, if you move in the y direction. If I had chosen a different plane, you know, if instead I had chosen y equals one, which looks like this, then you get a line with the same slope. And no matter what constant value of y you choose, it's always intersecting that plane with a line that has the same slope.
|
Controlling a plane in space.mp3
|
And that's one of the crucial features of a plane, is that if you intersect it with another plane, you just get a straight line, meaning the slope is constant as you move in the x direction. But it's also constant, that same slope, if you move in the y direction. If I had chosen a different plane, you know, if instead I had chosen y equals one, which looks like this, then you get a line with the same slope. And no matter what constant value of y you choose, it's always intersecting that plane with a line that has the same slope. And now if you look back to the videos on partial derivatives, and in particular on how you interpret the partial derivative of a function with respect to its graph, what this is telling you is that when we take the partial derivative of L with respect to x, because constant y means you're moving in the x direction, this should just be some kind of constant, some kind of constant a. I'll kind of emphasize that as a constant value here. And the same goes in the other direction, right? Let's say instead of intersecting it with constant values of y, you say, well, what if you intersected it with a constant value of x, like x equals one?
|
Controlling a plane in space.mp3
|
And no matter what constant value of y you choose, it's always intersecting that plane with a line that has the same slope. And now if you look back to the videos on partial derivatives, and in particular on how you interpret the partial derivative of a function with respect to its graph, what this is telling you is that when we take the partial derivative of L with respect to x, because constant y means you're moving in the x direction, this should just be some kind of constant, some kind of constant a. I'll kind of emphasize that as a constant value here. And the same goes in the other direction, right? Let's say instead of intersecting it with constant values of y, you say, well, what if you intersected it with a constant value of x, like x equals one? Well, in that case, what you should get, because you're intersecting it with a plane, is another straight line. So these two planes are intersecting along a straight line, which means as you move in the y direction, this slope won't change. But also as you move in the x direction, if you imagine slicing it with a bunch of different planes, all representing different constant values of x, you would be getting a line with that same slope.
|
Controlling a plane in space.mp3
|
Let's say instead of intersecting it with constant values of y, you say, well, what if you intersected it with a constant value of x, like x equals one? Well, in that case, what you should get, because you're intersecting it with a plane, is another straight line. So these two planes are intersecting along a straight line, which means as you move in the y direction, this slope won't change. But also as you move in the x direction, if you imagine slicing it with a bunch of different planes, all representing different constant values of x, you would be getting a line with that same slope. And that's telling you another powerful fact, that the partial derivative of L with respect to y, you know, if you're moving in the y direction, that's equal to some other constant, that I'm gonna call b. And now keep in mind, these are very powerful statements, because the partial derivative of L with respect to x is a function. This is a function of x and y.
|
Controlling a plane in space.mp3
|
But also as you move in the x direction, if you imagine slicing it with a bunch of different planes, all representing different constant values of x, you would be getting a line with that same slope. And that's telling you another powerful fact, that the partial derivative of L with respect to y, you know, if you're moving in the y direction, that's equal to some other constant, that I'm gonna call b. And now keep in mind, these are very powerful statements, because the partial derivative of L with respect to x is a function. This is a function of x and y. And that might actually be worth emphasizing here, that this partial derivative of x with respect to y is something that you evaluate at, you know, a point in two-dimensional space. And we're saying that that's equal to some kind of constant value. Now that's a pretty powerful thing, right?
|
Controlling a plane in space.mp3
|
This is a function of x and y. And that might actually be worth emphasizing here, that this partial derivative of x with respect to y is something that you evaluate at, you know, a point in two-dimensional space. And we're saying that that's equal to some kind of constant value. Now that's a pretty powerful thing, right? Because it's telling you, it's giving you control over the function at all possible input points, you know, for movement in a specified direction. And the same goes over here. This is telling you that a function is constantly equal to, you know, some value b.
|
Controlling a plane in space.mp3
|
Now that's a pretty powerful thing, right? Because it's telling you, it's giving you control over the function at all possible input points, you know, for movement in a specified direction. And the same goes over here. This is telling you that a function is constantly equal to, you know, some value b. And we're not sure what this value b is. But just geometrically, we can kind of estimate what these things should be. So if I take back the plane representing a constant y value, and we say, what's this slope?
|
Controlling a plane in space.mp3
|
This is telling you that a function is constantly equal to, you know, some value b. And we're not sure what this value b is. But just geometrically, we can kind of estimate what these things should be. So if I take back the plane representing a constant y value, and we say, what's this slope? You know, you're moving in the x direction, we've got a constant y value. What is the slope at which this plane intersects our graph? I would estimate this as about a slope of two.
|
Controlling a plane in space.mp3
|
So if I take back the plane representing a constant y value, and we say, what's this slope? You know, you're moving in the x direction, we've got a constant y value. What is the slope at which this plane intersects our graph? I would estimate this as about a slope of two. You know, you kind of go over one, and it goes up two. So what that would tell you is that, at least in the specific graph that we're looking at, this is at least approximately equal to two. And then similarly, if we look at a constant x value, and we say that represents movement in the y direction, what is the slope there?
|
Controlling a plane in space.mp3
|
I would estimate this as about a slope of two. You know, you kind of go over one, and it goes up two. So what that would tell you is that, at least in the specific graph that we're looking at, this is at least approximately equal to two. And then similarly, if we look at a constant x value, and we say that represents movement in the y direction, what is the slope there? This looks to me like about one as a slope. You kind of move over one unit, you go up one unit. So I'd say down here that the constant value of the partial derivative with respect to y is about equal to one.
|
Controlling a plane in space.mp3
|
And then similarly, if we look at a constant x value, and we say that represents movement in the y direction, what is the slope there? This looks to me like about one as a slope. You kind of move over one unit, you go up one unit. So I'd say down here that the constant value of the partial derivative with respect to y is about equal to one. So we have three different facts here. The value of the function at the point one, two. The value of its partial derivative with respect to x everywhere.
|
Controlling a plane in space.mp3
|
So I'd say down here that the constant value of the partial derivative with respect to y is about equal to one. So we have three different facts here. The value of the function at the point one, two. The value of its partial derivative with respect to x everywhere. And the partial derivative with respect to y everywhere. And this information is actually going to be enough to tell us what the function as a whole should equal. Now specifically, this idea that the partial derivative with respect to x is constant tells us that the function, function L of x, y, is going to equal two times x plus something that doesn't have any x's in it.
|
Controlling a plane in space.mp3
|
The value of its partial derivative with respect to x everywhere. And the partial derivative with respect to y everywhere. And this information is actually going to be enough to tell us what the function as a whole should equal. Now specifically, this idea that the partial derivative with respect to x is constant tells us that the function, function L of x, y, is going to equal two times x plus something that doesn't have any x's in it. Something that as far as x is concerned is a constant. Because the only thing who's derivative with respect to x is the constant two, is two x, plus something that's constant as far as x is concerned. And then similarly over here, if the partial with respect to y is the constant one, then that tells you that the whole function looks like, you know, this looks like a constant as far as y is concerned.
|
Controlling a plane in space.mp3
|
Now specifically, this idea that the partial derivative with respect to x is constant tells us that the function, function L of x, y, is going to equal two times x plus something that doesn't have any x's in it. Something that as far as x is concerned is a constant. Because the only thing who's derivative with respect to x is the constant two, is two x, plus something that's constant as far as x is concerned. And then similarly over here, if the partial with respect to y is the constant one, then that tells you that the whole function looks like, you know, this looks like a constant as far as y is concerned. So once we bring in y, it's going to be one times y plus something that's constant as far as y is concerned. You know, this part is already constant as far as y is concerned, so anything that I add beyond here has to be constant as far as both x and y is concerned. So that part has to actually literally be a constant.
|
Controlling a plane in space.mp3
|
And then similarly over here, if the partial with respect to y is the constant one, then that tells you that the whole function looks like, you know, this looks like a constant as far as y is concerned. So once we bring in y, it's going to be one times y plus something that's constant as far as y is concerned. You know, this part is already constant as far as y is concerned, so anything that I add beyond here has to be constant as far as both x and y is concerned. So that part has to actually literally be a constant. So I'm just going to put in, I'm just going to put in c for that to represent constant. So this is, you can see, this is a very restrictive property on our function because the only place x can show up is as this linear term, and the only place y can show up is as this linear term. And when I use the word linear, you can pretty much interpret it as saying the term x shows up without an exponent or without anything fancy happening to it.
|
Controlling a plane in space.mp3
|
So that part has to actually literally be a constant. So I'm just going to put in, I'm just going to put in c for that to represent constant. So this is, you can see, this is a very restrictive property on our function because the only place x can show up is as this linear term, and the only place y can show up is as this linear term. And when I use the word linear, you can pretty much interpret it as saying the term x shows up without an exponent or without anything fancy happening to it. It's just x times a constant. That's pretty much what I mean by linear. It's got more precise formulations in other contexts, but as far as we're concerned here, you can just think of it as meaning variable times a constant.
|
Controlling a plane in space.mp3
|
And when I use the word linear, you can pretty much interpret it as saying the term x shows up without an exponent or without anything fancy happening to it. It's just x times a constant. That's pretty much what I mean by linear. It's got more precise formulations in other contexts, but as far as we're concerned here, you can just think of it as meaning variable times a constant. So the question is, what should this c be? And you can imagine that we can, based on this property, based on the value at the point 1,2, we can uniquely determine c. And you can plug in x equals 1, y equals 2, know that this has to equal 3, and solve for c, which we could do, but I'm going to actually do something a little bit more convenient. I'm going to kind of shift around where the constants show up, and I'm going to say that the whole function should equal two times, and then I'm going to put a constant in with x. I'm going to say x minus 1.
|
Controlling a plane in space.mp3
|
It's got more precise formulations in other contexts, but as far as we're concerned here, you can just think of it as meaning variable times a constant. So the question is, what should this c be? And you can imagine that we can, based on this property, based on the value at the point 1,2, we can uniquely determine c. And you can plug in x equals 1, y equals 2, know that this has to equal 3, and solve for c, which we could do, but I'm going to actually do something a little bit more convenient. I'm going to kind of shift around where the constants show up, and I'm going to say that the whole function should equal two times, and then I'm going to put a constant in with x. I'm going to say x minus 1. And then I'm going to do the same thing with y. I'm going to say plus 1, here's the partial derivative with respect to y, y minus, and then I'm going to say 2. And the reason I'm doing this, notice this doesn't change the partial derivative information, it's just, if we take the partial derivative with respect to x, this will still be 2, and when we take it with respect to y, this will still be 1. But the reason I'm putting these in here is because we're going to evaluate it at the point 1,2, so I want to make it look as easy as possible to evaluate at the point 1,2.
|
Controlling a plane in space.mp3
|
I'm going to kind of shift around where the constants show up, and I'm going to say that the whole function should equal two times, and then I'm going to put a constant in with x. I'm going to say x minus 1. And then I'm going to do the same thing with y. I'm going to say plus 1, here's the partial derivative with respect to y, y minus, and then I'm going to say 2. And the reason I'm doing this, notice this doesn't change the partial derivative information, it's just, if we take the partial derivative with respect to x, this will still be 2, and when we take it with respect to y, this will still be 1. But the reason I'm putting these in here is because we're going to evaluate it at the point 1,2, so I want to make it look as easy as possible to evaluate at the point 1,2. And then from here, I'm just going to add another constant. So instead of saying c, because this is going to be slightly different from c, I'll call it k. But the idea is I'm just moving around constants. If you imagined distributing the multiplication here and having, you know, 2 times that negative 1, and 1 times that negative 2, you're just changing what the value of the constant stuck on the end here is.
|
Controlling a plane in space.mp3
|
But the reason I'm putting these in here is because we're going to evaluate it at the point 1,2, so I want to make it look as easy as possible to evaluate at the point 1,2. And then from here, I'm just going to add another constant. So instead of saying c, because this is going to be slightly different from c, I'll call it k. But the idea is I'm just moving around constants. If you imagined distributing the multiplication here and having, you know, 2 times that negative 1, and 1 times that negative 2, you're just changing what the value of the constant stuck on the end here is. Now the important part, the reason that I'm writing it this way, which is only slightly different, is because then when I evaluate this at L of 1,2, this whole first part cancels out because plugging in x equals 1 means this whole part goes to 0. Same with the second part, because when I plug in y equals 2, this part goes to 0. So k, this other constant that I'm tagging on the end, is going to completely specify what happens when I evaluate this at the point 1,2.
|
Controlling a plane in space.mp3
|
If you imagined distributing the multiplication here and having, you know, 2 times that negative 1, and 1 times that negative 2, you're just changing what the value of the constant stuck on the end here is. Now the important part, the reason that I'm writing it this way, which is only slightly different, is because then when I evaluate this at L of 1,2, this whole first part cancels out because plugging in x equals 1 means this whole part goes to 0. Same with the second part, because when I plug in y equals 2, this part goes to 0. So k, this other constant that I'm tagging on the end, is going to completely specify what happens when I evaluate this at the point 1,2. And of course, I want it to be the case that when I evaluate it at 1,2, I get 3. I want it to be the case when I evaluate it at 1,2, I get 3. So that tells me that this constant k here should just equal 3.
|
Controlling a plane in space.mp3
|
So k, this other constant that I'm tagging on the end, is going to completely specify what happens when I evaluate this at the point 1,2. And of course, I want it to be the case that when I evaluate it at 1,2, I get 3. I want it to be the case when I evaluate it at 1,2, I get 3. So that tells me that this constant k here should just equal 3. So notice, the way that I've written the function here is actually quite powerful. We have a lot of control. This term 2 was telling us the slope with respect to x.
|
Controlling a plane in space.mp3
|
So that tells me that this constant k here should just equal 3. So notice, the way that I've written the function here is actually quite powerful. We have a lot of control. This term 2 was telling us the slope with respect to x. So when you move purely in the x direction, and that was kind of illustrated here, purely in the x direction, that's telling us the slope with respect to x. And then this term 1 here was telling us the slope with respect to y. So when we moved purely in the y direction, that's telling us the slope there.
|
Controlling a plane in space.mp3
|
This term 2 was telling us the slope with respect to x. So when you move purely in the x direction, and that was kind of illustrated here, purely in the x direction, that's telling us the slope with respect to x. And then this term 1 here was telling us the slope with respect to y. So when we moved purely in the y direction, that's telling us the slope there. And we could just turn those knobs. If we change the 2 and we change the 1, that's what's going to allow us to basically change what the slopes of the plane are. I'm going to say slopes plural because it's with respect to the x and the y direction.
|
Controlling a plane in space.mp3
|
So when we moved purely in the y direction, that's telling us the slope there. And we could just turn those knobs. If we change the 2 and we change the 1, that's what's going to allow us to basically change what the slopes of the plane are. I'm going to say slopes plural because it's with respect to the x and the y direction. And that'll give us control over various different planes to pass through. You know, if I'm looking at the 1, oh, geez, I don't know, let's say the 1 right here, then the movement in the y direction is very shallow. So that would be turning this knob lower.
|
Controlling a plane in space.mp3
|
I'm going to say slopes plural because it's with respect to the x and the y direction. And that'll give us control over various different planes to pass through. You know, if I'm looking at the 1, oh, geez, I don't know, let's say the 1 right here, then the movement in the y direction is very shallow. So that would be turning this knob lower. And instead of 1, it might be.01. And if I were looking at movement in the x direction, you know, this looks actually negative. So this would tell you that it's going to be some kind of negative number.
|
Controlling a plane in space.mp3
|
So that would be turning this knob lower. And instead of 1, it might be.01. And if I were looking at movement in the x direction, you know, this looks actually negative. So this would tell you that it's going to be some kind of negative number. So you can kind of dial these knobs and that changes the different planes that pass through that same point. And then plugging in this 1, 2, and 3 tells us what point we're specifying. We're basically saying when you input x equals 1 and you input y equals 2, the whole thing should equal 3.
|
Controlling a plane in space.mp3
|
So this would tell you that it's going to be some kind of negative number. So you can kind of dial these knobs and that changes the different planes that pass through that same point. And then plugging in this 1, 2, and 3 tells us what point we're specifying. We're basically saying when you input x equals 1 and you input y equals 2, the whole thing should equal 3. So this form right here is powerful enough that I want you to remember it for the next video. I want you to remember the idea of writing things down in this way where you specify the point it's passing through with its x coordinate, y coordinate, and z coordinate placed where they are, and then you tweak the slopes using these coefficients out front. So with that, I will see you next video.
|
Controlling a plane in space.mp3
|
But I think you're really gonna like where this is going in the end. So one of the examples I showed, and I think this is a pretty nice prototypical example for constrained optimization problems, is that you're running a company and you have some kind of revenue function that's dependent on various choices you make in running the company. And I think I said the number of hours of labor you employ and the number of tons of steel you use, you know, if you were manufacturing something metallic. And you know, this might be modeled as some multivariable function of H and S. Right now we don't really care about the specifics. And you're trying to maximize this, right? That's kind of the whole point of this unit that we've been doing, is that you're trying to maximize some function, but you have a constraint. This is the real world.
|
Meaning of Lagrange multiplier.mp3
|
And you know, this might be modeled as some multivariable function of H and S. Right now we don't really care about the specifics. And you're trying to maximize this, right? That's kind of the whole point of this unit that we've been doing, is that you're trying to maximize some function, but you have a constraint. This is the real world. You can't just spend infinite money, you have some kind of budget. Some sort of amount of money you spend as a function of those same choices you make. The hours of labor you employ, the tons of steel you use.
|
Meaning of Lagrange multiplier.mp3
|
This is the real world. You can't just spend infinite money, you have some kind of budget. Some sort of amount of money you spend as a function of those same choices you make. The hours of labor you employ, the tons of steel you use. And this again, it's gonna equal some multivariable function that tells you, you know, how much money you spend for a given amount of hours and given number of tons of steel. And you set this equal to some constant. This tells you the amount of money you're willing to spend.
|
Meaning of Lagrange multiplier.mp3
|
The hours of labor you employ, the tons of steel you use. And this again, it's gonna equal some multivariable function that tells you, you know, how much money you spend for a given amount of hours and given number of tons of steel. And you set this equal to some constant. This tells you the amount of money you're willing to spend. And our goal has been to maximize some function subject to a constraint like this. And the mental model you have in mind is that you're looking in the input space inside the XY plane, or I guess really it's the HS plane in this case, right? Your inputs are H and S and points in this plane tell you possible choices you can make for hours of labor and tons of steel.
|
Meaning of Lagrange multiplier.mp3
|
This tells you the amount of money you're willing to spend. And our goal has been to maximize some function subject to a constraint like this. And the mental model you have in mind is that you're looking in the input space inside the XY plane, or I guess really it's the HS plane in this case, right? Your inputs are H and S and points in this plane tell you possible choices you can make for hours of labor and tons of steel. And you think of this budget as some kind of curve in that plane, right? All the sets of H and S that equal $10,000 is gonna give you some kind of curve. And the core value we care about is that when you maximize this revenue, you know, when you set it equal to a constant, I'm gonna call M star.
|
Meaning of Lagrange multiplier.mp3
|
Your inputs are H and S and points in this plane tell you possible choices you can make for hours of labor and tons of steel. And you think of this budget as some kind of curve in that plane, right? All the sets of H and S that equal $10,000 is gonna give you some kind of curve. And the core value we care about is that when you maximize this revenue, you know, when you set it equal to a constant, I'm gonna call M star. This is like the maximum possible revenue. That's gonna give you a contour that's just barely tangent to the constraint curve. And if that seems unfamiliar, definitely take a look at the videos preceding this one.
|
Meaning of Lagrange multiplier.mp3
|
And the core value we care about is that when you maximize this revenue, you know, when you set it equal to a constant, I'm gonna call M star. This is like the maximum possible revenue. That's gonna give you a contour that's just barely tangent to the constraint curve. And if that seems unfamiliar, definitely take a look at the videos preceding this one. But just to kind of continue the review, this gave us the really nice property that you look at the gradient vector for the thing you're trying to maximize, R, and that's gonna be proportional to the gradient vector for the constraint function, for this B, so gradient of B. And this is because gradients are perpendicular to contour lines. Again, this should feel mostly like review at this point.
|
Meaning of Lagrange multiplier.mp3
|
And if that seems unfamiliar, definitely take a look at the videos preceding this one. But just to kind of continue the review, this gave us the really nice property that you look at the gradient vector for the thing you're trying to maximize, R, and that's gonna be proportional to the gradient vector for the constraint function, for this B, so gradient of B. And this is because gradients are perpendicular to contour lines. Again, this should feel mostly like review at this point. So the core idea was that we take this gradient of R and then make it proportional with some kind of proportionality constant, lambda, to the gradient of B, to the gradient of the constraint function. And up till this point, this value lambda has been wholly uninteresting. It's just been a proportionality constant, right?
|
Meaning of Lagrange multiplier.mp3
|
Again, this should feel mostly like review at this point. So the core idea was that we take this gradient of R and then make it proportional with some kind of proportionality constant, lambda, to the gradient of B, to the gradient of the constraint function. And up till this point, this value lambda has been wholly uninteresting. It's just been a proportionality constant, right? Because we couldn't guarantee that the gradient of R is equal to the gradient of B. All we care about is that they're pointing in the same direction. So we just had this constant sitting here, and all we really said is make sure it's not zero.
|
Meaning of Lagrange multiplier.mp3
|
It's just been a proportionality constant, right? Because we couldn't guarantee that the gradient of R is equal to the gradient of B. All we care about is that they're pointing in the same direction. So we just had this constant sitting here, and all we really said is make sure it's not zero. But here, we're gonna get to where this little guy actually matters. So if you'll remember, in the last video, I introduced this function called the Lagrangian, the Lagrangian, and it takes in multiple inputs. They'll be the same inputs that you have for your budget function and your revenue function, or more generally, the constraint and the thing you're trying to maximize.
|
Meaning of Lagrange multiplier.mp3
|
So we just had this constant sitting here, and all we really said is make sure it's not zero. But here, we're gonna get to where this little guy actually matters. So if you'll remember, in the last video, I introduced this function called the Lagrangian, the Lagrangian, and it takes in multiple inputs. They'll be the same inputs that you have for your budget function and your revenue function, or more generally, the constraint and the thing you're trying to maximize. It takes in those same variables, but also, as another one of its inputs, it takes in lambda. So it is a higher-dimensional function than both of these two, because we've got this extra lambda. And the way it's defined looks a little strange at first.
|
Meaning of Lagrange multiplier.mp3
|
They'll be the same inputs that you have for your budget function and your revenue function, or more generally, the constraint and the thing you're trying to maximize. It takes in those same variables, but also, as another one of its inputs, it takes in lambda. So it is a higher-dimensional function than both of these two, because we've got this extra lambda. And the way it's defined looks a little strange at first. It just seems kind of like this random hodgepodge of functions that we're putting together. But last time, I kind of walked through why this makes sense. You take the thing you're trying to maximize, and you subtract off this lambda multiplied by the constraint function, which is B of those inputs, minus, and then whatever this constant is here, right?
|
Meaning of Lagrange multiplier.mp3
|
And the way it's defined looks a little strange at first. It just seems kind of like this random hodgepodge of functions that we're putting together. But last time, I kind of walked through why this makes sense. You take the thing you're trying to maximize, and you subtract off this lambda multiplied by the constraint function, which is B of those inputs, minus, and then whatever this constant is here, right? I'm gonna give it a name. I'm gonna call this constant lowercase b, so maybe we're thinking of it as $10,000, but it's whatever your actual budget is. So we think of that, and I'm just gonna emphasize here that that's a constant, right?
|
Meaning of Lagrange multiplier.mp3
|
You take the thing you're trying to maximize, and you subtract off this lambda multiplied by the constraint function, which is B of those inputs, minus, and then whatever this constant is here, right? I'm gonna give it a name. I'm gonna call this constant lowercase b, so maybe we're thinking of it as $10,000, but it's whatever your actual budget is. So we think of that, and I'm just gonna emphasize here that that's a constant, right? That this b is being treated as a constant right now. You know, we're thinking of h and s and lambda all as these variables, and this gives us some multivariable function. And if you'll remember from the last video, the reason for defining this function is it gives us a really nice, compact way to solve the constrained optimization problem.
|
Meaning of Lagrange multiplier.mp3
|
So we think of that, and I'm just gonna emphasize here that that's a constant, right? That this b is being treated as a constant right now. You know, we're thinking of h and s and lambda all as these variables, and this gives us some multivariable function. And if you'll remember from the last video, the reason for defining this function is it gives us a really nice, compact way to solve the constrained optimization problem. You set the gradient of L equal to zero, or really the zero vector, right? It'll be a vector with three components here. And when you do that, you'll find some solution, right, you'll find some solution, which I'll call h star, s star, and lambda.
|
Meaning of Lagrange multiplier.mp3
|
And if you'll remember from the last video, the reason for defining this function is it gives us a really nice, compact way to solve the constrained optimization problem. You set the gradient of L equal to zero, or really the zero vector, right? It'll be a vector with three components here. And when you do that, you'll find some solution, right, you'll find some solution, which I'll call h star, s star, and lambda. And lambda, I'll give it that green lambda color, lambda star. You'll find some value that when you input this into the function, the gradient will equal zero. And of course, you might find multiple of these, right?
|
Meaning of Lagrange multiplier.mp3
|
And when you do that, you'll find some solution, right, you'll find some solution, which I'll call h star, s star, and lambda. And lambda, I'll give it that green lambda color, lambda star. You'll find some value that when you input this into the function, the gradient will equal zero. And of course, you might find multiple of these, right? You might find multiple solutions to this problem, but what you do is for each one of them, you're gonna take a look at h star and s star, then you're gonna plug those into the revenue function, or the thing that you're trying to maximize, and typically you only get a handful. You get a number that you could actually plug each one of them into the revenue function, and you'll just check which one of them makes this function the highest, and whatever the highest value this function can achieve, that is m star, that is the maximum possible revenue subject to this budget. But it's interesting that when you solve this, you get some specific value of lambda, right?
|
Meaning of Lagrange multiplier.mp3
|
And of course, you might find multiple of these, right? You might find multiple solutions to this problem, but what you do is for each one of them, you're gonna take a look at h star and s star, then you're gonna plug those into the revenue function, or the thing that you're trying to maximize, and typically you only get a handful. You get a number that you could actually plug each one of them into the revenue function, and you'll just check which one of them makes this function the highest, and whatever the highest value this function can achieve, that is m star, that is the maximum possible revenue subject to this budget. But it's interesting that when you solve this, you get some specific value of lambda, right? There is a specific lambda star that will be associated with this solution. And like I said, this turns out not to just be some dummy variable. It's gonna carry information about how much we can increase the revenue if we increase that budget.
|
Meaning of Lagrange multiplier.mp3
|
But it's interesting that when you solve this, you get some specific value of lambda, right? There is a specific lambda star that will be associated with this solution. And like I said, this turns out not to just be some dummy variable. It's gonna carry information about how much we can increase the revenue if we increase that budget. And here, let me show you what I mean. So we've got this m star, and I'll just write it again. M star here, and what that equals, I'm saying that's the maximum possible revenue.
|
Meaning of Lagrange multiplier.mp3
|
It's gonna carry information about how much we can increase the revenue if we increase that budget. And here, let me show you what I mean. So we've got this m star, and I'll just write it again. M star here, and what that equals, I'm saying that's the maximum possible revenue. So that's gonna be the revenue when you evaluate it at h star, h star, and s star. And h star and s star, they are whatever the solution to this gradient of the Lagrangian equals zero equation is. You set this multivariable function equal to the zero vector.
|
Meaning of Lagrange multiplier.mp3
|
M star here, and what that equals, I'm saying that's the maximum possible revenue. So that's gonna be the revenue when you evaluate it at h star, h star, and s star. And h star and s star, they are whatever the solution to this gradient of the Lagrangian equals zero equation is. You set this multivariable function equal to the zero vector. You solve when each of its partial derivatives equals zero, and you'll get some kind of solution. So when you plug that solution in the revenue, that gives you the maximum possible revenue. But what we could do is consider this as a function of the budget.
|
Meaning of Lagrange multiplier.mp3
|
You set this multivariable function equal to the zero vector. You solve when each of its partial derivatives equals zero, and you'll get some kind of solution. So when you plug that solution in the revenue, that gives you the maximum possible revenue. But what we could do is consider this as a function of the budget. Now, this is the kind of thing that looks a little bit wacky if you're just looking at the formulas. But if you actually think about what it means in this context of kind of a revenue and a budget, I think it's actually pretty sensible, where really, if we consider this b no longer to be constant, but something that you could change, right? You're wondering, well, what if I had a $20,000 budget?
|
Meaning of Lagrange multiplier.mp3
|
But what we could do is consider this as a function of the budget. Now, this is the kind of thing that looks a little bit wacky if you're just looking at the formulas. But if you actually think about what it means in this context of kind of a revenue and a budget, I think it's actually pretty sensible, where really, if we consider this b no longer to be constant, but something that you could change, right? You're wondering, well, what if I had a $20,000 budget? Or what if I had a $15,000 budget? You wanna ask the question, what happens as you change this b? Well, the maximizing value, h star and s star, each one of those guys is gonna depend on b, right?
|
Meaning of Lagrange multiplier.mp3
|
You're wondering, well, what if I had a $20,000 budget? Or what if I had a $15,000 budget? You wanna ask the question, what happens as you change this b? Well, the maximizing value, h star and s star, each one of those guys is gonna depend on b, right? As you change what this constant is, it's gonna change the values at which the gradient of the Lagrangian equals zero. So I'm gonna rewrite this function as the revenue evaluated at h star and s star, but now I'm gonna consider that h star and s star each as functions of b, right? Because they depend on it in some way.
|
Meaning of Lagrange multiplier.mp3
|
Well, the maximizing value, h star and s star, each one of those guys is gonna depend on b, right? As you change what this constant is, it's gonna change the values at which the gradient of the Lagrangian equals zero. So I'm gonna rewrite this function as the revenue evaluated at h star and s star, but now I'm gonna consider that h star and s star each as functions of b, right? Because they depend on it in some way. As you change b, it changes the solution to this problem. It's very implicit, and it's kind of hard to think about, right? It's hard to think, okay, as I change this b, how much does that change h star?
|
Meaning of Lagrange multiplier.mp3
|
Because they depend on it in some way. As you change b, it changes the solution to this problem. It's very implicit, and it's kind of hard to think about, right? It's hard to think, okay, as I change this b, how much does that change h star? Well, that depends on what the definition of r was and everything there. But in principle, in this context, I think it's quite intuitive. You have a maximum possible revenue, and that depends on what your budget is.
|
Meaning of Lagrange multiplier.mp3
|
It's hard to think, okay, as I change this b, how much does that change h star? Well, that depends on what the definition of r was and everything there. But in principle, in this context, I think it's quite intuitive. You have a maximum possible revenue, and that depends on what your budget is. So what turns out to be a beautiful, absolutely beautiful, magical fact is that this lambda star is equal to the derivative of m star, the derivative of this maximum possible revenue with respect to b, with respect to the budget. And let me just show you what that actually means, right? So if, for example, let's say you did all of your calculations, and it turned out that lambda star was equal to 2.3.
|
Meaning of Lagrange multiplier.mp3
|
You have a maximum possible revenue, and that depends on what your budget is. So what turns out to be a beautiful, absolutely beautiful, magical fact is that this lambda star is equal to the derivative of m star, the derivative of this maximum possible revenue with respect to b, with respect to the budget. And let me just show you what that actually means, right? So if, for example, let's say you did all of your calculations, and it turned out that lambda star was equal to 2.3. Previously, that just seemed like some dummy number that you ignore, and you just look at whatever the associated values here are. But if you plug this in the computer and you see lambda star equals 2.3, what that means is for a tiny change in budget, like let's say your budget increases from 10,000 to 10,001, it goes up to $10,001. So you increase your budget by just a little bit, a little dB.
|
Meaning of Lagrange multiplier.mp3
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.