Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to write this simple equation in latex


In which |w| is the norm of w,,

I tried with


And get error "Missing $ inserted"

then I use this


And still get same error..

Does someone know how to solve this problem??

share|improve this question
\frac is a math command so $\frac{2}{\|w\|}$ – David Carlisle Mar 28 '14 at 15:33
Welcome to TeX.SX! – Adam Liter Mar 28 '14 at 15:52

1 Answer 1

You'll need to include the whole thing in a math environment, as \frac is a math command.



Inline: $ \frac{2}{\|w\|}$ \\[2em]

\[ \frac{2}{\|w\|} \]

Numbered Display:
\begin{equation} \frac{2}{\|w\|} \end{equation}




share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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