Arg max explained

In mathematics, the arguments of the maxima (abbreviated arg max or argmax) and arguments of the minima (abbreviated arg min or argmin) are the input points at which a function output value is maximized and minimized, respectively.[1] While the arguments are defined over the domain of a function, the output is part of its codomain.

Definition

Given an arbitrary set a totally ordered set and a function, the

\operatorname{argmax}

over some subset

S

of

X

is defined by

\operatorname{argmax}Sf:=\underset{x\inS}{\operatorname{argmax}}f(x):=\{x\inS~:~f(s)\leqf(x)foralls\inS\}.

If

S=X

or

S

is clear from the context, then

S

is often left out, as in

\underset{x}{\operatorname{argmax}}f(x):=\{x~:~f(s)\leqf(x)foralls\inX\}.

In other words,

\operatorname{argmax}

is the set of points

x

for which

f(x)

attains the function's largest value (if it exists).

\operatorname{Argmax}

may be the empty set, a singleton, or contain multiple elements.

In the fields of convex analysis and variational analysis, a slightly different definition is used in the special case where

Y=[-infty,infty]=R\cup\{\pminfty\}

are the extended real numbers. In this case, if

f

is identically equal to

infty

on

S

then

\operatorname{argmax}Sf:=\varnothing

(that is,

\operatorname{argmax}Sinfty:=\varnothing

) and otherwise

\operatorname{argmax}Sf

is defined as above, where in this case

\operatorname{argmax}Sf

can also be written as:

\operatorname{argmax}Sf:=\left\{x\inS~:~f(x)=\sup{}Sf\right\}

where it is emphasized that this equality involving

\sup{}Sf

holds when

f

is not identically

infty

on

Arg min

The notion of

\operatorname{argmin}

(or

\operatorname{argmin}

), which stands for argument of the minimum, is defined analogously. For instance,

\underset{x\inS}{\operatorname{argmin}}f(x):=\{x\inS~:~f(s)\geqf(x)foralls\inS\}

are points

x

for which

f(x)

attains its smallest value. It is the complementary operator of

In the special case where

Y=[-infty,infty]=\R\cup\{\pminfty\}

are the extended real numbers, if

f

is identically equal to

-infty

on

S

then

\operatorname{argmin}Sf:=\varnothing

(that is,

\operatorname{argmin}S-infty:=\varnothing

) and otherwise

\operatorname{argmin}Sf

is defined as above and moreover, in this case (of

f

not identically equal to

-infty

) it also satisfies:

\operatorname{argmin}Sf:=\left\{x\inS~:~f(x)=inf{}Sf\right\}.

Examples and properties

For example, if

f(x)

is

1-|x|,

then

f

attains its maximum value of

1

only at the point

x=0.

Thus

\underset{x}{\operatorname{argmax}}(1-|x|)=\{0\}.

The

\operatorname{argmax}

operator is different from the

max

operator. The

max

operator, when given the same function, returns the of the function instead of the that cause that function to reach that value; in other words

maxxf(x)

is the element in

\{f(x)~:~f(s)\leqf(x)foralls\inS\}.

Like

\operatorname{argmax},

max may be the empty set (in which case the maximum is undefined) or a singleton, but unlike

\operatorname{argmax},

\operatorname{max}

may not contain multiple elements:[2] for example, if

f(x)

is

4x2-x4,

then

\underset{x}{\operatorname{argmax}}\left(4x2-x4\right)=\left\{-\sqrt{2},\sqrt{2}\right\},

but

\underset{x}{\operatorname{max}}\left(4x2-x4\right)=\{4\}

because the function attains the same value at every element of

\operatorname{argmax}.

Equivalently, if

M

is the maximum of

f,

then the

\operatorname{argmax}

is the level set of the maximum:

\underset{x}{\operatorname{argmax}}f(x)=\{x~:~f(x)=M\}=:f-1(M).

We can rearrange to give the simple identity[3]

f\left(\underset{x}{\operatorname{argmax}}f(x)\right)=maxxf(x).

If the maximum is reached at a single point then this point is often referred to as

\operatorname{argmax},

and

\operatorname{argmax}

is considered a point, not a set of points. So, for example,

\underset{x\inR

}\, (x(10 - x)) = 5

(rather than the singleton set

\{5\}

), since the maximum value of

x(10-x)

is

25,

which occurs for

x=5.

[4] However, in case the maximum is reached at many points,

\operatorname{argmax}

needs to be considered a of points.

For example

\underset{x\in[0,4\pi]}{\operatorname{argmax}}\cos(x)=\{0,2\pi,4\pi\}

because the maximum value of

\cosx

is

1,

which occurs on this interval for

x=0,2\pi

or

4\pi.

On the whole real line

\underset{x\inR

}\, \cos(x) = \left\, so an infinite set.

Functions need not in general attain a maximum value, and hence the

\operatorname{argmax}

is sometimes the empty set; for example,

\underset{x\inR

}\, x^3 = \varnothing, since

x3

is unbounded on the real line. As another example,

\underset{x\inR

}\, \arctan(x) = \varnothing, although

\arctan

is bounded by

\pm\pi/2.

However, by the extreme value theorem, a continuous real-valued function on a closed interval has a maximum, and thus a nonempty

\operatorname{argmax}.

See also

Notes and References

  1. For clarity, we refer to the input (x) as points and the output (y) as values; compare critical point and critical value.
  2. Due to the anti-symmetry of

    \leq,

    a function can have at most one maximal value.
  3. This is an identity between sets, more particularly, between subsets of

    Y.

  4. Note that

    x(10-x)=25-(x-5)2\leq25

    with equality if and only if

    x-5=0.