Given a function $f$:we want to find the points $x$ of the domain of $f$ where the value of $f$ is smaller (for minima, or larger for maxima) than all other points in some neighbourhood of $x$.

- from some space. For beginners the real numbers but more generally topological spaces should work in general
- to the real numbers

In the case of Functionals, this problem is treated under the theory of the calculus of variations.