Arg max

From HandWiki
Short description: Inputs at which function values are highest
As an example, both unnormalised and normalised sinc functions above have [math]\displaystyle{ \operatorname{argmax} }[/math] 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 [math]\displaystyle{ X }[/math], a totally ordered set [math]\displaystyle{ Y }[/math], and a function, [math]\displaystyle{ f\colon X \to Y }[/math], the [math]\displaystyle{ \operatorname{argmax} }[/math] over some subset [math]\displaystyle{ S }[/math] of [math]\displaystyle{ X }[/math] is defined by

[math]\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 \}. }[/math]

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

[math]\displaystyle{ \operatorname{argmax}_S f := \left\{ x \in S ~:~ f(x) = \sup {}_S f \right\} }[/math]

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

Arg min

The notion of [math]\displaystyle{ \operatorname{argmin} }[/math] (or [math]\displaystyle{ \operatorname{arg\,min} }[/math]), which stands for argument of the minimum, is defined analogously. For instance,

[math]\displaystyle{ \underset{x \in S}{\operatorname{arg\,min}} \, f(x) := \{ x \in S ~:~ f(s) \geq f(x) \text{ for all } s \in S \} }[/math]

are points [math]\displaystyle{ x }[/math] for which [math]\displaystyle{ f(x) }[/math] attains its smallest value. It is the complementary operator of [math]\displaystyle{ \operatorname{arg\,max} }[/math].

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

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

Examples and properties

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

[math]\displaystyle{ \underset{x}{\operatorname{arg\,max}}\, (1 - |x|) = \{ 0 \}. }[/math]

The [math]\displaystyle{ \operatorname{argmax} }[/math] operator is different from the [math]\displaystyle{ \max }[/math] operator. The [math]\displaystyle{ \max }[/math] 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

[math]\displaystyle{ \max_x f(x) }[/math] is the element in [math]\displaystyle{ \{ f(x) ~:~ f(s) \leq f(x) \text{ for all } s \in S \}. }[/math]

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

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

[math]\displaystyle{ \underset{x}{\operatorname{arg\,max}} \, f(x) = \{ x ~:~ f(x) = M \} =: f^{-1}(M). }[/math]

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

[math]\displaystyle{ f\left(\underset{x}{\operatorname{arg\,max}} \, f(x) \right) = \max_x f(x). }[/math]

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

[math]\displaystyle{ \underset{x\in\mathbb{R}}{\operatorname{arg\,max}}\, (x(10 - x)) = 5 }[/math]

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

For example

[math]\displaystyle{ \underset{x \in [0, 4 \pi]}{\operatorname{arg\,max}}\, \cos(x) = \{ 0, 2 \pi, 4 \pi \} }[/math]

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

[math]\displaystyle{ \underset{x \in \mathbb{R}}{\operatorname{arg\,max}}\, \cos(x) = \left\{ 2 k \pi ~:~ k \in \mathbb{Z} \right\}, }[/math] so an infinite set.

Functions need not in general attain a maximum value, and hence the [math]\displaystyle{ \operatorname{argmax} }[/math] is sometimes the empty set; for example, [math]\displaystyle{ \underset{x\in\mathbb{R}}{\operatorname{arg\,max}}\, x^3 = \varnothing, }[/math] since [math]\displaystyle{ x^3 }[/math] is unbounded on the real line. As another example, [math]\displaystyle{ \underset{x \in \mathbb{R}}{\operatorname{arg\,max}}\, \arctan(x) = \varnothing, }[/math] although [math]\displaystyle{ \arctan }[/math] is bounded by [math]\displaystyle{ \pm\pi/2. }[/math] However, by the extreme value theorem, a continuous real-valued function on a closed interval has a maximum, and thus a nonempty [math]\displaystyle{ \operatorname{argmax}. }[/math]

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

References

  1. "The Unnormalized Sinc Function ", University of Sydney
  2. 2.0 2.1 2.2 Rockafellar & Wets 2009, pp. 1-37.

External links