# How to use the argument minimum and argument maximum operators

For a mathematical function, the set of points of the domain in which the function attains its maximal value (in case such exists) is known as the argument of the maximum. Analogously is defined the argument of the minimum. In comparison to the concept of the global maximum or minimum, the argument maximum or minimum refers to the inputs that provide such maximum or minimum outputs.

Since LaTeX is largely used for mathematical writing, the problem arises with how to write the symbols that represent these concepts. Although LaTeX has a great built-in set of symbols, unfortunately, the ones that we are looking for are not included. In the sequel, we will show how one can typeset argmin and argmax arguments in LaTeX.

## 1. argmax/argmin operator in LaTeX

we can combine the \arg and \max symbols, which are built-in, to produce the output:

This can be achieved using the following code:

% Argmax in LaTeX
\documentclass{article}

\begin{document}

$$\arg \max_{x}$$

\end{document}

The same trick can be used to get argmin argument in LaTeX:

% Argmin in LaTeX
\documentclass{article}

\begin{document}

$$\arg \min_{x}$$

\end{document}

which produces the following output:

## 2. Center content under argmin/argmax operator

With the combination \arg\max_{x} (\arg \min{x}), one may not like this easy way out, because the argument x is not centered under the whole function.

In order to fix this, we can load our best friend when working with mathematics in LaTeX, the amsmath package. This package, written by the AMS (American Mathematical Society), provides a large set of tools and symbols to work with mathematics in LaTeX. In particular, it provides the \underset macro to center an argument under a function, like this

% Center content
\documentclass{article}

% Required package
\usepackage{amsmath}

\begin{document}

$$\underset{x}{\arg\max}$$

\end{document}

This code produces the following result:

The same is true for argmin operator:

% Center content
\documentclass{article}

% Required package
\usepackage{amsmath}

\begin{document}

$$\underset{x}{\arg\min}$$

\end{document}

which produces:

This looks nicer than our previous attempt!

We reached the end of this tutorial, If you have any remarks or suggestions, please feel free to reach us via email at admin@latex-tutorial.com