# How to get mathjax to display double digit or negative power to values?

$$x^-3$$

$$x^15$$

$$x^1^5$$

This sucks. What am I doing wrong?

Use {...} to input more than 1 character.

$$3^{15}$$ will be given by 3^{15}

L.Dutch already told you to use curly braces ({}) around the number. So you'd write x^{15} to get $$x^{15}$$.

This applies more generally as well. For example, \sqrt xy will render as $$\sqrt xy$$ but \sqrt{xy} renders as $$\sqrt{xy}$$ and correspondingly \sqrt \sin xy gives you $$\sqrt \sin xy$$ which is probably not what you meant, while \sqrt{\sin{xy}} becomes $$\sqrt{\sin{xy}}$$

As a general rule, any time you need to group multiple symbols in LaTeX (which Mathjax uses), those symbols need to be surrounded by {}.

• Thanks. Out of curiosity, what did happen to my third example? $x^1^5$ I like the box, but how did I create it? – TheDyingOfLight Apr 20 '19 at 19:06
• @TheDyingOfLight It's probably related to the "Double exponent: use braces to clarify" I see in the edit preview. Which is basically just telling you to do it the way you've now been shown. :-) – user Apr 20 '19 at 19:17
• @TheDyingOfLight You can create a box by surrounding an expression with \boxed{}: e.g. $\boxed{x^{15}}$. – Laurel Apr 25 '19 at 2:07