Skip to main content
To write a subscript in LaTeX, use _ in math mode: x_1. To write a superscript, use ^: x^2. When the subscript or superscript contains more than one character, wrap it in braces, as in x_{12} or x^{2n}. This guide starts with the basic subscript syntax most people search for, then covers superscripts, chemistry notation, tensors, and the errors that usually break equations.
Quick start: Use _ for subscripts and ^ for superscripts. For multiple characters, enclose in braces: x_{12} and x^{2n}.Prerequisites: Basic LaTeX knowledge. For math mode basics, see Mathematical Expressions.Last updated: April 2026 | Reading time: 12 min | Difficulty: Beginner to Intermediate

What You’ll Learn

  • ✅ Basic LaTeX subscript and superscript syntax for mathematical notation
  • ✅ Multiple character subscripts and compound superscript expressions
  • ✅ Special cases (limits, operators, tensor notation)
  • ✅ Chemical formula subscript notation and isotopes
  • ✅ Advanced subscript positioning and formatting techniques
  • ✅ Common subscript errors and how to fix them
  • ✅ Best practices for readable mathematical notation

Frequently Asked Questions

In LaTeX, subscripts are notations placed below the baseline using the underscore character (_), commonly used for indices and chemical formulas. Superscripts are placed above the baseline using the caret character (^), typically for exponents and powers. Both are essential for mathematical and scientific notation in professional documents.Quick Example:
  • Subscript: x_1 renders as x₁
  • Superscript: x^2 renders as x²
Always use braces {} to group multiple characters in a LaTeX subscript or superscript. Without braces, only the first character becomes a subscript.Correct subscript syntax:
Wrong syntax:
This is one of the most common subscript errors in LaTeX.
The “Double subscript” error occurs when you try to apply two subscripts to the same variable without proper grouping:
Solutions:
  1. Use nested braces if one subscript depends on another:
  1. Or separate them with an empty group:
For chemical formula subscript notation, enclose the formula in \mathrm{} and use subscripts for atom counts:
For better chemistry support, use the mhchem package:
Tensor notation typically places superscripts before subscripts for contravariant and covariant indices:
The tensor package can simplify pre-superscripts and pre-subscripts in tensor notation.
Yes! Use \textsubscript{} and \textsuperscript{} commands for text mode subscript notation:
Alternatively, use math mode notation within text:
Avoid excessive subscript nesting beyond 2-3 levels, as it becomes hard to read:Acceptable nesting:
Problematic nesting:
Best practice: For complex notation, break expressions into parts for clarity.
Consistency guidelines for academic subscript notation:
  1. Index naming: Use consistent single letters (i, j, k) throughout
  2. Coordinate systems: Stick to one notation style consistently
  3. Vector notation: Use either subscripts or superscripts consistently
  4. Summation indices: Follow Einstein summation convention in physics
  5. Semantic meaning: Choose meaningful indices: v_x instead of v_1 for x-component

Basic Syntax

Subscripts (Indices)

Rendered Output

Single character: x1x_1, x2x_2, xnx_nMultiple characters: x12x_{12}, xn+1x_{n+1}, xmaxx_{max}Variables: aia_i, bjb_j, cijc_{ij}Greek letters: α1\alpha_1, βn\beta_{n}, γi,j\gamma_{i,j}

Superscripts (Exponents)

Rendered Output

Single character: x2x^2, xnx^n, xx^*Multiple characters: x10x^{10}, x2nx^{2n}, xn+1x^{n+1}Common exponents: exe^x, 2n2^n, 10310^{-3}Special notations: xx^{\prime}, xx^{\dagger}, xx^{\ast}

Important Rule: Braces for Multiple Characters

Critical: Without braces, only the first character after _ or ^ becomes sub/superscript:
  • x_12 renders as x₁2 (only 1 is subscript)
  • x_{12} renders as x₁₂ (both 1 and 2 are subscript)

Combined Subscripts and Superscripts

Basic Combinations

Rendered Output

Both subscript and superscript: x12x_1^2, anma_n^m, xij+1x_i^{j+1}Order doesn’t matter: x12=x12x_1^2 = x^2_1Complex combinations: xn+12mx_{n+1}^{2m}, aijkla_{ij}^{kl}With operators: i=1n\displaystyle\sum_{i=1}^n, 0\displaystyle\int_0^{\infty}Tensor notation: TμνρσT_{\mu\nu}^{\rho\sigma}

Nested Subscripts and Superscripts

Rendered Output

Nested superscripts: x2nx^{2^n}, ex2e^{x^2}, 22222^{2^{2^2}}Nested subscripts: xijx_{i_j}, ank+1a_{n_{k+1}}Mixed nesting: xijkx_i^{j^k}, amnpqa_{m_n}^{p^q}With braces: (x2)3=x6{(x^2)}^3 = x^6Tower notation: 2222^{2^{2^{\cdot^{\cdot^{\cdot}}}}}

Special Use Cases

Limits and Operators

Rendered Output

