If f:Rn→R is differentiable, then ∇f:Rn→Rn, which is called the gradient of f, is defined by ∇f(x)=⎝⎛∂x1∂f(x)⋮∂xn∂f(x)⎠⎞
1. The gradient points to direction f is increasing.
By Taylor Theorem, for x+s near a given x, f(x+s)≈f(x)+∇f(x)ts
For maximizing f, we can choose a good s, which means x should be moved to the direction f is increasing. Note that ∇f(x)ts is maximized when f is maximized. As ∇f(x)ts is the inner product of two vectors. ∇f(x)ts=∥∇f(x)∥∥s∥cosθ
where θ is the angle between ∇f(x) and s. It is maximized when θ=0. In other words, when ∇f(x) and s have the same direction, it is maximized. Therefore, x should be moved to ∇f(x) direction to locally maximized f. For example, consider f(x)=x2 and f(x,y)=x2+y2 for x, y∈R. Then their gradients are ∇f(x)=2x and ∇f(x,y)=(2x,2y)t.
Their gradient point to the direction each f is increasing at the point x. Moreover, −∇f(x) points to the direction f is decreasing.
2. The gradient is perpendicular to the tangent plane in terms of an implicit function.
The gradient has the different meaning for explicit and implicit functions
The gradient of an explicit function y=f(x) means the tangent vector at x.
The gradient of an implicit function f(x,y)=0 means the normal vector of the tangent plane at (x,y)t.
For instance, consider f(x,y)=x2−y=0. Then its gradient is ∇f=(2x,−1)t. The total derivative of f is 2xdx−dy=0, so ∇ft(dx,dy)t=0. Since (dx,dy)t is the tangent of f, ∇f is perpendicular to this.
For another example, consider f(x,y,x)=x2+y2−z=0. Then its gradient is ∇f=(2x,2y,−1)t. The total derivative of f is 2xdx+2ydy−dz=0, so ∇ft(dx,dy,dz)t=0. Since (dx,dy,dz)t is the tangent of f, ∇f is perpendicular to this.
Reference
[1] Michael T. Heath, Scientific Computing: An Introductory Survey. 2nd Edition, McGraw-Hill Higher Education.
Keep going!Keep going ×2!Give me more!Thank you, thank youFar too kind!Never gonna give me up?Never gonna let me down?Turn around and desert me!You're an addict!Son of a clapper!No wayGo back to work!This is getting out of handUnbelievablePREPOSTEROUSI N S A N I T YFEED ME A STRAY CAT