When faced with an optimization problem, the goal can be:

- to find optimal parameters $\mathbf{x}^{*}$ for which $f(\mathbf{x}^{*})$ has the least possible value (in which case we refer to it as a minimization problem), or
- to find optimal parameters $\mathbf{x}^{*}$ for which $f(\mathbf{x}^{*})$ has the greatest possible value –in which case we refer to it as a maximization problem.to find optimal parameters $\mathbf{x}^{*}$ for which $f(\mathbf{x}^{*})$ has the greatest possible value –in which case we refer to it as a maximization problem.

The space of values of $\mathbf{x}$ considered as possible solutions is called the domain of f and is noted $\dom f$. We now give a formal definition.

It is often very hard to find a global optimum because it is defined as being better than all possible values of $\mathbf{x}$ in the available domain. Therefore it is sometimes necessary to consider only the simpler problem of local optimization.

The definition of a local maximum is analogous with $f(\mathbf{x}^{*})\geq f(\mathbf{x})$.

In other words, $\mathbf{x}^{*}$ is a local minimum if it is possible to find a small neighborhood of $\mathbf{x}^{*}$ such that $\mathbf{x}^{*}$ is a global minimum of the restriction of $f$ to this neighborhood. See Figure “Global and local optima” for a visual representation of global and local optima of a simple function. In particular, any global optimum is also a local optimum for which any choice of neighborhood is acceptable.

**Figure 1:**A visualisation of Global and local optima