FormaTeX
FatalMath Mode

Double Subscript

! Double subscript.

What this error means

Two consecutive subscript operators _ were applied to the same base without grouping. LaTeX doesn't allow ambiguous stacked subscripts.

Common causes

  • Writing x_i_j instead of x_{ij} or x_{i_j} for nested subscripts
  • Accidentally adding a second _ after a command that already has a subscript

How to fix it

Use braces {} to group subscripts. For nested subscripts like x with index i,j write x_{ij} or x_{i_j}. For a subscript that itself has a subscript, wrap the inner expression in braces.

Code examples

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

\[ x_i_j = 0 \]

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

\[ x_{i_j} = 0 \]

\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