---
tag: 04CPG9K1C4
kind: definition
name: Local maximum and minimum
msc: [26B99]
defines: 0WFBH1Q3WC
uses: [0JPCHTXWG0]
sources:
  - url: https://en.wikipedia.org/wiki/Maximum_and_minimum
    locator: Definition
  - url: https://en.wikipedia.org/wiki/Maximum_and_minimum
    locator: Functions of more than one variable
---

## Definition

Let $D \subseteq \mathbb{R}^n$, let $f \colon D \to \mathbb{R}$, and let $a \in D$.
The function $f$ has a local maximum at $a$ if there is $\varepsilon > 0$ such that $f(x) \le f(a)$ for all $x \in D$ with $\|x - a\| < \varepsilon$.
The function $f$ has a local minimum at $a$ if there is $\varepsilon > 0$ such that $f(x) \ge f(a)$ for all $x \in D$ with $\|x - a\| < \varepsilon$.
A local extremum of $f$ is a local maximum or a local minimum of $f$.
The extremum is strict if the inequality is strict for all such $x \ne a$.

## Remarks

A global maximum of $f$ is a point $a$ with $f(x) \le f(a)$ for all $x \in D$. Each global maximum is a local maximum.
The function $f(x, y) = x^2 + y^2$ has a strict local minimum at $(0, 0)$, which is also a global minimum.
In two or more variables, a local minimum that is the only critical point need not be a global minimum. For $f(x, y) = x^2 + y^2 (1 - x)^3$, the only critical point $(0, 0)$ is a local minimum, but $f(2, 3) = -5 < f(0, 0)$.
At an interior local extremum of a differentiable function, the [[gradient is zero|0F405477F8]].

## Explanations

### L1 human

A local maximum is a hilltop: it is the highest point in a small disc around it, but a higher hill can exist far away.
A local minimum is the bottom of a valley in the same sense.
