For , the gradient collects all partial derivatives (see derivatives):
It is a vector that points in the direction of steepest increase, and points in the direction of steepest decrease. The directional derivative along a unit vector is .
Example: gives .
Used by gradient-descent on a loss. Computing it through many layers uses the chain-rule.