Local Maximum
A local maximum is a point on a function that is higher than all nearby points, like the top of a hill.
Formula
f(c) \ge f(x) \text{ for all } x \text{ near } c
Definition
A local maximum is the highest point in a neighborhood, like the top of a hill: nearby points are all lower, even if there are higher peaks elsewhere. Formally, $f$ has a local maximum at $c$ if $f(c) \ge f(x)$ for all $x$ in some open interval around $c$ (a strict local maximum if $f(c) > f(x)$ for all such $x \neq c$); if $f$ is differentiable, $f'(c) = 0$ there and $f'$ changes from positive to negative. For smooth $f$, the second-order condition $f''(c) < 0$ is sufficient but not necessary, and in multivariable calculus the Hessian must be negative definite.
Example
A roller coaster has many local maxima at the tops of its hills: each hilltop is higher than the track right around it, but might not be the highest point of the whole ride. For $f(x) = -x^2 + 4x$: $f'(x) = -2x + 4 = 0$ at $x = 2$, and $f''(2) = -2 < 0$ confirms a local (and global) maximum at $f(2) = 4$. But $f(x) = -x^4$ has a local max at $0$ even though $f''(0) = 0$ makes the second derivative test inconclusive.
Key Insight
"Local" means only the immediate neighborhood counts; you do not compare to points far away. A local maximum always occurs at a critical point, but not all critical points are local maxima, so the first or second derivative test distinguishes them. In convex optimization, local maxima of concave functions are global, but in non-convex settings like neural network training, distinguishing local maxima from saddle points is a central challenge.