Let f:E→Rf:E\to\mathbb{R} with E⊆XE\subseteq X where (X,d)(X,d) is a , and let a∈Ea\in E.

  • The point aa is a local maximum of ff if there exists r>0r>0 such that for all x∈E∩B(a,r)x\in E\cap B(a,r),
    f(x)≤f(a).f(x)\le f(a).
  • The point aa is a local minimum of ff if there exists r>0r>0 such that for all x∈E∩B(a,r)x\in E\cap B(a,r),
    f(a)≤f(x).f(a)\le f(x).
Remarks

Local extrema are "nearby" maxima/minima. In one-variable calculus, local extrema in the interior of an are closely tied to and tests.

Examples
  • For f(x)=x2f(x)=x^2 on R\mathbb{R}, 00 is a local minimum.
  • For f(x)=−x2f(x)=-x^2 on R\mathbb{R}, 00 is a local maximum.
  • For f(x)=x3f(x)=x^3 on R\mathbb{R}, there are no local maxima or minima (even though f′(0)=0f'(0)=0).