Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can you get the argmin or argmax in Latex? Two solutions I found are:

\underset{x}{\operatorname{argmax}} 

\DeclareMathOperator*{\argmin}{arg\,min}

Any other ideas?

[1] http://www.breakthru.altervista.org/?p=27

[2] http://researchonsearch.blogspot.com/2007/05/enter-argmax-argmin-in-latex.html

share|improve this question
16  
How do these solutions (especially the second) feel not right? The \DeclareMathOperator is the way to go in this case. – Pieter Nov 11 '10 at 17:57
The second one use italics for argmin. Most reference I see use the normal font for argmin. The first one use the normal font and works OK, but looks a little cumbersome to me. I wonder if there is an of the shelf solution, given that argmin is a relatively common symbol. – Alejandro Nov 11 '10 at 18:52
4  
No, it does not use italics. Did you try it? – Jukka Suomela Nov 11 '10 at 19:18
You are right. I tried before but forgot the \ in front of \argmin. Stupid me. – Alejandro Nov 11 '10 at 21:24
2  
It would really help, when asking this kind of questions, to specify what is wrong with the solutions you found, and what features are you actually looking for. – Jan Hlavacek Nov 12 '10 at 3:37

2 Answers

up vote 28 down vote accepted

As Pieter says in his comment, \DeclareMathOperator*{\argmin}{arg\,min} is indeed the correct LaTeX way to do that.

share|improve this answer
12  
If you use \DeclareMathOperator*{\argmin}{\arg\!\min} you get rid of the ugly space between arg and min. – rbp Apr 6 '11 at 21:39
2  
@rbp Why should one use \arg\min when simply argmin does the same? – egreg Jul 8 '12 at 15:31
@egreg you're right. I arrived at this one from some experimentation with other options, and didn't look back :) – rbp Jul 9 '12 at 11:56
And don't forget to load the "amsmath" package... \usepackage{amsmath} \DeclareMathOperator*{\argmin}{arg\,min} etc. – user24477 Jan 16 at 15:49

I use \newcommand{\argmin}{\operatornamewithlimits{argmin}}.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.