Arg max

Inputs at which function values are highest
As an example, both unnormalised and normalised sinc functions above have argmax {\displaystyle \operatorname {argmax} } of {0} because both attain their global maximum value of 1 at x = 0.

The unnormalised sinc function (red) has arg min of {−4.49, 4.49}, approximately, because it has 2 global minimum values of approximately −0.217 at x = ±4.49. However, the normalised sinc function (blue) has arg min of {−1.43, 1.43}, approximately, because their global minima occur at x = ±1.43, even though the minimum value is the same.[1]

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.[note 1] While the arguments are defined over the domain of a function, the output is part of its codomain.

Definition

Given an arbitrary set X {\displaystyle X} , a totally ordered set Y {\displaystyle Y} , and a function, f : X Y {\displaystyle f\colon X\to Y} , the argmax {\displaystyle \operatorname {argmax} } over some subset S {\displaystyle S} of X {\displaystyle X} is defined by

argmax S f := a r g m a x x S f ( x ) := { x S   :   f ( s ) f ( x )  for all  s S } . {\displaystyle \operatorname {argmax} _{S}f:={\underset {x\in S}{\operatorname {arg\,max} }}\,f(x):=\{x\in S~:~f(s)\leq f(x){\text{ for all }}s\in S\}.}

If S = X {\displaystyle S=X} or S {\displaystyle S} is clear from the context, then S {\displaystyle S} is often left out, as in a r g m a x x f ( x ) := { x   :   f ( s ) f ( x )  for all  s X } . {\displaystyle {\underset {x}{\operatorname {arg\,max} }}\,f(x):=\{x~:~f(s)\leq f(x){\text{ for all }}s\in X\}.} In other words, argmax {\displaystyle \operatorname {argmax} } is the set of points x {\displaystyle x} for which f ( x ) {\displaystyle f(x)} attains the function's largest value (if it exists). Argmax {\displaystyle \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 = [ , ] = R { ± } {\displaystyle Y=[-\infty ,\infty ]=\mathbb {R} \cup \{\pm \infty \}} are the extended real numbers.[2] In this case, if f {\displaystyle f} is identically equal to {\displaystyle \infty } on S {\displaystyle S} then argmax S f := {\displaystyle \operatorname {argmax} _{S}f:=\varnothing } (that is, argmax S := {\displaystyle \operatorname {argmax} _{S}\infty :=\varnothing } ) and otherwise argmax S f {\displaystyle \operatorname {argmax} _{S}f} is defined as above, where in this case argmax S f {\displaystyle \operatorname {argmax} _{S}f} can also be written as:

argmax S f := { x S   :   f ( x ) = sup S f } {\displaystyle \operatorname {argmax} _{S}f:=\left\{x\in S~:~f(x)=\sup {}_{S}f\right\}}

where it is emphasized that this equality involving sup S f {\displaystyle \sup {}_{S}f} holds only when f {\displaystyle f} is not identically {\displaystyle \infty } on S {\displaystyle S} .[2]

Arg min

The notion of argmin {\displaystyle \operatorname {argmin} } (or a r g m i n {\displaystyle \operatorname {arg\,min} } ), which stands for argument of the minimum, is defined analogously. For instance,

a r g m i n x S f ( x ) := { x S   :   f ( s ) f ( x )  for all  s S } {\displaystyle {\underset {x\in S}{\operatorname {arg\,min} }}\,f(x):=\{x\in S~:~f(s)\geq f(x){\text{ for all }}s\in S\}}

are points x {\displaystyle x} for which f ( x ) {\displaystyle f(x)} attains its smallest value. It is the complementary operator of a r g m a x {\displaystyle \operatorname {arg\,max} } .

In the special case where Y = [ , ] = R { ± } {\displaystyle Y=[-\infty ,\infty ]=\mathbb {R} \cup \{\pm \infty \}} are the extended real numbers, if f {\displaystyle f} is identically equal to {\displaystyle -\infty } on S {\displaystyle S} then argmin S f := {\displaystyle \operatorname {argmin} _{S}f:=\varnothing } (that is, argmin S := {\displaystyle \operatorname {argmin} _{S}-\infty :=\varnothing } ) and otherwise argmin S f {\displaystyle \operatorname {argmin} _{S}f} is defined as above and moreover, in this case (of f {\displaystyle f} not identically equal to {\displaystyle -\infty } ) it also satisfies:

argmin S f := { x S   :   f ( x ) = inf S f } . {\displaystyle \operatorname {argmin} _{S}f:=\left\{x\in S~:~f(x)=\inf {}_{S}f\right\}.} [2]

Examples and properties

For example, if f ( x ) {\displaystyle f(x)} is 1 | x | , {\displaystyle 1-|x|,} then f {\displaystyle f} attains its maximum value of 1 {\displaystyle 1} only at the point x = 0. {\displaystyle x=0.} Thus

a r g m a x x ( 1 | x | ) = { 0 } . {\displaystyle {\underset {x}{\operatorname {arg\,max} }}\,(1-|x|)=\{0\}.}

