2

How do I write the below mathematical equations? I am Newbie to this Latex world. please help me

enter image description here

  • 9
    This site normally frowns on "do it for me" requests. Is there a particular aspect of this that you're struggling with? Otherwise, I'd recommend one of the many intros to LaTeX. – Teepeemm May 26 '18 at 12:46
5

I suggest you (a) load the mathtools package, (b) define macros called \argmin (as a "math operator") and \norm (as a "paired delimiter), and (c) use the \substack macro (which is provided by the amsmath package, which is loaded automatically by the mathtools package) to typeset the material below \argmin more compactly.

enter image description here

\documentclass{article}  
\usepackage{mathtools}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\DeclareMathOperator*{\argmin}{argmin}
\begin{document}
\[
R^*=\argmin_{\substack{RR^t=I,\\ \det(R)=1}}
    \sum_{i=1}^n \omega_i \norm{RX_i-Y_i}^2_2,
\]
\end{document}
2

For the equation of R* this can be a useable LaTeX code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
R^*=\underset{RR^t=I,\det(R)=1}{\operatorname{argmin}}\sum_{i=1}^n|RX_i-Y_i\|^2_2,
\]
\end{document}

This will yield:

enter image description here

I partially composed the code for this equation by using the app Mathpix. Then I edited it.

\operatername will show argmin as upright (non-italic) and add an extra space between argmin and the following character. The arguments are still italic, except for det because of the use of \det.

The use of \underset will show the arguments under argmin instead as a subscript. For the summa symbol, the supscripts and superscripts are automatically added above and underneath the symbol.

Everything else is pretty straightforward.

You have to use the package amsmath to be able to use \underset. Have a look at:

How to add text under symbol in equation ?

  • 3
    Do consider writing \sum_{i=1}^n instead of \overset{n}{\underset{i =1}{\sum}. (If MathPix produces the latter output, then that's an indictment of the quality of the code produced by MathPix.) Also, the curly braces in {det} do nothing at all except create code clutter. By writing \det, one gets upright lettering, which is appropriate for math operators; other examples of math operators in LaTeX are \sin, \cos, \lim, and \log` -- and many more. Finally, the expression _{2'} can't be right: the original formula contains a comma at the end, not a "prime" linked to "2". – Mico May 27 '18 at 7:09
  • 1
    Hi @Mico, Mathpix didn't write \overset and \underset for \sum, but I first edited this formula in inline mode and changed to display mode. In inline mode it showed superscripts and subscripts as usual, not on top and above. That's why I overlooked this. I made changes by removing non-functional curly braces. Mathpix did cause the use of a lot curly braces, but I like it to use as a startinpoint. I also overlooked that det was supposed to be upright. Also changed the comma at the end. Thanks, nice to learn from a pro. I think we helped @veeresh, to get on the way enough right now. – JohanFit May 27 '18 at 8:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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