Subscript in LaTeX uses the underscore character

To write subscript in LaTeX, place an underscore _ before the character or group of characters you want to lower. In math mode, type $H_2O$ to produce H with a 2 subscripted below it, followed by O. In text mode outside of math, you need to enter math mode first with dollar signs or other delimiters.

The underscore only affects the single character immediately after it unless you use curly braces. If you want multiple characters subscripted, wrap them in braces: $x_{abc}$ subscripts all three letters, while $x_abc$ subscripts only the a.

This works in any LaTeX document type — article, report, book, or presentation — and the subscript automatically scales to the correct size based on context.

Key Takeaways

  • Use the underscore character _ followed by the character or group you want subscripted, always inside math mode delimited by dollar signs.
  • Single characters subscript automatically: $x_2$ produces x with 2 below it, but $x_12$ subscripts only the 1.
  • Wrap multiple characters in curly braces to subscript them together: $x_{12}$ subscripts both digits as a unit.
  • Subscript works the same way in inline math ($...$) and display math ($$...$$), and scales automatically in different contexts.

Single character subscript

When you subscript a single character, you do not need braces. Type $a_1$ and LaTeX produces a with 1 subscripted. The underscore tells LaTeX to take the next character and place it below and to the right of the preceding character.

This is the fastest way to write simple subscripts like variable indices or chemical formulas with one subscript element. Examples: $x_i$, $y_n$, $C_3$.

Multiple character subscript with braces

When you want more than one character subscripted, wrap them in curly braces immediately after the underscore. Type $x_{max}$ to subscript all three letters m, a, x together. Without braces, $x_max$ subscripts only the m, and a and x appear at normal size.

Braces group the subscript as a single unit, so LaTeX treats everything inside them as one subscript block. This works for numbers, letters, and mixed content: $H_{2}O$, $T_{final}$, $a_{n+1}$.

Subscript in inline versus display math

Subscript works identically in both inline math (text mixed with equations) and display math (equations on their own line). Inline math uses single dollar signs: write The formula $E=mc^2$ shows energy and the subscript behaves the same as in display mode.

The only difference is size: in display math, subscripts appear larger because the entire equation is larger. LaTeX handles the scaling automatically — you write the same code and it adjusts. For display math, use double dollar signs or the equation environment: $$x_1 + x_2 = y$$.

Subscript with special characters and expressions

You can subscript not just letters and numbers, but also expressions. Type $x_{i+1}$ to subscript i+1 as a unit, or $a_{n-1}$ for n-1. The braces ensure LaTeX treats the entire expression as the subscript.

For Greek letters or other special symbols in subscripts, use the command inside braces: $x_{\alpha}$ subscripts the Greek letter alpha. Fractions, roots, and other complex expressions can also be subscripted: $y_{1/2}$ or $z_{\sqrt{2}}$.

Combining subscript and superscript

You can write both subscript and superscript on the same character by using both underscore and caret. Type $x_i^2$ to produce x with i subscripted and 2 superscripted, or $x^2_i$ — the order does not matter. LaTeX places them correctly regardless of which you write first.

If either the subscript or superscript contains multiple characters, use braces: $x_{i}^{2}$ or $x^{n+1}_{max}$. This keeps the code clear and ensures LaTeX interprets the grouping correctly.

Common mistakes and how to fix them

The most common error is forgetting braces when subscripting multiple characters. If you write $x_12$ expecting both digits subscripted, only the 1 subscripts — the 2 appears at normal size. Add braces: $x_{12}$.

Another mistake is using subscript outside math mode. If you type H_2O without dollar signs, LaTeX treats the underscore as a command and produces an error. Always wrap subscript in math delimiters: $H_2O$. You can also forget to close braces or dollar signs, which breaks the entire equation — check that every opening brace and dollar sign has a matching closing one.

Frequently Asked Questions

Can I subscript text that is not in math mode?

Not directly — subscript is a math-mode feature. If you need subscript in regular text, you must enter math mode with dollar signs. Type The variable $x_1$ represents to subscript the 1 in a sentence. Some packages like textcomp offer text-mode subscripts, but they look different and are rarely used in LaTeX documents.

What if I want subscript on a subscript?

You can nest subscripts by using braces. Type $x_{y_z}$ to subscript y_z under x, which produces y with z subscripted beneath it, all subscripted under x. LaTeX automatically scales nested subscripts smaller so they remain readable.

Does subscript work the same in all LaTeX document types?

Yes — the underscore subscript syntax works identically in articles, reports, books, presentations, and any other LaTeX document class. The only difference is how the surrounding text is formatted, not how subscript itself works.

How do I subscript a space or punctuation mark?

Spaces and punctuation can be subscripted like any other character: $x_{,}$ subscripts a comma. However, this is rarely useful. If you need punctuation in a subscript with other content, include it in braces: $x_{n,max}$.

Can I change the size of subscript text?

LaTeX automatically sizes subscripts correctly for their context, and manual resizing is not recommended — it breaks mathematical typesetting conventions. If subscript appears too small to read, the issue is usually document zoom or display resolution, not the subscript size itself.