TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.