How to Write Subscripts in LaTeX: A Plain-Language Guide

If you're working with mathematical equations, chemical formulas, or technical documentation, you've probably noticed that some characters need to sit below the baseline of regular text. That's what a subscript is—and LaTeX has a straightforward way to create them.

This guide explains how subscripts work in LaTeX, when you'd use them, and the different syntax options depending on your needs.

What Is a Subscript, and Why Does It Matter?

A subscript is a character or group of characters printed smaller and positioned below the baseline of normal text. You see subscripts everywhere in technical writing:

  • In chemistry: H₂O (water), CO₂ (carbon dioxide)
  • In mathematics: x₁, x₂, or aₙ (elements in a sequence)
  • In physics: Eₖ (kinetic energy), vₓ (velocity in the x-direction)

The position and size matter because they change the meaning. H₂O is fundamentally different from H2O written as regular characters—one is the chemical formula for water; the other is just letters and a number.

The Basic Syntax: The Underscore Character

In LaTeX, you create a subscript using the underscore (_) character followed by the character or group you want to subscript.

Single Character Subscripts

If you're subscripting a single character, the syntax is simple:

When compiled, this displays as: x₁

The underscore tells LaTeX "make what follows smaller and lower." For a single character, you don't need anything extra.

Multiple Character Subscripts

If your subscript contains more than one character, you need to group them together using curly braces ({}):

This displays as: x₂₃

Without the braces, LaTeX would only subscript the first character after the underscore:

This would display as: x₂3 (only the "2" is subscripted; the "3" remains at baseline)

This is one of the most common mistakes—forgetting braces when you have multiple subscript characters.

Subscripts in Different Contexts

In Math Mode

Subscripts are most commonly used inside math mode (between $ signs for inline math or in equation environments). Here's a practical example:

This places subscripts naturally within your text. The subscripts render at the correct size and position for inline mathematics.

In Display Mode (Equations)

When using larger equation environments (like equation* or align*), subscripts display the same way:

This shows a standard arithmetic sequence formula with subscripted variables.

Outside Math Mode

Subscripts technically work outside math mode using the same underscore syntax, but this is rarely done because:

  • Text subscripts don't automatically switch to mathematical italic font
  • The spacing and sizing may not look professional
  • Mathematicians and scientists expect subscripts in math mode

If you absolutely need a subscript in regular text, it's usually better to use a package designed for that purpose, but in standard LaTeX, keeping subscripts inside math mode is the convention.

Combining Subscripts and Superscripts

You can combine subscripts (underscore) with superscripts (caret: ^) in the same expression:

This produces: x²ᵢ (x with both a superscript 2 and subscript i)

Order doesn't matter—you can write x_i^2 or x^2_i, and they'll render identically. Both approaches are valid.

For complex expressions, using braces keeps everything clear:

Common Use Cases and Examples

Chemical Formulas

Sequences and Series

Indexed Variables

Matrix Elements

Nested and Complex Subscripts

For deeply nested or complex subscripts, clarity matters. You can subscript a subscript:

This displays x with y subscripted, and z subscripted to y. However, this becomes hard to read quickly, so reserve it for cases where it's mathematically necessary.

For readability, always use braces:

Key Variables That Shape Your Subscript Decisions

Different situations call for slightly different approaches. Consider:

FactorWhat It Affects
Math vs. text contextWhether you use $...$ or an equation environment
Single vs. multiple charactersWhether you need braces around the subscript
Readability goalsHow complex your subscript can be before it confuses readers
Document typeTechnical paper, textbook, or presentation (all support the same syntax)
Audience familiarityWhether subscripts need explanation or are standard in your field

Troubleshooting Common Issues

Subscript appears at wrong size or position: Ensure you're inside math mode. Subscripts outside $...$ or equation environments won't render correctly.

Only the first character subscripted: Add braces: change x_ab to x_{ab}.

Spacing looks off: This is often a math-mode font issue. Make sure your entire mathematical expression is wrapped in delimiters, not just part of it.

Subscript of a subscript looks unreadable: Consider whether it's necessary. If it is, test it on your target audience or in your document preview first.

What You Need to Know Going Forward

The core principle is simple: underscore + braces gets you subscripts in LaTeX. The main variables that will shape your specific implementation are:

  • Whether your subscript has one or multiple characters (affects brace use)
  • The context where it appears (inline math, display equations, or text)
  • How complex your subscript expression needs to be (clarity trade-off)
  • Your document's conventions and audience expectations

From chemical formulas to mathematical proofs, subscripts are a foundational tool in technical writing. Once you're comfortable with the underscore syntax and brace grouping, you'll be able to write them naturally as you work.