Gradient
In mathematics, the gradient of a real-valued differentiable function <math>f(x_1,...,x_n)</math> at a point <math>p</math> is a vector in <math>R^n</math> which points in the direction in which <math>f</math> increases most rapidly. The magnitude of the gradient at <math>p</math> is equal to the maximum directional derivative of <math>f</math> at <math>p</math>.
More precisely, we define the gradient, <math>\nabla f</math> of <math>f</math> to be the vector-field:
<math> \nabla f = (\frac{\partial f}{\partial x_1},...,\frac{\partial f}{\partial x_n}) </math>
If <math>u</math> is a unit vector in <math>R^n</math>, then, by the chain rule, the directional derivative of <math>f</math> in the direction of <math>u</math> is simply the dot product:
<math> \nabla f \cdot u </math>
Evidently by the Cauchy-Schwartz inequality, the directional derivative is maximal in the direction of the gradient, and equal to <math>||\nabla f||</math> for <math>u</math> a unit vector in the direction of the gradient.