Analyze any quadratic function f(x, y) = A·x² + B·x·y + C·y² + D·x + E·y + F. Compute the Hessian matrix (matrix of second partial derivatives), its eigenvalues, determinant, and classify critical points as local minima, maxima, or saddle points.
The Hessian matrix (or simply Hessian) is a square matrix of second‑order partial derivatives of a scalar‑valued function. For a twice‑differentiable function f: ℝⁿ → ℝ, the Hessian H(f) encodes local curvature information. In multivariable calculus, the Hessian plays a central role in the second partial derivative test for classifying critical points (local minima, maxima, and saddle points).
For f(x,y) = A x² + B x y + C y² + D x + E y + F,
H = \begin{bmatrix} \frac{\partial^2 f}{\partial x^2} & \frac{\partial^2 f}{\partial x \partial y} \\ \frac{\partial^2 f}{\partial y \partial x} & \frac{\partial^2 f}{\partial y^2} \end{bmatrix} = \begin{bmatrix} 2A & B \\ B & 2C \end{bmatrix}
The Hessian is symmetric (Clairaut's theorem) when second derivatives are continuous. Its eigenvalues determine convexity/concavity: if H is positive definite (all eigenvalues > 0), the function is locally convex → local minimum; negative definite → local maximum; indefinite (mixed signs) → saddle point.
1. Compute first partial derivatives: ∂f/∂x = 2A x + B y + D ; ∂f/∂y = B x + 2C y + E.
2. Stationary point: Solve ∇f = 0 → linear system: 2A x₀ + B y₀ = -D ; B x₀ + 2C y₀ = -E. Using Cramer's rule (provided det ≠ 0) yields unique critical point.
3. Hessian matrix H: constant independent of (x,y) for quadratic functions. The determinant Δ = (2A)(2C) - B² = 4AC - B².
4. Classification rule: If Δ > 0 and 2A > 0 → local minimum; Δ > 0 and 2A < 0 → local maximum; Δ < 0 → saddle point; Δ = 0 → test inconclusive (degenerate).
For quadratic functions, the Hessian is globally constant, meaning curvature is uniform — classification at the stationary point applies globally. This matches the concept of convex quadratic forms widely used in optimization.
In linear regression with squared error, the Hessian of the cost function is 2XᵀX (positive semidefinite), guaranteeing convexity and a unique global minimum. For logistic regression, the Hessian varies but remains positive definite under certain conditions. Understanding the Hessian helps debug optimization algorithms like Newton-Raphson.
Elastic systems often have potential energy approximated by quadratic forms. Positive definiteness of the Hessian indicates stable equilibrium. Engineers use eigenvalue analysis of the stiffness matrix (essentially a Hessian) to avoid buckling.
Given a critical point (x₀, y₀) where ∇f = 0, define D = f_xx f_yy - (f_xy)² = determinant(H). Then:
Our calculator implements this rule precisely, even when linear terms shift the critical point. For quadratic functions, the result is always exact.
| Function | Hessian | Determinant | Stationary Point | Classification |
|---|---|---|---|---|
| f = x² + 2xy + y² | [[2,2],[2,2]] | 0 | line of points (degenerate) | Inconclusive (global valley) |
| f = 3x² + 2y² | [[6,0],[0,4]] | 24 > 0 | (0,0) | Local minimum |
| f = -x² - 3y² | [[-2,0],[0,-6]] | 12 > 0 | (0,0) | Local maximum |
| f = x² - 2xy + y² | [[2,-2],[-2,2]] | 0 | degenerate line | Test fails (parabolic cylinder) |