Basically the same heuristic but flipped around: in order to minimize the change in the output, we should move in the direction of our current contour line (its tangent). So in order to maximize the change in the output, we should move perpendicular to the contour line, as any other direction will have a component in the direction of the contour line. We get the most bang for our buck by moving perpendicular to the contour line.
I don't know if you really have a grasp of the unbelievable service you are providing for all those working in mathematics correlated field, such as engineers as myself, but that don't really deal with a given math topic in a daily basis and, once in a while, need to deal with a research or job problem that demands refreshing a given subject. I don't even want to think how much time it would take for me to go through a classical text book (first I would need to find a good one on the topic) and get all these reviews, intuitions and even new concepts by myself. I will definitely look for patreon or any other funding way to support you guys. Thank you, so much.
Hey, aren't the red vectors the shorter ones and the blue vectors the longer ones? For this function, the gradient gets larger in magnitude as you move away from the origin of the input space.
Yeah I think that's right; the closer together contour lines far from the origin mean that the gradient is steep and the vectors should be large, while the more spaced out contour lines near the origin mean that the gradient is more gentle/shallow and the vectors should be small
3:18 another way is that if you move on the contour, there will be no change on the f(x,y) output or z-axis or height so the fast way to change is to be perpendicular to the contour
if we are moving perpendicular to a contour line, are we really moving to a higher value? shouldn't the higher value lie in the same function , because moving to another contour line means moving from f(x) = 2 to f(x)= 2.1 , which is a basically another function right ?
Only if you continue to stay on the contour line. If you move tangential, then locally, your f(x,y) value will remain the same, but eventually, you will move off the contour line, since the contour line is not necessarily a straight line.
Indeed. The relationship between electric field and electric potential is the same concept. A vector field that is the gradient of a scalar function, and that scalar function is a shortcut for evaluating line integrals of the field. Electric potential is like the "hill" of the electric field, while electric field is its gradient, which is more formally called a potential function. The relationship between electric field and electric potential involves a negative sign, so that potential can correspond to stored energy, but in pure math, the negative sign is omitted.
because contour lines by definition are basically lines that the value of the function stays the same on it, each value of the function correspond to a line. so if two lines intersect each other at a point then the function will have two values at that point, which is impossible since functions by definition only have one value at each point
@@hieudang1789 ...good answer, except what you answered was why two different contour lines can't intersect, not why contour mapping to different outputs have to be parallel. After all, two lines COULD be NOT parallel and still not intersect. Look, draw a vertical line, and a (idk, the outline of a cat or something. Yea, sure, the outline of a cat) right next to it, on its right. So we've got a vertical line passing through our input space, and the outline of a cat on the right of that vertical line passing through our input space. And say that these are both contour lines of our function (that is, the vertical line passes through a whole bunch of (x,y) points that map to some specific output when we apply the function, and the outline of the cat passes through a whole bunch of other (x,y) points that map to another specific output). Why isn't it possible for the outline of the cat (which is definitely NOT PARALLEL to the vertical line, otherwise that would mean you have a really freaky flat cat) to map to an output that's really, really close to the output that the vertical line mapped to?
This is not a general rule - however, when you zoom in, two adjacent contour lines SEEM like they are parallel (he says ‘roughly parallel’ at some point in the video)
I don't know if it's just because I was first taught this in college without any visualization, but I'm really struggling to find value/intuition with these graphs. Are they useful? Would it be bad to entirely ignore all graphs?
Now Consider that for a contour map value of say 25 in f, all the possible combianation of x and y are mapped that produce the value 25. Let's say that the function is f(x, y) such that f=x+y. So all the possible numbers that when added together produces 25, and yes that includes decimals, end up being quite a lot. You got 20+5, but you also got 15+10 and 15.5+9.5 and 10.9+14.1, so all the x and y combination are mapped inside that 2d map that produces the value 25. Now let's take a small step in the f and name it df. That df is very small, so small that the curve connecting all the possible combination of x and y looks like a line. Now if you are at line of f=25, the shortest way to jump towards f=25+df is the line perpendicular to the f=25+df line, as if we apply pythagorian theorem we will find out that the hypothesis is always the lingest line(h2+b2=p2). Any line else than the perpendicular will act as the hypostheis, with its own base determined by how far away it is from the shortest line. Now the other thing we found out was that the gradient is always perpendicular as gradient has its x component, that is how much it is in the x direction as the partial derivative of f with respect to x and vice versa. What really happen when we take the vector of the derivatives is illustrate how much the rate of change is changing in the x and y direction. If the gradient is steep but not long then the rate of change in the x direction is much more than in the y direction and vice versa. But you also have to remember that the rate of change is nothing but a ratio between the slope between x and dx to the chance in the input value itself. So a small change in the x direction and the small change in the y direction lands us at f+df, as df is comprised of dx in the x direction and dy in the y direction. So just by taking the pd of the function, we ended up at f +df as dx and dy was necessary for any taking of derivative. And dx and dy ended us at f+df. Now what we have done it to make a path at from f to f+df, but how is it the shortest path you may ask and justifiably so. The way that we know its the shortest path is that it always end up being perpendicular. How is this always perpendicular, idk I am not that smart but hopefully this has been helpful to you.
I am *Granted* with profound mathematical knowledge
Wow!!
Like knowledge can’t stop spilling into my brain😂
Haha
Basically the same heuristic but flipped around: in order to minimize the change in the output, we should move in the direction of our current contour line (its tangent). So in order to maximize the change in the output, we should move perpendicular to the contour line, as any other direction will have a component in the direction of the contour line. We get the most bang for our buck by moving perpendicular to the contour line.
I have been searching for this for days! Your comment truly made it click. Thank you!
Amazingly intuitive. Thank you to the presenter for being a fantastic educator!
this was probably the best explanation of this topic I've ever seen!
I don't know if you really have a grasp of the unbelievable service you are providing for all those working in mathematics correlated field, such as engineers as myself, but that don't really deal with a given math topic in a daily basis and, once in a while, need to deal with a research or job problem that demands refreshing a given subject. I don't even want to think how much time it would take for me to go through a classical text book (first I would need to find a good one on the topic) and get all these reviews, intuitions and even new concepts by myself. I will definitely look for patreon or any other funding way to support you guys. Thank you, so much.
Hey, aren't the red vectors the shorter ones and the blue vectors the longer ones? For this function, the gradient gets larger in magnitude as you move away from the origin of the input space.
I'm glad I'm not the only one who noticed. Making these sorts of vids is difficult so I'm sure stuff like this is bound to slip through.
Thank you for this comment. Haha
Yeah I think that's right; the closer together contour lines far from the origin mean that the gradient is steep and the vectors should be large, while the more spaced out contour lines near the origin mean that the gradient is more gentle/shallow and the vectors should be small
Yea... I noticed too
@@harry_pageneat explanation
I can't believe how clear your explanations are. Thank you!
Wait...I know that voice...is that 3Blue1Brown? I didn't expect to see you in a Khan Academy video!
didn't realize until I read this comment...
You probably know this by now but he actually started out in Khan Academy.
I wondered, but I thought they didn't sound the same, or the name didn't match?
I was searching for this comment
I thought the same thing. Grant... yeah right
Perfect example!
That made the whole mathematical explanation into a very good visual concept. Thank you so much!
Nir Gutman xxxx
Thank you all so much!
3:18
another way is that if you move on the contour, there will be no change on the f(x,y) output or z-axis or height
so the fast way to change is to be perpendicular to the contour
thanks bro, helped a lot
if we are moving perpendicular to a contour line, are we really moving to a higher value? shouldn't the higher value lie in the same function , because moving to another contour line means moving from f(x) = 2 to f(x)= 2.1 , which is a basically another function right ?
Gradient is always perpendicular to contour line ,if I move in direction tengential to contour then f(x,y) will remain same .
Only if you continue to stay on the contour line. If you move tangential, then locally, your f(x,y) value will remain the same, but eventually, you will move off the contour line, since the contour line is not necessarily a straight line.
please make more videos on how to draw contour maps!
Super insightful! Thank you, Mr. Grant!
Genius. Thanks for your existence.
Yo' Equations
@@maxwellsequation4887 lmao this thread is amazing
very nice, thank you
It reminds me of orthogonality of Electric fields with the equipotentials
Indeed. The relationship between electric field and electric potential is the same concept. A vector field that is the gradient of a scalar function, and that scalar function is a shortcut for evaluating line integrals of the field.
Electric potential is like the "hill" of the electric field, while electric field is its gradient, which is more formally called a potential function. The relationship between electric field and electric potential involves a negative sign, so that potential can correspond to stored energy, but in pure math, the negative sign is omitted.
Marvellous💯
The guy has a cool pointer, doesn't he?
Cool!
why contour lines should always be parallel.
because contour lines by definition are basically lines that the value of the function stays the same on it, each value of the function correspond to a line. so if two lines intersect each other at a point then the function will have two values at that point, which is impossible since functions by definition only have one value at each point
@@hieudang1789 ...good answer, except what you answered was why two different contour lines can't intersect, not why contour mapping to different outputs have to be parallel. After all, two lines COULD be NOT parallel and still not intersect. Look, draw a vertical line, and a (idk, the outline of a cat or something. Yea, sure, the outline of a cat) right next to it, on its right. So we've got a vertical line passing through our input space, and the outline of a cat on the right of that vertical line passing through our input space. And say that these are both contour lines of our function (that is, the vertical line passes through a whole bunch of (x,y) points that map to some specific output when we apply the function, and the outline of the cat passes through a whole bunch of other (x,y) points that map to another specific output). Why isn't it possible for the outline of the cat (which is definitely NOT PARALLEL to the vertical line, otherwise that would mean you have a really freaky flat cat) to map to an output that's really, really close to the output that the vertical line mapped to?
This is not a general rule - however, when you zoom in, two adjacent contour lines SEEM like they are parallel (he says ‘roughly parallel’ at some point in the video)
I don't understand why the red vectors in the center of the contour maps longer?
I agree, vectors [y, x] are shorter near the origin
I don't know if it's just because I was first taught this in college without any visualization, but I'm really struggling to find value/intuition with these graphs. Are they useful? Would it be bad to entirely ignore all graphs?
Now Consider that for a contour map value of say 25 in f, all the possible combianation of x and y are mapped that produce the value 25. Let's say that the function is f(x, y) such that f=x+y. So all the possible numbers that when added together produces 25, and yes that includes decimals, end up being quite a lot. You got 20+5, but you also got 15+10 and 15.5+9.5 and 10.9+14.1, so all the x and y combination are mapped inside that 2d map that produces the value 25. Now let's take a small step in the f and name it df. That df is very small, so small that the curve connecting all the possible combination of x and y looks like a line. Now if you are at line of f=25, the shortest way to jump towards f=25+df is the line perpendicular to the f=25+df line, as if we apply pythagorian theorem we will find out that the hypothesis is always the lingest line(h2+b2=p2). Any line else than the perpendicular will act as the hypostheis, with its own base determined by how far away it is from the shortest line. Now the other thing we found out was that the gradient is always perpendicular as gradient has its x component, that is how much it is in the x direction as the partial derivative of f with respect to x and vice versa. What really happen when we take the vector of the derivatives is illustrate how much the rate of change is changing in the x and y direction. If the gradient is steep but not long then the rate of change in the x direction is much more than in the y direction and vice versa. But you also have to remember that the rate of change is nothing but a ratio between the slope between x and dx to the chance in the input value itself. So a small change in the x direction and the small change in the y direction lands us at f+df, as df is comprised of dx in the x direction and dy in the y direction. So just by taking the pd of the function, we ended up at f +df as dx and dy was necessary for any taking of derivative. And dx and dy ended us at f+df. Now what we have done it to make a path at from f to f+df, but how is it the shortest path you may ask and justifiably so. The way that we know its the shortest path is that it always end up being perpendicular. How is this always perpendicular, idk I am not that smart but hopefully this has been helpful to you.
And yes from machine learning when we try to figure out how to make a model better by finding a gradient descent to quamten mechanics
@@satyamprakash7030 nice. I'm late, but thanks for taking the time
Wait, since the graph has contour lines. What happens if you rescale everything upwards and make the shape 3d?
How will the final shape look like? :O
Its corresponding to f(x,y)=xy, go plot it into a 3D plotter online
The gradient is the same as the jacobian right?
Amaziiiiiiiiing
we got 5 years
and thats all we got
Anybody has the link of video about contour map?
I did dofe, of course I know about contour lines.
watch the whole playlist to understand ruclips.net/video/ZTbTYEMvo10/видео.html
I think he is 3b1b 😁😁
tyyyyyyyyyyyyyyyyyyyyyy
wow top
Lol I thought this was a video on contouring, makeup wise... Lol I'm dumb
vector calculus > makeup
Seventh! Thumbs up!
Third
Sixth
second
First