Local maximum (source code)

= Local maximum
{title2=$f(x)\leq f(x_*)\quad\text{near }x_*$}

= Local maxima
{synonym}

A <real-valued function> $f:D\to\mathbb R$, with $D\subseteq\mathbb R^n$, has a local maximum at $x_*$ if some $\delta>0$ satisfies
$$
f(x)\leq f(x_*)\qquad\text{for all }x\in D\text{ with }\|x-x_*\|<\delta.
$$
Only a <neighbourhood> within the <domain of a function> is compared. Equality is allowed; a <strict local maximum> requires $f(x)<f(x_*)$ for every other point in that <neighbourhood>. A <constant function> therefore has a <local maximum> and a <local minimum> at every input, with neither strict. This is a local form of an <extremum of a real-valued function>.

For $f(x)=x^4-2x^2$, zero is a <strict local maximum> because $f(x)=x^2(x^2-2)<0=f(0)$ when $0<|x|<\sqrt2$. It is not a <global maximum>: values far away grow without bound. This distinction makes a <local maximum> useful for describing a nearby peak without claiming that it is the highest value anywhere.

Negating the <function> exchanges <local maxima> and <local minima>, including their strict versions. At a smooth <interior> <local maximum>, the <critical point> argument forces zero <gradient>; for a <function> twice continuously <differentiable> nearby, its <Hessian matrix> is <negative semidefinite>. These necessary conditions alone do not establish a <local maximum>.