How to Use Subscript and Superscript in LaTeX 📐
If you're writing scientific papers, mathematical equations, or technical documents, you'll eventually need to format text that sits above or below the baseline. Subscript (text positioned lower) and superscript (text positioned higher) are standard formatting tools in LaTeX, and they work differently depending on whether you're in math mode or regular text mode.
This guide walks you through the mechanics of both, when to use each, and common pitfalls that trip up newcomers.
What Subscript and Superscript Actually Do
Subscript reduces and lowers text below the baseline—commonly used for variable indices (like x₂ in a series) or chemical formulas (H₂O).
Superscript reduces and raises text above the baseline—typically for exponents (x²), footnote markers, or ordinal indicators (1ˢᵗ).
The key distinction is that LaTeX treats these differently depending on context. In math mode (inside dollar signs or equation environments), subscript and superscript commands work automatically and predictably. In text mode (regular prose), they require additional packages or workarounds.
Subscript and Superscript in Math Mode
Math mode is where subscript and superscript work most naturally.
The Underscore for Subscript
In math mode, use the underscore character (_) to create subscript:
