FormaTeX
FatalMath Mode

Double Superscript

! Double superscript.

What this error means

Two consecutive superscript operators ^ were applied to the same base without grouping. Just like double subscript, LaTeX refuses ambiguous stacked superscripts.

Common causes

  • Writing x^a^b instead of x^{ab} or x^{a^b}
  • Accidentally adding a second ^ after a command with a superscript
  • Template substitution that introduces an extra ^

How to fix it

Group the superscript content with braces. For x to the power of a+b, write x^{a+b}. For x to the power of a to the power of b, write x^{a^b}.

Code examples

Causes the error
\documentclass{article}
\usepackage{amsmath}
\begin{document}

\[ e^x^2 \]

\end{document}
Fixed
\documentclass{article}
\usepackage{amsmath}
\begin{document}

\[ e^{x^2} \]

\end{document}

Related errors

Test the fix live

Paste your LaTeX into the playground and compile instantly.

One quick thing

We track anonymous usage — page views, feature usage, compilation events — to understand what works and what doesn't. No ads, no personal data, no third-party sharing.

Cookie policy