Skip to content

Extreme Value Theorem on Compact Sets

Theorem

Let E⊆Rn,E \subseteq \mathbb{R}^n\text{,} f ⁣:E→Rf \colon E \to \mathbb{R} be a function, and X⊆EX \subseteq E be a nonempty compact set. If ff is continuous on X,X\text{,} then ff attains both its maximum and minimum on X.X\text{.}


Interpretation

A continuous function on a compact set cannot sneak off to infinity or skip its highest and lowest values: it attains both a maximum and a minimum on that set.

A disc representing a compact set X crossed by parallel level lines of f; the maximum M and the minimum m are attained at two points on its edge, and f maps X onto the interval from m to M.

The level sets of ff are parallel lines, so ff increases steadily in one direction across the disc XX. The maximum MM is attained where the disc reaches furthest in that direction and the minimum mm on the opposite side. The image f(X)f(X) is the closed interval [m,M][m,M]: along the segment from the minimum point to the maximum point, ff takes every value in between by the intermediate value theorem.

Each hypothesis is needed. On the set (0,1)(0,1), which is not closed, f(x)=xf(x)=x has neither a maximum nor a minimum; on the unbounded set [0,∞)[0,\infty) it has no maximum. Without continuity, ff can approach a value without reaching it: on [0,1][0,1], the function with f(x)=xf(x)=x for x<1x<1 and f(1)=0f(1)=0 has supremum 11 but no maximum.

The proof combines two facts: the continuous image of a compact set is compact, and a nonempty compact subset of R\mathbb{R} contains its supremum and infimum. For X=[a,b]X=[a,b] this is the extreme value theorem of Math I.

The theorem guarantees existence only. The extreme points need not be unique or interior; as in the figure, they may lie on the boundary, where setting derivatives equal to zero does not find them. The theorem returns in Math IV as the existence argument for a global maximum and minimum on a compact feasible set.


Key Results

  • If the domain is not compact, the conclusion may fail. For example, f(x)=1/xf(x)=1/x on (0,1)(0,1) is continuous but has no maximum (it blows up as x→0+x\to0^+) and no minimum (its values decrease towards 11 as x→1−,x\to1^-\text{,} but 11 is never attained, since 1∉(0,1)1\notin(0,1)).
  • This theorem is used to prove existence of solutions in optimization problems.
  • Together with the intermediate value theorem, it gives a complete picture of the range of a continuous real-valued function on a connected compact set: the range is the closed interval [m,M][m,M] between the minimum mm and the maximum MM. (In R\mathbb{R}, a connected compact set is itself a closed bounded interval.)

Examples

  • The function f(x,y)=x+yf(x,y)=x+y on the closed unit disc {(x,y)∈R2 ⁣:x2+y2≤1}\{(x,y)\in\mathbb{R}^2\colon x^2+y^2\leq 1\} attains maximum 2\sqrt{2}​ at (1/2,1/2)(1/\sqrt{2},1/\sqrt{2}) and minimum −2-\sqrt{2}​ at (−1/2,−1/2)(-1/\sqrt{2},-1/\sqrt{2}).

Prerequisites

Sources

Symbols: element of, infinity, real numbers, square root, subset

Last updated: 20 October 2026 03:02