The argmax {\displaystyle \operatorname {argmax} } operator is different from the max {\displaystyle \max } operator. The max {\displaystyle \max } operator, when given the same function, returns the maximum value of the function instead of the point or points that cause that function to reach that value; in other words

max x f ( x ) {\displaystyle \max _{x}f(x)} is the element in { f ( x )   :   f ( s ) f ( x )  for all  s S } . {\displaystyle \{f(x)~:~f(s)\leq f(x){\text{ for all }}s\in S\}.}

Like argmax , {\displaystyle \operatorname {argmax} ,} max may be the empty set (in which case the maximum is undefined) or a singleton, but unlike argmax , {\displaystyle \operatorname {argmax} ,} max {\displaystyle \operatorname {max} } may not contain multiple elements:[note 2] for example, if f ( x ) {\displaystyle f(x)} is 4 x 2 x 4 , {\displaystyle 4x^{2}-x^{4},} then a r g m a x x ( 4 x 2 x 4 ) = { 2 , 2 } , {\displaystyle {\underset {x}{\operatorname {arg\,max} }}\,\left(4x^{2}-x^{4}\right)=\left\{-{\sqrt {2}},{\sqrt {2}}\right\},} but max x ( 4 x 2 x 4 ) = { 4 } {\displaystyle {\underset {x}{\operatorname {max} }}\,\left(4x^{2}-x^{4}\right)=\{4\}} because the function attains the same value at every element of argmax . {\displaystyle \operatorname {argmax} .}

Equivalently, if M {\displaystyle M} is the maximum of f , {\displaystyle f,} then the argmax {\displaystyle \operatorname {argmax} } is the level set of the maximum:

a r g m a x x f ( x ) = { x   :   f ( x ) = M } =: f 1 ( M ) . {\displaystyle {\underset {x}{\operatorname {arg\,max} }}\,f(x)=\{x~:~f(x)=M\}=:f^{-1}(M).}

We can rearrange to give the simple identity[note 3]

f ( a r g m a x x f ( x ) ) = max x f ( x ) . {\displaystyle f\left({\underset {x}{\operatorname {arg\,max} }}\,f(x)\right)=\max _{x}f(x).}

If the maximum is reached at a single point then this point is often referred to as the argmax , {\displaystyle \operatorname {argmax} ,} and argmax {\displaystyle \operatorname {argmax} } is considered a point, not a set of points. So, for example,

a r g m a x x R ( x ( 10 x ) ) = 5 {\displaystyle {\underset {x\in \mathbb {R} }{\operatorname {arg\,max} }}\,(x(10-x))=5}

(rather than the singleton set { 5 } {\displaystyle \{5\}} ), since the maximum value of x ( 10 x ) {\displaystyle x(10-x)} is 25 , {\displaystyle 25,} which occurs for x = 5. {\displaystyle x=5.} [note 4] However, in case the maximum is reached at many points, argmax {\displaystyle \operatorname {argmax} } needs to be considered a set of points.

For example

a r g m a x x [ 0 , 4 π ] cos ( x ) = { 0 , 2 π , 4 π } {\displaystyle {\underset {x\in [0,4\pi ]}{\operatorname {arg\,max} }}\,\cos(x)=\{0,2\pi ,4\pi \}}

because the maximum value of cos x {\displaystyle \cos x} is 1 , {\displaystyle 1,} which occurs on this interval for x = 0 , 2 π {\displaystyle x=0,2\pi } or 4 π . {\displaystyle 4\pi .} On the whole real line

a r g m a x x R cos ( x ) = { 2 k π   :   k Z } , {\displaystyle {\underset {x\in \mathbb {R} }{\operatorname {arg\,max} }}\,\cos(x)=\left\{2k\pi ~:~k\in \mathbb {Z} \right\},} so an infinite set.

Functions need not in general attain a maximum value, and hence the argmax {\displaystyle \operatorname {argmax} } is sometimes the empty set; for example, a r g m a x x R x 3 = , {\displaystyle {\underset {x\in \mathbb {R} }{\operatorname {arg\,max} }}\,x^{3}=\varnothing ,} since x 3 {\displaystyle x^{3}} is unbounded on the real line. As another example, a r g m a x x R arctan ( x ) = , {\displaystyle {\underset {x\in \mathbb {R} }{\operatorname {arg\,max} }}\,\arctan(x)=\varnothing ,} although arctan {\displaystyle \arctan } is bounded by ± π / 2. {\displaystyle \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 argmax . {\displaystyle \operatorname {argmax} .}

See also

Notes

  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 , {\displaystyle \,\leq ,} a function can have at most one maximal value.
  3. ^ This is an identity between sets, more particularly, between subsets of Y . {\displaystyle Y.}
  4. ^ Note that x ( 10 x ) = 25 ( x 5 ) 2 25 {\displaystyle x(10-x)=25-(x-5)^{2}\leq 25} with equality if and only if x 5 = 0. {\displaystyle x-5=0.}

References

  1. ^ "The Unnormalized Sinc Function Archived 2017-02-15 at the Wayback Machine", University of Sydney
  2. ^ a b c Rockafellar & Wets 2009, pp. 1–37.

External links