Subscripts and Superscripts

Subscripts and superscripts are essential in mathematical typesetting, providing a way to denote indices, exponents, and relationships between variables. This section explains the syntax and usage of subscripts and superscripts, from basic expressions to complex nested structures and applications in summation, product notation, and limits, enabling you to write clear and well-structured equations for any mathematical context.

Basic syntax for subscripts and superscripts in LaTeX

Subscripts and superscripts are created using the following symbols:

  • Subscript _ (underscore)
  • Superscript ^ (caret)

Here's a breakdown of their basic usage:

1. Single-character subscripts and superscripts
If the subscript or superscript consists of a single character, it can be written directly after _ or ^ , for example:

\[ x_i, x^i \]

This example generates the following output:

single-character subscripts and superscripts example


2. Multi-character subscripts and superscripts
For subscripts or superscripts containing more than one character, enclose them in curly braces {} , for example:

\[ x_{ij}, x^{n+1} \]

This example generates the following output:

multi-character subscripts and superscripts example


3. Combining subscripts and superscripts
Subscripts and superscripts can be used together in any order, for example:

\[ x_i^j, x^j_i \]

This example generates the following output:

combining subscripts and superscripts example

To maintain clarity, always use curly braces {} if there are multiple characters.

\[ x_{ij}^{kl} \]

This example generates the following output:

multiple characters subscripts and superscripts example

Here's another example of multi-character subscripts and superscripts:

\[ x_{i+1}^{j+2}, x^{n+1}_{m-1} \]

This example generates the following output:

multiple characters subscripts and superscripts example

Nested subscripts and superscripts

Nested subscripts and superscripts are used in mathematical notation when a subscript or superscript itself has additional layers of notation. To create nested subscripts or superscripts, wrap each level of nesting in its own set of curly braces {} , for example:

\[ x_{i_{j}} , x^{i^{j}} \]

This example generates the following output:

nested subscripts and superscripts example

Nested subscripts and superscripts can be combined in the same expression for greater complexity:

\[ x_{i_{j}}^{k^l} \]

This example generates the following output:

nested combined subscripts and superscripts example

Examples of subscripts and superscripts in mathematical notations

Here are some examples that demonstrate the use of subscripts and superscripts in mathematical equations:

1. Summation of a sequence

\[ \sum_{n=0}^\infty a_n x^n \]

This example generates the following output:

example of subscripts and superscripts in math notation

2. Product of a sequence

\[ \prod_{i=1}^n x_i \]

This example generates the following output:

example of subscripts and superscripts in math notation

3. Limit notation

\[ \lim_{x \to \infty} e^x \]

This example generates the following output:

example of subscripts and superscripts in math notation

4. polynomial equation

\[ f(x) = a_1 x^2 + a_2 x + a_3 + b_1 x + b_2 \]

This example generates the following output:

example of subscripts and superscripts in math notation