Feed on
Posts
Comments

to write argmax with respect to some variable (i.e. theta), code:

\arg\max_\theta

Stumble it!

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

11 Responses to “how to write argmax in latex”

  1. on 31 Jul 2006 at 12:11 pm Hirak

    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!

  2. on 31 Jul 2006 at 12:12 pm Lawrence David

    cool tip! learned my new trick of the day :)

  3. on 10 Aug 2006 at 11:05 am Nacho Martin

    Nice tip!

    An very useful at this precise moment :)

  4. on 15 Sep 2006 at 4:14 pm Rafa

    you are #1 when one googles “argmax latex”
    you saved me from opening the stupid latex manual

  5. on 19 Sep 2006 at 9:55 am js

    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

  6. on 19 Oct 2006 at 8:01 pm wannabecon

    just a correction, it should be

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

  7. on 23 May 2007 at 12:50 pm yur

    Alternatively,

    \DeclareMathOperator*{\argmax}{arg\,max}

  8. on 11 Oct 2007 at 8:36 pm Bill McNeill

    For the operatornamewithlimits trick to work you have to \usepackage{amsmath}.

  9. on 02 Oct 2008 at 10:26 am aster

    nice one
    Thanks!

  10. on 29 Oct 2008 at 2:55 pm Ryan

    Yeah, I like the \DeclareMathOperator* solution much better. If you’re using LaTeX, you might as well get all the alignment correct, right?

  11. on 06 Nov 2008 at 1:42 pm ganesh

    Thanks for this tip. It was very useful

Did I get this wrong? Let me know!

Trackback URI | Comments RSS

More blogs about http://desk.stinkpot.org:8080/tricks.