Optimization is the process of choosing the "best" value among possible values. They are often formulated as questions on the minimization/maximization of functions, with or without constraints.

In mathematics, computer science, economics, or management science, mathematical optimization (alternatively, optimization or mathematical programming) is the selection of a best element (with regard to some criteria) from some set of available alternatives.

An optimization problem can be represented in the following way: given a function $f:A\to\mathbb{R}$ from some set $A$ to the real numbers, we want to find an element $x_0\in A$ such that $f(x_0)\le f(x)$ for all $x \in A$ ("minimization") or such that $f(x_0)\ge f(x)$ for all $x \in A$ ("maximization").