How can I get a symbol below a word?
3,320
I think you are looking for an operator \argmax
which can be defined in the following way (needs amsmath
)
\DeclareMathOperator*{\argmax}{arg\,max}
To have "theta below argmax in the middle" in inline math, you have to specify \limits
when using it.
MWE:
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator*{\argmax}{arg\,max}
\begin{document}
\noindent Inline math: $\theta_i = \argmax\limits_{\theta} Q(\theta, \theta_i)$
\bigskip\bigskip
\noindent Displayed math
\[\theta_i = \argmax_{\theta} Q(\theta, \theta_i)\]
\end{document}
Output
Related videos on Youtube
Author by
MSKantulu
A computer science student. Presently working on Machine learning. Also I am learning Python,R and Latex.
Updated on August 10, 2020Comments
-
MSKantulu about 3 years
I wanted to get theta below argmax in the middle . I used the following code:
\usepackage{amsmath,amssymb,graphicx,enumerate,algorithm} \begin{document} $\theta_i$ = $argmax_{\theta} Q(\theta, \theta_i)$ \end{document}
-
daleif about 7 years(1) welcome, (2) the limit only goes under the argmax when it is used in display math context, you are using
$...$
which is inline math mode, there the limit is not shown below argmax as it will disturb the line spacing. -
daleif about 7 yearsBTW: next time please provide a full example, you are missing the document class. Besides in your formula, the two middle
$
are not needed, the=
should also be math mode -
Admin about 7 yearsYou can highlight code in your post using back-ticks. For code-blocks indent them by four spaces or use the
{}
on the gui.
-
-
MSKantulu about 7 years@egreg I could get the format of code for answers and questions by using the back-quote but same didn't work for writing a code snippet in the comment section. Could you please explain?
-
egreg about 7 years@MSKantulu Comments obey slightly different rules; for instance, in order to print
\\
you need double back quotes. -
MSKantulu about 7 years@egreg can you give any helping link for these formatting stuffs in comments? The double back quotes didn't get me on the next line
-
egreg about 7 years@MSKantulu Look at posts under meta.tex.stackexchange.com/search?q=code+comment