# eli5 The direction of the Gradient function

11 views
0

I have read that Gradient of a scalar function points in the direction in which the function is the highest. But, according to another source, the gradient function is normal to the surface of the function, I don’t get which one it is? How can I understand the gradient function? I think of it as a 3D slope of a function at a point, but I don’t know how to incorporate that with normal to the surface!

In: 1

Where did you read the bit about it being normal to the surface? Gradient vectors point in the direction of greatest increase.

When I answer math questions I usually go being the scope of “explain like I’m *five*” because it’s usually for someone’s course understanding, so here’s the “explain like I’m taking a course on this” explanation:

It’s analogous to regular 1D functions f(x). If f is increasing, df/dx is positive. If you think of a number as a 1D “vector”, then a positive number points towards the right, which is the direction in which changing x causes f(x) to increase. Likewise if the derivative is negative, then you have to move x to the left to cause f(x) to increase. When you start adding more dimensions to your input, the gradient vector will point in the direction in which changing the inputs will cause the greatest increase in the value of f

i think if you’re given a scalar point function
it’s just magnitude like
at x=1, y=2, z=3, f(1,2,3) = 10

but when you take gradient of that function

now it’s an infinitesimal changes to that magnitude in gradient vector directions such as i, j, k (unit vector of x, y, z)

but uh f(x,y,z) = C is a 3D surface i think
taking gradient of surface function would give you normal vector at point x y z of that surface

so when you do dot product of gradient of scalar point function and gradient of 3D surface function,
result is a scalar with magnitude being the infinitesimal change in scalar point function in direction of the normal vector of surface