• Free forever
  • No sign-up
  • Private — runs in your browser

Subscripts and superscripts in LaTeX

The LaTeX command for subscripts and superscripts is x_{i}^{2}. Try it in the editor below.

Loading the math renderer…

How to write subscripts and superscripts in LaTeX

Use x_{i}^{2} in math mode — between $…$ in a document, or directly in the editor above.

LaTeX commandx_{i}^{2}
NotesUse braces for more than one character: x_{10}

Example

a_{n+1} = a_n^2

The editor above is pre-filled with this example — tweak it and export it as PNG, SVG or a Word equation.

More structures

SymbolCommand
Matrix\begin{pmatrix} a & b \\ c & d \end{pmatrix}
Cases (piecewise function)\begin{cases} a & x > 0 \\ b & x \le 0 \end{cases}
Binomial coefficient\binom{n}{k}
Absolute value\lvert x \rvert
⌊⌋\lfloor x \rfloor

See every LaTeX symbol →

Related

← Back to the full LaTeX Equation Editor