Subscripts and Superscripts in LaTeX - Complete Guide
Master subscripts and superscripts in LaTeX. Learn proper notation for indices, exponents, chemical formulas, and complex mathematical expressions.
Master subscripts and superscripts in LaTeX for mathematical expressions, scientific notation, and technical documentation. This comprehensive guide covers everything from basic usage to advanced techniques for complex notation.
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.
What You’ll Learn
- ✅ Basic subscript and superscript syntax
- ✅ Multiple levels and combined notation
- ✅ Special cases (limits, operators, tensors)
- ✅ Chemical formulas and isotopes
- ✅ Advanced positioning and formatting
- ✅ Common errors and how to fix them
- ✅ Best practices for readability
Basic Syntax
Subscripts (Indices)
Rendered output:
Superscripts (Exponents)
Rendered output:
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:
∑i=1n, ∫0∞
Nested Subscripts and Superscripts
Rendered output:
Special Use Cases
Limits and Operators
Rendered output:
= 0
i=1
i =
n(n+1)2Chemical Formulas
Rendered output:
Physics and Engineering Notation
Rendered output:
Advanced Techniques
Primes and Multiple Primes
Rendered output:
Positioning and Spacing
Accents with Sub/Superscripts
Rendered output:
Text Mode Subscripts and Superscripts
Rendered output:
Common Errors and Solutions
Error: Double subscript
Error: Double subscript
Problem: x_a_b
causes “Double subscript” error.
Solution: Use braces to clarify structure:
Only first character is sub/superscript
Only first character is sub/superscript
Problem: x_12
shows as x₁2 instead of x₁₂.
Solution: Always use braces for multiple characters:
Subscripts in limit are inline
Subscripts in limit are inline
Problem: Limits appear cramped in inline math.
Solution: Use display style or \limits
:
Prime notation conflicts
Prime notation conflicts
Problem: x'^2
doesn’t work as expected.
Solution: Use proper grouping:
Best Practices
1. Readability Guidelines
✅ Good Practices
- Use meaningful subscripts:
v_x
notv_1
for x-component - Avoid deep nesting:
x_
is okay, deeper is confusing - Be consistent: If using
i,j,k
for indices, stick to it - Use semantic notation:
\max
notmax
❌ Poor Practices
- 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 ofx_{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
Subscripts & Superscripts Quick Reference
Basic Commands
x_1 → x₁
x^2 → x²
x_ → x₁₂
x^ → x²ⁿ
x_i^j → xᵢʲ
Special Cases
\sum_{i=1}^n
\lim_{x \to 0}
f’(x) or f^{\prime}
{}_a^b X_c^d
Text Mode
\textsubscript{2}
\textsuperscript{2}
HO
x
Common Patterns
x_{n+1}
a_{ij}^{kl}
T^{\mu\nu}_{\rho}
^{14}C
Related Topics
Mathematical Expressions
Basic math mode and expressions
Equations Guide
Multi-line and numbered equations
Chemistry Notation
Chemical formulas and equations
Physics Notation
Physics symbols and notation
LaTeX Cloud Studio tip: Use our equation preview feature to instantly see how your subscripts and superscripts render. No compilation needed!