Canonical: https://knowlpedia.com/real-analysis/global-extrema/

# Global extrema

A continuous real function on a compact set attains its maximum and minimum.

**Global extrema:** Let \(K\subseteq\mathbb R^n\) be nonempty and compact, and let \(f:K\to\mathbb R\) be [continuous](https://knowlpedia.com/topology/continuous-map/). Then there exist points \(x_{\min},x_{\max}\in K\) such that
\[
f(x_{\min})\le f(x)\le f(x_{\max}) \quad \text{for all } x\in K.
\]

On a closed [interval](https://knowlpedia.com/real-analysis/interval/) \([a,b]\), this theorem ensures the existence of global maximizers and minimizers needed in many basic arguments in differential and integral calculus.

## Remarks

In particular, \(f\) has a [minimum](https://knowlpedia.com/real-analysis/minimum/) and a [maximum](https://knowlpedia.com/real-analysis/maximum/) on \(K\).
