Local optimum, global optimum

The term extremum or extreme value is used in mathematics to refer to a value of a function (perhaps subject to constraints) which is either a maximum or a minimum. The word optimum is used for the particular type of extremum desired in the problem at hand. For instance, if f(x, y) (perhaps with x and y subject to constraints) is a "cost function," then the type of extremum one may seek is a minimum; the optimum is the minimum value of f(x,y), and it is desired to find a pair (xo,yo) at which this minimum is attained. But if f (x,y) were an "output function," then the optimum would be a maximum. Note that the term extremal point is used to refer to a point in the domain of definition of the function which yields an extremum of the function. It is a well known fact that a continuous function attains its maxima and minima on a compact domain of definition.

A point P = (x1, …, xn) of a domain D on which a function f(x1, …, xn) is defined is an absolute maximum in D if the following inequality holds for any point of the domain D:

f(x1, …, xn) f(x1, …, xn).

Example of how the differentiate between local and global can be the following: Think of the mountain climbing analogy used above. The program may arrive at the top of a small hill (with all local directions pointing downhill) and hence proclaim an optimum. But there might be a very large mountain just out of sight, with a much higher peak.