how to write argmax in latex
March 29th, 2006 by Lawrence David
to write argmax with respect to some variable (i.e. theta), code:
\arg\max_\theta
March 29th, 2006 by Lawrence David
to write argmax with respect to some variable (i.e. theta), code:
\arg\max_\theta
Nice blog for LATEX stuff. Keep it up!
**
The above works quite well though it leaves an extra space between the ARG and MAX. To avoid it use the negative space command:
arg ! max_theta
hth!
cool tip! learned my new trick of the day
Nice tip!
An very useful at this precise moment
you are #1 when one googles “argmax latex”
you saved me from opening the stupid latex manual
with this solution the subscripted variable will appear centered beneath the word “max”, instead of centered beneath the whole word. i found a way to solve this on wikipedia:
place the following command in the header of your latex document:
newcommand{argmax}{operatornamewithlimits{argmax}}
now you can use it like this:
argmax_theta
just a correction, it should be
\newcommand{\argmax}{\operatornamewithlimits{argmax}}
Alternatively,
\DeclareMathOperator*{\argmax}{arg\,max}
For the operatornamewithlimits trick to work you have to \usepackage{amsmath}.
nice one
Thanks!
Yeah, I like the \DeclareMathOperator* solution much better. If you’re using LaTeX, you might as well get all the alignment correct, right?
Thanks for this tip. It was very useful
Sweet. Thanks for the tip!
Still helping in 2009
\underset{x}{\operatorname{argmax}}
Yeah,\newcommand{\argmax}{\operatornamewithlimits{argmax}} didn’t quite do the job for me, but when combined with the underset it works great ^_^
Thanks to all!
Awesome! Useful post and comments Thanks!
great!
\newcommand{\argmax}{\operatornamewithlimits{argmax}} combined with the use of package amsmath is fine for the environment “displaymath” and similar, but whenever used with $$ (for using it “inside” the text) is not working properly. \underset{x}{\operatorname{argmax}} solves this problem
thanks a lot!! (never thought that would get so complicated!)
\newcommand{\argmax}[1]{\underset{#1}{\operatorname{argmax}}}
Thanks a lot to everyone! the last one, i was able to get it worked correctly.
Thanks all.
Sweet, work in LyX as well.
the last one didn’t work for me using WinEdt 6.0, this worked instead:
\newcommand{\argmax}[1]{\operatorname*{argmax}_{#1}}
\arg\max\limits_{\theta}