[Tex/LaTex] error-how to solve the Undefined control sequence

equations

Undefined control sequence.
l.226 ... 1}} = \mathop {\arg \min }\limits_X {\rm
                                                  { }}L(X,{Y_k},{Z_k},\beta )\\

How to solve issue?
which is from:

\begin{equation}
\begin{array}{l}
{X_{k + 1}} = \mathop {\arg \min }\limits_X {\rm{ }}L(X,{Y_k},{Z_k},\beta 
)\\
{\rm{       }} = \mathop {\arg \min }\limits_X {\rm{ }}{\left\| X 
\right\|_*} + {\raise0.7ex\hbox{$\beta $} \!\mathord{\left/
{\vphantom {\beta  2}}\right.\kern-\nulldelimiterspace}
\!\lower0.7ex\hbox{$2$}}\left\| {X - (Y_k - {\raise0.7ex\hbox{$1$} 
\!\mathord{\left/
{\vphantom {1 \beta }}\right.\kern-\nulldelimiterspace}
\!\lower0.7ex\hbox{$\beta $}}Z_k)} \right\|_F^2
\end{array}
\end{equation}

Can anyone help me solve this error?

Best Answer

You have reformatted the error message which obscures which command is undefined.

Also you did not provide a test file.

If you set your example using article it works without error

\documentclass{article}

\begin{document}

\begin{equation}
\begin{array}{l}
{X_{k + 1}} = \mathop {\arg \min }\limits_X {\rm{ }}L(X,{Y_k},{Z_k},\beta 
)\\
{\rm{       }} = \mathop {\arg \min }\limits_X {\rm{ }}{\left\| X 
\right\|_*} + {\raise0.7ex\hbox{$\beta $} \!\mathord{\left/
{\vphantom {\beta  2}}\right.\kern-\nulldelimiterspace}
\!\lower0.7ex\hbox{$2$}}\left\| {X - (Y_k - {\raise0.7ex\hbox{$1$} 
\!\mathord{\left/
{\vphantom {1 \beta }}\right.\kern-\nulldelimiterspace}
\!\lower0.7ex\hbox{$\beta $}}Z_k)} \right\|_F^2
\end{array}
\end{equation}
\end{document}

\documentclass{scrartcl}

koma script defines \rm to give an error:

! Class scrartcl Error: undefined old font command `\rm'.

See the scrartcl class documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.7 ... + 1}} = \mathop {\arg \min }\limits_X {\rm
                                                  { }}L(X,{Y_k},{Z_k},\beta
? 

other classes may not define \rm at all in which case you get the primitive undefined command error message but again with a line break highlighting the issue

\documentclass{minimal}

! Undefined control sequence.
l.7 ... + 1}} = \mathop {\arg \min }\limits_X {\rm
                                                  { }}L(X,{Y_k},{Z_k},\beta
? 

Normally use of \rm should be replaced by \mathrm but here it is applied to nothing so it is simpler just to delete it \{\rm{ }} is the same as {}.

A more reasonable markup might be

enter image description here

\documentclass{article}

\usepackage{amsmath,nicefrac}
\begin{document}

\begin{equation}
\begin{aligned}
X_{k + 1} &= \mathop {\arg \min }_X L(X,{Y_k},{Z_k},\beta)\\
& = \mathop {\arg \min }_X \| X\|_* + \nicefrac{\beta}{2}
\| X - (Y_k - \nicefrac{1}{\beta}Z_k)\|_F^2
\end{aligned}
\end{equation}
\end{document}