Arg max

From Wikipedia, the free encyclopedia

In mathematics, arg max (or argmax) stands for the argument of the maximum, that is to say, the value of the given argument for which the value of the given expression attains its maximum value:

\arg \max_x f(x) \in \{x\ |\ \forall y : (y \neq x \Longrightarrow f(y) < f(x))\}

This is well-defined only if the maximum is reached at a single value. Thus

x_0 = \arg \max_x f(x)

holds if and only if x0 is the unique value of x for which f(x) is maximized. So, for example,

\arg \max_{x \in \Bbb{R}} x(10-x) = 5

since the maximum value of x(10 − x) is 25, which happens when x = 5.

However, in case the maximum is reached at many values, arg max can be extended to value a set of solutions.

Then, we have for example

\arg \max_{x \in [0;4\pi]} \cos(x) = \{0;2\pi;4\pi\}

since the maximum value of cos(x) is 1, which happens when x = 0, 2π or 4π.

arg min (or argmin) is defined analogously.

[edit] In LaTeX

LaTeX has no built-in \argmax command. Some people get around this by using \arg\max. This is undesirable, because

  • it causes a small space to appear between the words "arg" and "max" (as seen above),
  • a subscripted variable will appear centered beneath the word "max", instead of centered beneath the whole word.

Both of these effects can be seen in the examples above. The following command can be used to define an \argmax command in LaTeX.

  \newcommand{\argmax}{\operatornamewithlimits{argmax}}

Place it in the header of your LaTeX document. It can then be used as follows:

  \hat{e} = \argmax_{e} \Pr(e | f)

This gives a much nicer appearance. Note, remember to include the line: \usepackage{amsmath} in the preamble in order to make sure the command \operatornamewithlimits is available.

[edit] See also

In other languages