Skip to main content

08. Mathematical Foundations — Gradient, Convexity, Norm, and Decomposition

// CORE 2/7 — gradient/Jacobian/Hessian, Taylor approximation, convexity, norm, inner product, orthogonality, matrix decomposition

This page gathers in one place the mathematical tools that recur when reading optimization algorithms. If Background Parts 1–4 provide the grammar, this page shows how that grammar is used inside algorithms.

Gradient / Jacobian / Hessian

For a scalar objective f:RnRf:\mathbb{R}^n\to\mathbb{R}, the gradient gives first-order information:

f(x).\nabla f(x).

For a vector-valued function F:RnRmF:\mathbb{R}^n\to\mathbb{R}^m, the Jacobian gives first-order information:

JF(x)=Fx.J_F(x)=\frac{\partial F}{\partial x}.

The Hessian gives second-order information about a scalar objective:

2f(x).\nabla^2 f(x).

Constrained optimization considers not only the gradient of the objective, but also the gradients or Jacobian of the constraints.

Taylor approximation

Optimization algorithms turn a complex problem into an easy problem near the current point:

f(x+p)f(x)+f(x)p+12p2f(x)p.f(x+p)\approx f(x)+\nabla f(x)^\top p+\frac{1}{2}p^\top \nabla^2 f(x)p.

Gradient descent looks only at the linear term to choose a descending direction. Newton's method obtains its step by minimizing the quadratic model.

Convexity

A convex function has values below the chord along the line segment between any two points:

f(θx+(1θ)y)θf(x)+(1θ)f(y),0θ1.f(\theta x+(1-\theta)y)\le \theta f(x)+(1-\theta)f(y),\quad 0\le\theta\le 1.

Convex optimization matters because a local minimum is a global minimum. Non-convex problems require distinguishing saddle points from local minima, while optimality conditions become much stronger for convex problems.

Norm / inner product

A norm describes magnitude, while an inner product describes directional alignment:

x2=xx,x,y=xy.\|x\|_2=\sqrt{x^\top x},\qquad \langle x,y\rangle=x^\top y.

A descent direction pp usually satisfies

f(x)p<0.\nabla f(x)^\top p<0.

In other words, it has a component opposite the gradient.

Orthogonality

Two vectors are orthogonal when their inner product is zero:

xy=0.x^\top y=0.

Conjugate gradient uses AA-orthogonality, a stronger condition than ordinary orthogonality:

piApj=0(ij).p_i^\top A p_j=0\quad (i\ne j).

Thanks to this condition, the method proceeds in a new direction without undoing what was already optimized in previous directions.

Matrix decomposition

Matrix decomposition makes large linear-algebra calculations stable and fast.

DecompositionUse
LUSolve general linear systems
CholeskySolve symmetric positive-definite systems
QRLeast squares and orthogonalization
Eigen decompositionAnalyze curvature and positive definiteness
SVDRank, ill-conditioning, and pseudoinverses

When the Hessian is positive definite in Newton's method, Cholesky factorization obtains the step stably. QR or SVD is safer for ill-conditioned least-squares problems.

Connection map

  • Gradient: where to descend
  • Hessian: how much it curves
  • Convexity: whether a local solution is global
  • Norm: magnitude and stopping criteria
  • Orthogonality: structure that avoids reusing directions
  • Decomposition: tool that makes real calculation possible

Next: Optimality Conditions