Tutorials › Real Analysis › Compactness and Multivariable Extrema

Multivariable Analysis · Tutorial 814 of 1000

Compactness and Multivariable Extrema

See how compactness turns local continuity into guaranteed global extrema, and learn how to check the hypotheses in multivariable optimization.

Advanced 10 min read

What You'll Learn

  • State the extreme value theorem for continuous functions on compact sets
  • Prove attainment of absolute maxima and minima using sequential compactness
  • Apply Heine–Borel to common compact optimization domains
  • Recognize why compactness and continuity are separate requirements
  • Prove that continuous functions on compact sets are uniformly continuous
  • Distinguish existence of global extrema from finding their locations

From Local Tests to Global Extrema

The constrained optimization results developed earlier identify conditions that a local extremum must satisfy at a regular feasible point. Such conditions help locate and classify candidates, but they do not guarantee that an extremum exists anywhere. A global question needs a global hypothesis on the domain: compactness supplies it.

The key principle is that a continuous real-valued function on a nonempty compact subset of \(\mathbb{R}^n\) attains both an absolute maximum and an absolute minimum. This is the multivariable Extreme Value Theorem. It applies whether the compact set is a region, a curve, or a more general feasible set. It does not require differentiability, and it does not say where the extrema occur. Its role is to guarantee existence before derivative-based methods are used to find or classify candidates.

We will use the Compactness and Sequential Compactness in \(\mathbb{R}^n\) Theorem: every sequence in a compact set has a subsequence converging to a point of that set. We will also use the Heine–Borel Theorem, which characterizes compact subsets of \(\mathbb{R}^n\) as precisely the closed and bounded sets. These earlier results make the hypotheses of the extreme value principle both usable and verifiable.

Absolute Extrema and the Extreme Value Theorem

Definition (Absolute Maximum and Minimum): Let \(K\subseteq\mathbb{R}^n\), and let \(f:K\to\mathbb{R}\). A point \(a\in K\) is an absolute maximum point of \(f\) on \(K\) if \(f(x)\leq f(a)\) for every \(x\in K\). It is an absolute minimum point if \(f(a)\leq f(x)\) for every \(x\in K\). The values \(f(a)\) are the absolute maximum and absolute minimum values, respectively.

The word “absolute” distinguishes comparison with every point of the domain from comparison only with nearby points. A global extremum is therefore a local extremum when the usual relative-domain definition is used, but a local extremum need not be global. The theorem below guarantees points where the global comparisons hold.

Theorem (Extreme Value Theorem in \(\mathbb{R}^n\)): Let \(K\) be a nonempty compact subset of \(\mathbb{R}^n\), and let \(f:K\to\mathbb{R}\) be continuous. Then \(f\) has an absolute maximum and an absolute minimum on \(K\).

Proof. First we show that \(f(K)\) is bounded. If it were unbounded, for each positive integer \(j\) we could choose \(x_j\in K\) such that \(|f(x_j)|>j\). By the Compactness and Sequential Compactness in \(\mathbb{R}^n\) Theorem, a subsequence \(x_{j_\ell}\) converges to some \(a\in K\). Continuity at \(a\) implies \(f(x_{j_\ell})\to f(a)\), so this sequence of real numbers is bounded. But \(|f(x_{j_\ell})|>j_\ell\), and the strictly increasing indices \(j_\ell\) tend to infinity. This is a contradiction. Thus \(f(K)\) is bounded.

Because \(K\) is nonempty, \(f(K)\) is nonempty. The completeness of \(\mathbb{R}\) gives a finite supremum \(M=\sup f(K)\). For each positive integer \(j\), the definition of supremum gives a point \(y_j\in K\) such that

$$ M-\frac{1}{j}<f(y_j)\leq M. $$

Compactness gives a subsequence \(y_{j_\ell}\) converging to some \(b\in K\). By continuity, \(f(y_{j_\ell})\to f(b)\). The displayed inequalities and \(1/j_\ell\to0\) imply \(f(y_{j_\ell})\to M\), so uniqueness of limits gives \(f(b)=M\). Since \(M\) is an upper bound for \(f(K)\), \(b\) is an absolute maximum point. Applying the same argument to the continuous function \(-f\) gives an absolute maximum of \(-f\), which is an absolute minimum of \(f\). \(\square\)

