Critical Points and Extrema
Suppose you are designing a metal container and want to know where its temperature is hottest. Or you are modeling a landscape and want to find every summit and basin. In each case you face the same question. Given a scalar function of several variables, where can it possibly attain a maximum or minimum value? Single-variable calculus answers this with the vanishing-derivative test. The multivariable world needs a genuine generalization. A function of several variables can fail to have an extremum at a point in far more intricate ways than a function of one variable can. This article develops the first-order machinery for locating candidates for local extrema of a function of several real variables. It introduces the notion of a critical point (or stationary point). It also proves the theorem that every interior local extremum of a differentiable function must occur at such a point. We also confront the subtlety that a domain's boundary is invisible to the gradient. The interior test says nothing about points on the edge of the domain. These must be examined separately, often by restricting the function to the boundary. The argument is then repeated one dimension down. The big picture is that "critical point" is a necessary condition, not a sufficient one. It flags candidates, but does not by itself distinguish maxima from minima from saddle points. That finer classification is the job of the second-derivative (Hessian) test. When the domain has constraints baked in, it is the job of Lagrange multipliers. Both of these are set up in this article but not resolved. This deliberately leaves the story open at its natural cliffhanger. By the end, you will have a precise definition of local extremum and critical point for functions . You will also have a fully proved theorem (Fermat's theorem in several variables) pinning interior extrema to critical points. There is a worked classification of stationary points. This includes one that is neither a max, min, nor simple saddle in the naive sense. Finally, there is a clear-eyed discussion of what goes wrong at boundaries and at points of non-differentiability.
- A local extremum of at an interior point requires , provided is differentiable there.
- Points where (or the gradient fails to exist) are called critical points; they are only candidates for extrema.
- The proof reduces the vector claim to the single-variable Fermat's theorem, applied along each coordinate direction.
- Not every critical point is an extremum: saddle points exist, and the gradient test cannot tell them apart from maxima or minima.
- Boundary points are exempt from the gradient condition — extrema on a closed domain's boundary must be found by separately analyzing the restriction of to that boundary.
- Non-differentiable points (corners, cusps) must also be checked directly; they are critical points too, but the gradient-vanishing argument does not apply to them.
- Key idea: critical points are where the gradient offers no preferred direction of increase or decrease — a necessary, not sufficient, signature of a local extremum.
Where this lives today
Critical point analysis via the vanishing gradient is the entry point for optimization in every quantitative discipline. In machine learning, training a model by minimizing a loss function over weights relies on the same first-order condition: gradient descent moves iteratively toward points where , and understanding saddle points (which are ubiquitous in high-dimensional loss landscapes) is central to why plain gradient descent can stall. In economics, utility- and profit-maximization problems set the gradient of a utility or profit function to zero to find optimal consumption or production bundles, often then layering budget constraints via Lagrange Multipliers. In physics, equilibrium configurations of a system (e.g. the shape of a hanging chain, or the resting position of a mechanical system) are critical points of a potential energy function, with stability determined by the second-order behavior mentioned above via The Hessian Matrix. In engineering design, minimizing material stress, cost functions, or drag subject to structural constraints again begins by finding the critical points of a differentiable objective. In statistics, maximum-likelihood estimation finds parameter values maximizing a likelihood function, again by solving for the log-likelihood . And in numerical analysis and scientific computing, root-finding methods (Newton's method in several variables) are frequently deployed precisely to solve the critical-point equation when it cannot be solved in closed form, as illustrated in the boundary calculation of Example 2.
Ask the tutor: How does the second-derivative (Hessian) test decide whether a critical point is a max, min, or saddle?
Let be an open set (or more generally the domain of ), and let .
Local maximum / minimum. A point is a local maximum of if there exists such that
It is a local minimum if the inequality is reversed, and a local extremum if it is either. The extremum is strict if the inequality is strict for .
Interior point. A point is an interior point of if some open ball . If is open, every point of is interior; if has a boundary (e.g. is a closed disk), points on are not interior.
Critical point. Suppose is an interior point of the domain of . Then is a critical point (or stationary point) of if either: 1. is differentiable at and , or 2. is not differentiable at . A critical point of type (1) is called a stationary point; some authors reserve "critical point" for type (1) only and treat non-differentiability points separately. We use the broader convention because both types must be checked when hunting for extrema.
Intuition
In one variable, a smooth curve has a horizontal tangent line at a local max or min — the derivative vanishes because the curve momentarily "levels off." In several variables, the graph of is a surface (or hypersurface), and the analogous statement is that the tangent plane is horizontal: every directional derivative at vanishes, which forces the entire gradient vector to vanish, since the gradient encodes all directional information at once. Picture a mountain range. At a summit, walking in any direction takes you downhill (or keeps you level, right at the peak) — there is no direction of ascent. At a mountain pass (a saddle point between two peaks), the gradient is also zero, yet walking along the ridge keeps you level or takes you up, while walking across the ridge takes you down. The gradient vanishing only tells you that to first order, no direction is preferred; it cannot by itself distinguish a summit from a pass from a basin. That distinction needs second-order information — the subject of The Hessian Matrix. The other crucial geometric fact: this entire argument is a purely interior phenomenon. If you are standing at the edge of a plateau that has been cut off by a fence (the boundary of the domain), the ground might slope steeply upward just beyond the fence — but you cannot walk there. The function can be increasing at the boundary point in the "forbidden" direction, so the gradient there need not vanish at all, yet the point can still be a genuine (constrained) local max or min of restricted to the domain.
Let be open, let , and let . Suppose: 1. is a local extremum of (a local maximum or a local minimum), and 2. is differentiable at , i.e. all partial derivatives exist and
Then
We use the technique of reduction to one variable: restrict along each coordinate axis through and invoke the single-variable Fermat theorem, which we take as known (it is the statement that a differentiable function of one real variable has zero derivative at an interior local extremum, proved directly from the definition of the derivative and the sign of difference quotients).
Step 1 — Set up single-variable restrictions. Since is open and , there is with . Fix an index and define by
where is the -th standard basis vector. This is well defined because for .
Step 2 — inherits the local extremum at . Suppose is a local maximum of , witnessed by radius as in the definition (shrink the above if necessary so both conditions hold on the same ball). Then for all ,
In particular, taking for , which lies in since , we get
Hence is a local maximum of on the open interval . (If instead is a local minimum of , the same argument with the inequality reversed shows is a local minimum of .)
Step 3 — is differentiable at , with derivative equal to a partial derivative of . By hypothesis is differentiable at , so the partial derivative exists. By definition,
So is differentiable at and .
Step 4 — Apply the one-variable Fermat theorem. We have shown is a real-valued function of one real variable, differentiable at the interior point of its domain , with a local extremum at . By the one-variable Fermat theorem,
Combined with Step 3, this gives
Step 5 — Range over all coordinates. Steps 1–4 did not depend on which index we chose. Hence for every . Since
this exactly says .
∎If ( open) attains a local extremum at , then is a critical point of : either is not differentiable at , or .
This is the contrapositive-free restatement of the theorem: if is differentiable at , the theorem forces . If is not differentiable at , then is a critical point by clause (2) of the definition directly, with nothing further to prove. Either way is a critical point.
∎Worked examples
Example 1: A saddle disguised in cross-terms. Let on . Find all critical points and determine, using only elementary reasoning (not yet the Hessian test), which ones cannot be extrema. Solution. Compute the gradient:
Setting both to zero:
Case : then , so , giving points and . Case : then forces , impossible for real . So this case contributes no real solutions. Thus has exactly two critical points:
Now examine directly. Along the line near , write , :
Let . Then , and at , — consistent with being critical along this slice too. But , so : along the line , has a strict local max at . Now look along the line fixed, varying near :
Then , and , again consistent. But as well — so along this line it is also a local max in alone... yet this single-variable check is not enough to conclude a genuine 2D local max, since we must test all directions, not just two. Test the direction for small deviations transverse to the diagonal, i.e. approach along (a direction not equal to ). Compute along this path to second order in . With where :
Expand: , and , so
So
At : , so the linear-in- coefficient is ✓ (confirms critical point). The quadratic term is for . So along this transverse direction, increases near (to second order), while along the diagonal direction we found decreases (a max, ). Since increases in one direction and decreases in another arbitrarily close to , is not a local extremum at all — it is a saddle point. By an identical computation (or by the symmetry , which sends critical points to critical points with the roles of increase/decrease swapped), is also a saddle point. This example is exactly why Fermat's theorem is only a necessary condition: both critical points exist as the theorem guarantees, but neither is an extremum. Resolving this efficiently — without hand-testing several directions — is precisely the motivation for The Hessian Matrix.
Example 2: Interior vs. boundary on a closed disk. Let on the closed disk . Find the global maximum and minimum of on . Solution. is closed and bounded (compact), and is continuous (indeed a polynomial), so by the Extreme Value Theorem, attains a global max and global min somewhere on . Any such extremum occurs either at an interior point of (the open disk ) or on the boundary circle . Interior candidates. On the open disk, is differentiable everywhere, so by the theorem just proved, any interior extremum must be a critical point. Compute:
Setting this to zero: , . Check this lies in the open disk: . Yes. So is the unique interior critical point, with
Boundary candidates. On the boundary circle, parametrize , . Then
(Using .) This reduces the search to a one-variable problem on the boundary — the general strategy for constrained extrema, later formalized via Lagrange Multipliers. Differentiate:
Rather than solve this transcendental equation symbolically, note defines the boundary's own critical points; a numerical solve (Newton's method from a few seed points) locates them near rad and rad (verify: at , — this is the direction of the point , i.e. the boundary point in the exact direction from the origin through extended to radius , since has direction angle ). Indeed this makes geometric sense: 's interior critical point is the unconstrained minimum of the paraboloid-like function , and the boundary point diametrically farthest from it in that radial direction, , is a natural candidate for the boundary max, while the near point is a candidate for the boundary min. Evaluate at these two boundary points:
- Near point : .
- Far point : .
We also must check the endpoints of the -range are not separately extremal — but since ranges over a full circle (a closed loop with no boundary of its own), the only boundary-of- candidates are these two critical 's (a continuous periodic function on a circle attains its extrema only at its own critical points, by the same Fermat argument applied to the -variable function on ). Comparing all candidates: (interior), (boundary near point), (boundary far point). The global minimum on is at the interior point , and the global maximum is approximately at the boundary point near . This example shows both halves of the theorem's scope at once: the interior extremum was correctly found via , but the true global maximum lived on the boundary, where the gradient condition simply does not apply and a separate one-dimensional analysis was required.
The theorem requires to be an interior point of the domain. Here is what fails if we allow to be a boundary point instead. Let (a closed half-plane, so is not open), and let
This is differentiable everywhere on (in the sense of having a well-defined gradient extending smoothly from an open neighborhood in ), with
Consider the point , which lies on the boundary line of , not in its interior. Restricted to , attains its global minimum at every point with , including : indeed for every . So is (non-strictly) a global — hence local — minimum of on . Yet
The gradient does not vanish at this extremum. The theorem's conclusion fails exactly because its hypothesis — that be an interior point of the domain — fails: sits on , so no open ball around is contained in , and the key step of the proof (restricting to a full two-sided interval along each axis through , staying inside ) breaks down: moving in the direction from immediately exits . This is precisely the phenomenon flagged in the "boundary considerations" of the definition, and it is the reason boundary extrema must always be hunted separately from interior ones.
Scope, edge cases & common traps
| Situation | What to do |
|---|---|
| interior, differentiable there | Extremum ; solve the gradient system. |
| interior, not differentiable there (corner, cusp, kink) | Still a candidate critical point; the gradient test says nothing — check directly (e.g. via directional derivatives or direct comparison of values). |
| on the boundary of the domain | Gradient need not vanish (see counterexample). Restrict to the boundary and search that lower-dimensional problem for its own extrema/critical points. |
| found | Only a candidate. Could be a max, a min, or a saddle (or, in degenerate cases, none of the classical three, e.g. a monkey saddle). Needs second-order test. |
| Domain unbounded or not closed | Extreme Value Theorem may not guarantee a global extremum exists at all; critical point analysis only ever finds candidates, existence must be argued separately. |
The mathematician behind it
Origins · 1 minPierre de Fermat and how this was discovered
Fermat, a magistrate and councillor at the parlement of Toulouse, developed his method of finding maxima and minima (adaequalitas) decades before Newton and Leibniz formalized the calculus. Working with polynomials, Fermat's technique — comparing and , dividing by , and then discarding the remaining terms in — is recognizably the germ of setting a derivative to zero, even though he had neither the language of limits nor of derivatives. His method traveled through correspondence with Mersenne, Roberval, and Descartes, and directly influenced the later formal treatments of extrema by Newton, Leibniz, and eventually the rigorous – framing that underlies the modern proof given above.
Is every critical point a local extremum?
No. A critical point is only a candidate; the theorem in this article is a one-directional implication (extremum critical point), not an equivalence. The standard counterexample is a saddle point, such as at the origin: , yet along the -axis increases away from the origin while along the -axis it decreases, so the origin is neither a local max nor a local min. Distinguishing extrema from saddles among critical points requires second-order information, typically packaged into the Hessian matrix and its eigenvalues or its determinant (the second-derivative test), which is the natural next tool after this one.
What happens if is not differentiable at a critical point?
The theorem's proof genuinely requires differentiability, since it relies on the existence of and the local linear approximation. If fails to be differentiable at an interior point (for instance at the origin, which has a sharp cone-point), is still classified as a critical point by convention, because it could be an extremum, but the gradient-vanishing argument simply does not apply there. Such points must be checked directly — often by bounding near using inequalities, or by examining one-sided/directional behavior explicitly, since no linear approximation is available to analyze.
Why do we need to treat the boundary of the domain separately?
The proof of Fermat's theorem crucially uses that a full two-sided interval along each coordinate direction through remains inside the domain, which requires to be an interior point. At a boundary point, moving in some directions immediately leaves the domain, so there is no guarantee that is even defined nearby in every direction, let alone that its restriction along an axis has an honest two-sided local extremum. As the counterexample shows, a genuine minimum can occur at a boundary point where the gradient is a nonzero vector pointing "into" the forbidden region. The correct method is to parametrize or otherwise restrict to the boundary set itself (which is typically a lower-dimensional set, e.g. a curve for a 2D domain) and apply the same first-order reasoning one dimension down.
How does this generalize the single-variable version I already know?
The single-variable statement — at an interior local extremum of a differentiable function — is exactly the case of the theorem here. The proof strategy in higher dimensions is to reduce back to the single-variable case: fix all but one coordinate, restrict to a line through , and apply the one-variable theorem to that restriction, one coordinate direction at a time. This is why the theorem is often just called "Fermat's theorem" without qualification even in the multivariable setting — it is the same idea applied along every axis simultaneously, using the fact that differentiability supplies all directional derivatives (via the gradient) at once, not just the axis-aligned ones.
Can a function have infinitely many critical points?
Yes, easily. A constant function has everywhere, so every point of its domain is critical (and, trivially, every point is a non-strict global extremum, consistent with the theorem). Less trivially, (independent of ) has , which vanishes on the entire family of vertical lines , — infinitely many critical points, alternating between maxima and minima in but constant (hence never even locally strict) in . This is a useful reminder that critical points can form higher-dimensional sets, not just isolated points.
Does this theorem tell us that extrema exist?
No — it is purely a necessary condition for where an extremum can be, given that one exists; it never asserts existence. Existence of a global extremum on a given domain is a separate question, typically settled by the Extreme Value Theorem when the domain is compact (closed and bounded) and is continuous. On a non-compact domain (open, unbounded, or with points removed), a function can fail to attain any local or global extremum at all — e.g. on all of has no critical points and no extrema whatsoever, consistent with, not contradicted by, the theorem.
How does this connect to Lagrange multipliers?
Lagrange multipliers address a different but related problem: extremizing subject to an equality constraint , restricting attention to a lower-dimensional constraint surface rather than an open region. The unconstrained theorem in this article is exactly the "no constraint" special case. When a domain's boundary is itself defined by an equation like (as in Example 2's circle ), the boundary search performed there by direct parametrization is precisely what Lagrange multipliers automate in general, replacing the vanishing-gradient condition with the tangency condition .