Analyze any quadratic function f(x,y) = Ax² + By² + Cxy + Dx + Ey + F. Find critical points, apply the second partial derivative test, and visualize contours with fixed symmetric color scaling and equal aspect ratio.
A saddle point of a function f(x,y) is a critical point (∇f = 0) that is neither a local minimum nor a local maximum. It resembles a mountain pass or a horse's saddle: the surface curves upward in one direction and downward in another. The second partial derivative test uses the Hessian determinant D = f_xx f_yy - (f_xy)². If D < 0, the critical point is a saddle point. If D > 0 and f_xx > 0 → local minimum; D > 0 and f_xx < 0 → local maximum; D = 0 → test inconclusive (ridge or degenerate valley).
For quadratic function f(x,y) = Ax² + By² + Cxy + Dx + Ey + F,
∇f = (2Ax + Cy + D, 2By + Cx + E) = (0,0) → linear system.
Hessian H = [[2A, C], [C, 2B]] , D = 4AB - C².
Let (x₀, y₀) be a critical point. Define the Hessian matrix H = [[f_xx, f_xy], [f_yx, f_yy]]. Determinant D = f_xx f_yy - f_xy². Classification rules are derived from Taylor expansion. For quadratic functions, this test is exact and global. The interactive contour map shows the "saddle" shape: one principal direction is concave up, the other concave down.
In optimization, saddle points are notorious for causing slow convergence in gradient-based algorithms (e.g., neural network training). Recognizing them analytically helps design better optimizers (momentum, adaptive methods). This calculator gives you the algebraic nature in seconds.
Saddle Points in Modern Optimization – In high‑dimensional machine learning, saddle points vastly outnumber local minima for non‑convex loss functions. Recent research by Dauphin et al. (2014, “Identifying and Attacking the Saddle Point Problem in High‑dimensional Non‑convex Optimization”) shows that gradient descent often gets trapped near saddle regions. Second‑order methods (Newton, trust‑region) explicitly use the Hessian’s sign to escape. Our calculator illustrates this principle in 2D – the same mathematics scales to deep learning.
| Function | Critical Point | Hessian D | Classification |
|---|---|---|---|
| f = x² - y² | (0,0) | -4 | Saddle Point |
| f = x² + y² | (0,0) | 4 (>0, f_xx>0) | Local Minimum |
| f = -x² - y² + 4 | (0,0) | 4 (>0, f_xx<0) | Local Maximum |
| f = xy | (0,0) | -1 | Saddle Point |
| f = x² + 4xy + y² | (0,0) | -12 | Saddle Point |
Consider a production function with diminishing returns but cross-interaction: f(x,y) = -x² - y² + 2xy + 10x + 5y. This quadratic is concave in some directions and convex in others, leading to a saddle point. Our calculator yields critical point (6.25, 4.375) with D = -8 → saddle point: an equilibrium that is unstable in one direction.
Engineering Example – Structural Stability
The potential energy surface of a shallow arch under load can be approximated by a quadratic with a negative Hessian determinant – a saddle point corresponding to an unstable equilibrium (buckling mode). Our tool identifies those unstable directions instantly.