The proof separates two tasks. Compactness prevents function values from escaping to infinity and ensures that an approximating sequence has a limit point in the domain. Continuity transfers convergence of points into convergence of function values. The supremum by itself would not guarantee that any point realizes it; the convergent subsequence and continuity establish attainment.

Recognizing Compact Optimization Domains

In applications, compactness is often checked using Heine–Borel rather than an open-cover argument. A closed and bounded region in \(\mathbb{R}^n\) is compact, so any continuous objective on that region has global extrema. Equality constraints can also define compact feasible sets. For example, if \(F:\mathbb{R}^n\to\mathbb{R}^k\) is continuous, then the level set \(F^{-1}(\{c\})\) is closed; if that level set is also bounded and nonempty, it is compact.

Be careful when a constraint map is defined only on an open set \(U\). Its level set is closed relative to \(U\), but need not be closed in all of \(\mathbb{R}^n\). Relative closedness alone is not the closedness required by Heine–Borel. One must check the feasible set itself in the ambient space, or establish compactness by another valid argument.

Worked Example: Extrema on a Rectangle

Consider \(f(x,y)=(x-1)^2+2y\) on \(K=[-1,2]\times[0,3]\). The function is a polynomial, hence continuous, and \(K\) is closed and bounded, hence compact by Heine–Borel. The Extreme Value Theorem guarantees that both extrema exist. We can identify them directly: on this rectangle, \(0\leq(x-1)^2\leq4\) and \(0\leq2y\leq6\), so

$$ 0\leq f(x,y)\leq10. $$

The lower bound is attained at \((1,0)\), where \(f(1,0)=(1-1)^2+2(0)=0\). The upper bound is attained at \((-1,3)\), where \(f(-1,3)=(-1-1)^2+2(3)=4+6=10\). Thus the absolute minimum is \(0\), and the absolute maximum is \(10\). The theorem guarantees attainment; the inequalities locate the points in this example.

Worked Example: A Linear Objective on the Unit Circle

Let \(K=\{(x,y)\in\mathbb{R}^2:x^2+y^2=1\}\) and \(f(x,y)=3x+4y\). The unit circle is closed and bounded, so it is compact; \(f\) is continuous. The theorem therefore guarantees a maximum and a minimum. To calculate them, use the dot product and the Cauchy–Schwarz inequality:

$$ -5\leq -\sqrt{3^2+4^2}\sqrt{x^2+y^2} \leq 3x+4y \leq \sqrt{3^2+4^2}\sqrt{x^2+y^2}=5. $$

Equality in the upper bound occurs when \((x,y)\) points in the direction \((3,4)\). The corresponding unit vector is \((3/5,4/5)\), and direct substitution gives \(3(3/5)+4(4/5)=9/5+16/5=5\). Equality in the lower bound occurs at \((-3/5,-4/5)\), where the value is \(-9/5-16/5=-5\). The maximum and minimum values are therefore \(5\) and \(-5\).

Worked Example: A Bounded Domain Without an Attained Supremum

Consider \(f(x,y)=x\) on the open unit disk \(D=\{(x,y):x^2+y^2<1\}\). The function is continuous and bounded above by \(1\), because \(x^2<1\) implies \(x<1\). However, no point of \(D\) has \(x=1\): that would force \(x^2+y^2\geq1\). The values \(f(1-1/j,0)=1-1/j\), for integers \(j\geq2\), approach \(1\), so the supremum is \(1\) but it is not attained. The domain is bounded but not closed, hence not compact. This example shows why boundedness alone does not suffice for the Extreme Value Theorem.

Compactness Also Gives Uniform Control

The Extreme Value Theorem is one consequence of a broader principle: on a compact domain, continuity controls the function uniformly across the whole set, not merely near each point separately. This is useful in optimization because it rules out increasingly rapid changes at locations that drift around the domain.

