1.4 Basic Vector Calculus
Gradients, Jacobians, and Hessians in the notation this course uses.
These notes walk through the lecture slides. The original deck is unchanged; use (slides) on the course hub if you want that PDF.
Notation follows Deisenroth, Faisal, and Ong, Mathematics for Machine Learning.
1. Gradient
The gradient is the derivative for several variables. Vary one coordinate of , hold the others. Those partial derivatives, stacked, are the gradient.
For ,
This course writes the collection as a row
Some books write a column. Be consistent inside one derivation. Descent updates look like if is a row.
2. Chain rule
Let depend on and . The derivative of with respect to is
That is a gradient times a Jacobian. Back-propagation (Module 6) is this rule applied to a long composition. You do not need the neural-net story yet. You do need to be willing to write the product.
3. Hessian
If is twice differentiable, the Hessian is
The mixed partials match (Schwarz), so the Hessian is symmetric. It measures curvature of around a point.
At a critical point :
- positive definite local minimum;
- negative definite local maximum;
- indefinite saddle.
Newton’s method (Week 2) solves a linear system with this matrix every step. Eigenvalues of are why a long thin valley makes steepest descent zigzag.
4. Practice
-
If a book prints as a column, how does the descent update change compared with the row convention in these slides?
-
In the chain rule, which factor is “how depends on ” and which is “how depends on ”?
-
Why does a symmetric Hessian with one positive and one negative eigenvalue make a critical point a saddle, not a min?