Subscripts and superscripts
The use of superscripts and subscripts is very common in mathematical expressions involving exponents, indexes, and in some special operators. This article explains how to write superscripts and subscripts in simple expressions, integrals, summations, et cetera.
Contents
Introduction
Definite integrals are some of the most common mathematical expressions, let's see an example:
\[ \int\limits_0^1 x^2 + y^2 \ dx \]
In LaTeX, subscripts and superscripts are written using the symbols ^
and _
, in this case the x and y exponents where written using these codes. The codes can also be used in some types of mathematical symbols, in the integral included in the example the _
is used to set the lower bound and the ^
for the upper bound. The command \limits
changes the way the limits are displayed in the integral, if not present the limits would be next to the integral symbol instead of being on top and bottom. (see the reference guide)
More detailed examples
The symbols _
and ^
can also be combined in the same expression, for example:
\[ a_1^2 + a_2^2 = a_3^2 \]
If the expression contains long superscripts or subscripts, these need to be collected in braces, as LaTeX normally applies the mathematical commands ^
and _
only to the following character:
\[ x^{2 \alpha}  1 = y_{ij} + y_{ij} \]
Subscripts and superscripts can be nested and combined in various ways. When nesting subscripts/superscripts, however, remember that each command must refer to a single element; this can be a single letter or number, as in the examples above, or a more complex mathematical expression collected in braces or brackets. For example:
\[ (a^n)^{r+s} = a^{nr+ns} \]
Operators using subscripts and superscripts
Some mathematical operators may require subscripts and superscripts. The most frequent cases are those of the integral \int
(check the introduction) and the summation (\sum
) operators, whose bounds are typeset precisely with subscripts and superscripts.
\[ \sum_{i=1}^{\infty} \frac{1}{n^s}
= \prod_p \frac{1}{1  p^{s}} \]
For other frequently used operators that require subscripts/superscripts check the reference guide.
Reference guide
Additional examples and operators
LaTeX markup  Renders as 

a_{n_i}


\int_{i=1}^n


\sum_{i=1}^{\infty}


\prod_{i=1}^n


\cup_{i=1}^n


\cap_{i=1}^n


\oint_{i=1}^n


\coprod_{i=1}^n

There are also a bigcup
and bigcap
commands similar to cup and cap but larger for larger expressions.
Further reading
For more information see
 List of Greek letters and math symbols
 Operators
 Integrals, sums and limits
 Mathematical fonts
 Brackets and Parentheses
 The Great, Big list of LaTeX Symbols (a full list of available mathematical symbols in the amssymb package)
 The not so short introduction to LaTeX2ε
 Aligning equations with amsmath
Overleaf guides
 Creating a document in Overleaf
 Uploading a project
 Copying a project
 Creating a project from a template
 Using the Overleaf project menu
 Including images in Overleaf
 Exporting your work from Overleaf
 Working offline in Overleaf
 Using Track Changes in Overleaf
 Using bibliographies in Overleaf
 Sharing your work with others
 Using the History feature
 Debugging Compilation timeout errors
 Howto guides
LaTeX Basics
 Creating your first LaTeX document
 Choosing a LaTeX Compiler
 Paragraphs and new lines
 Bold, italics and underlining
 Lists
 Errors
Mathematics
 Mathematical expressions
 Subscripts and superscripts
 Brackets and Parentheses
 Matrices
 Fractions and Binomials
 Aligning Equations
 Operators
 Spacing in math mode
 Integrals, sums and limits
 Display style in math mode
 List of Greek letters and math symbols
 Mathematical fonts
Figures and tables
 Inserting Images
 Tables
 Positioning Images and Tables
 Lists of Tables and Figures
 Drawing Diagrams Directly in LaTeX
 TikZ package
References and Citations
 Bibliography management with bibtex
 Bibliography management with natbib
 Bibliography management with biblatex
 Bibtex bibliography styles
 Natbib bibliography styles
 Natbib citation styles
 Biblatex bibliography styles
 Biblatex citation styles
Languages
 Multilingual typesetting on Overleaf using polyglossia and fontspec
 Multilingual typesetting on Overleaf using babel and fontspec
 International language support
 Quotations and quotation marks
 Arabic
 Chinese
 French
 German
 Greek
 Italian
 Japanese
 Korean
 Portuguese
 Russian
 Spanish
Document structure
 Sections and chapters
 Table of contents
 Cross referencing sections and equations
 Indices
 Glossaries
 Nomenclatures
 Management in a large project
 Multifile LaTeX projects
 Hyperlinks
Formatting
 Lengths in LaTeX
 Headers and footers
 Page numbering
 Paragraph formatting
 Line breaks and blank spaces
 Text alignment
 Page size and margins
 Single sided and double sided documents
 Multiple columns
 Counters
 Code listing
 Code Highlighting with minted
 Using colours in LaTeX
 Footnotes
 Margin notes
Fonts
Presentations
Commands
Field specific
 Theorems and proofs
 Chemistry formulae
 Feynman diagrams
 Molecular orbital diagrams
 Chess notation
 Knitting patterns
 CircuiTikz package
 Pgfplots package
 Typing exams in LaTeX
 Knitr
 Attribute Value Matrices
Class files
 Understanding packages and class files
 List of packages and class files
 Writing your own package
 Writing your own class
 Tips