Theorem (Uniform Continuity on a Compact Set): Let \(K\subseteq\mathbb{R}^n\) be compact, and let \(f:K\to\mathbb{R}\) be continuous. Then \(f\) is uniformly continuous on \(K\): for every \(\varepsilon>0\), there exists \(\delta>0\) such that for all \(x,y\in K\), if \(\|x-y\|_2<\delta\), then \(|f(x)-f(y)|<\varepsilon\).

Proof. Suppose, to the contrary, that \(f\) is not uniformly continuous. Then there is an \(\varepsilon_0>0\) such that for every positive integer \(j\), we can choose \(x_j,y_j\in K\) with

$$ \|x_j-y_j\|_2<\frac{1}{j} \qquad\text{and}\qquad |f(x_j)-f(y_j)|\geq\varepsilon_0. $$

Compactness gives a subsequence \(x_{j_\ell}\) converging to some \(a\in K\). The triangle inequality yields

$$ \|y_{j_\ell}-a\|_2 \leq \|y_{j_\ell}-x_{j_\ell}\|_2+\|x_{j_\ell}-a\|_2. $$

The first term tends to zero because it is less than \(1/j_\ell\), and the second tends to zero because \(x_{j_\ell}\to a\). Hence \(y_{j_\ell}\to a\) as well. Continuity at \(a\) now implies \(f(x_{j_\ell})\to f(a)\) and \(f(y_{j_\ell})\to f(a)\). Consequently,

$$ |f(x_{j_\ell})-f(y_{j_\ell})|\longrightarrow 0, $$

contradicting the lower bound \(\varepsilon_0>0\). Therefore \(f\) is uniformly continuous on \(K\). \(\square\)

This theorem does not assert that \(f\) is differentiable, nor does it provide a numerical value of \(\delta\). It says that one choice of \(\delta\) works for every pair of points in the compact domain. Its proof uses the same sequential compactness mechanism as the extreme value argument, but applies it to pairs of nearby points instead of to a sequence of function values approaching a supremum.

What Compactness Does—and Does Not—Conclude

For a global optimization problem, compactness and continuity answer an existence question: there are points where the largest and smallest objective values occur. They do not automatically identify those points, prove uniqueness, or classify every stationary point. Those tasks may require algebra, derivative tests, comparisons on the boundary, or other information about the particular objective and feasible set.

This distinction connects the global theorem to constrained optimization. If the feasible set is compact and the objective is continuous on it, global constrained extrema exist, even when some extremizers lie at points where a regular Lagrange multiplier condition cannot be applied. A multiplier calculation is a method for studying certain candidates; it is not a substitute for checking whether a global extremum exists or whether the feasible set is compact.

Both hypotheses in the Extreme Value Theorem matter. The open-disk example shows that a bounded but noncompact domain can fail to contain a point realizing its supremum. Continuity matters too: on the compact interval \([0,1]\), define \(g(0)=1\) and \(g(x)=x\) for \(x>0\). Then \(g\) has no absolute minimum, because its values are positive while \(g(1/j)=1/j\to0\), and no point has value \(0\). This function is discontinuous at \(0\). Thus compactness alone does not guarantee attainment for an arbitrary function.

1
Identify the domain.
State the actual set on which the objective is being optimized, including all constraints.
2
Check compactness.
In \(\mathbb{R}^n\), use Heine–Borel when the feasible set is nonempty, closed, and bounded.
3
Check continuity on that set.
The objective need not be differentiable for the Extreme Value Theorem, but it must be continuous.
4
Conclude attainment, then locate the extrema.
The theorem guarantees global maximum and minimum points; additional analysis determines their locations and values.

Check Your Understanding

Use the Extreme Value Theorem and its hypotheses to answer the following questions.

  1. Which two hypotheses on \(K\) and \(f\) guarantee that both absolute extrema exist?
  2. In the proof of the Extreme Value Theorem, why is it important that the convergent subsequence has its limit in \(K\)?
  3. Why does a bounded domain alone fail to guarantee that a continuous function attains its supremum?
  4. Does the Extreme Value Theorem require differentiability? What does it guarantee instead?
  5. What compactness test is usually available for subsets of \(\mathbb{R}^n\), and what two properties must be checked?