Inline limit: limx0f(x)\lim_{x \to 0} f(x)Display style limit: limx1x=0\lim_{x \to \infty} \frac{1}{x} = 0Summation: i=1ni=n(n+1)2\sum_{i=1}^{n} i = \frac{n(n+1)}{2}Product: k=1nk=n!\prod_{k=1}^{n} k = n!Integration: 01x2dx=13\int_0^1 x^2 \, dx = \frac{1}{3}Multiple limits: limx0y0f(x,y)\lim_{\substack{x \to 0 \\ y \to 0}} f(x,y)

Chemical Formulas

Rendered Output

Basic chemical formulas: H2O\mathrm{H_2O}, CO2\mathrm{CO_2}, H2SO4\mathrm{H_2SO_4}Isotopes: 14C^{14}\mathrm{C}, 235U^{235}\mathrm{U}, 2H^{2}\mathrm{H}Ions: Na+\mathrm{Na^+}, Cl\mathrm{Cl^-}, SO42\mathrm{SO_4^{2-}}Chemical equation: 2H2+O22H2O2\mathrm{H_2} + \mathrm{O_2} \rightarrow 2\mathrm{H_2O}

Physics and Engineering Notation

Rendered Output

Vector components: v=vxi^+vyj^+vzk^\vec{v} = v_x\hat{i} + v_y\hat{j} + v_z\hat{k}Derivatives: d2ydx2\frac{d^2y}{dx^2}, 2fx2\frac{\partial^2 f}{\partial x^2}Tensors: gμνg_{\mu\nu}, RβγδαR^{\alpha}_{\beta\gamma\delta}Four-vectors: xμ=(ct,x,y,z)x^\mu = (ct, x, y, z)Christoffel symbols: Γμνλ\Gamma^{\lambda}_{\mu\nu}Units: 109m10^{-9}\,\mathrm{m}, 3.0×108m/s3.0 \times 10^8\,\mathrm{m/s}

Advanced Techniques

Primes and Multiple Primes

Rendered Output

Single prime: f(x)f'(x), yy'Multiple primes: f(x)f''(x), f(x)f'''(x)Alternative notation: f(x)f^{\prime}(x), f(x)f^{\prime\prime}(x)With subscripts: x1x'_1, xnx''_nPrime on subscript: xnx_{n'}, xnx_{n''}

Positioning and Spacing

Accents with Sub/Superscripts

Rendered Output

Accents with subscripts: x^i\hat{x}_i, y~n\tilde{y}_n, zˉk\bar{z}_kAccents with superscripts: x^2\hat{x}^2, vT\vec{v}^T, x˙n\dot{x}^nCombined: x^i2\hat{x}_i^2, ϕ~nmkl\tilde{\phi}_{nm}^{kl}Wide accents: xyz^12\widehat{xyz}_1^2, ABC~ij\widetilde{ABC}_{ij}

Text Mode Subscripts and Superscripts

Rendered Output

In text mode: H2_2O is water. E = mc2^2 is Einstein’s equation.Ordinals: 1st^{\text{st}}, 2nd^{\text{nd}}, 3rd^{\text{rd}}Footnote markers: Texta^{\text{a}}, Reference1^1

Common Errors and Solutions

Problem: x_a_b causes “Double subscript” error.Solution: Use braces to clarify structure:
Problem: x_12 shows as x₁2 instead of x₁₂.Solution: Always use braces for multiple characters:
Problem: Limits appear cramped in inline math.Solution: Use display style or \limits:
Problem: x'^2 doesn’t work as expected.Solution: Use proper grouping:

Best Practices

1. Readability Guidelines

Good Practices:
  • Use meaningful subscripts: v_x not v_1 for x-component
  • Avoid deep nesting: x_{i_j} is okay, deeper is confusing
  • Be consistent: If using i,j,k for indices, stick to it
  • Use semantic notation: \max not max
Poor Practices to Avoid:
  • Overusing sub/superscripts: x_{a_{b_{c_{d}}}}
  • Mixing notation styles in same document
  • Using subscripts for non-mathematical text
  • Forgetting braces: x_min instead of x_{min}

2. Consistency Rules

  • Indices: Use consistent letters (i, j, k or m, n, p)
  • Coordinates: Be consistent (x, y, z or r, θ, φ)
  • Time derivatives: Choose notation and stick to it (ẋ or dx/dt)
  • Vector components: Consistent notation (subscripts or superscripts)

3. Special Notation Standards

4. Accessibility Considerations

  • Avoid excessive nesting that’s hard to read
  • Use \text{} for words in subscripts: x_{\text{max}}
  • Consider alternative notations for complex expressions
  • Break very complex expressions into parts

Quick Reference Card

Mathematical Expressions

Basic math mode and LaTeX subscript expressions

Equations Guide

Multi-line and numbered equations

Matrices & Arrays

Matrix notation with subscript indices

LaTeX Symbols Reference

Complete symbol reference for subscripts

Chemistry Notation

Chemical formula subscript notation

Physics Notation

Physics symbols and tensor notation

Further Reading & References

For authoritative documentation on LaTeX subscript and superscript handling:
  • amsmath Package Documentation - The standard package for advanced mathematical notation, including enhanced subscript positioning
  • The LaTeX Companion (3rd Edition) - Comprehensive reference for mathematical typesetting best practices
  • ISO 80000-2 - International standard for mathematical notation in scientific documents
LaTeX Cloud Studio tip: Use our equation preview feature to instantly see how your subscripts and superscripts render. No compilation needed!