1

What I want to achieve is shown below:

enter image description here

Now from this question, I tried to put in \argmin_{C} to test if it works. However, this returns with an error. What am I supposed to do here? I must mention that what I am trying to achieve is not a subscript.

SDG
  • 161
  • Which error? \argmin is probably not defined by default –  Nov 26 '17 at 11:29
  • that makes sense! So how would I approach this problem? @ChristianHupfer – SDG Nov 26 '17 at 11:32
  • 1
    \usepackage{amsmath} and \DeclareMathOperator*{\argmin}{arg\,min} with \argmin_{C} in display style, most likely –  Nov 26 '17 at 11:36
  • @ChristianHupfer Let me try that! – SDG Nov 26 '17 at 11:38
  • 1
    Also, you should use \DeclareMathOperator{\dist}{dist} (without star) if you don't want dist to look like the product of the four variables d,i,s,t. – Bernard Nov 26 '17 at 11:48

1 Answers1

4
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator{\dist}{\mathit{dist}}
\begin{document}
\begin{equation*}
\argmin_{c_i\in C}\dist(c_i,x)^2
\end{equation*}
\end{document}

enter image description here

  • Though your answer shows the correct code, you might like to improve it by adding some explanatory text, about what the code does / how ist works ;-) – Tobi Nov 26 '17 at 13:58
  • How would you induce space between Ci and C, and also arg min and dist(.) ? – SDG Nov 26 '17 at 23:01