Subscript and Superscript in Latex

Latex is a document preparation system, often used in documenting scientific and technical documents. It is common to find subscripts and superscripts as part of mathematical expressions written in such documents. So in this post we will look into writing subscripts for different cases.

The command for subscript involves an Underbar followed by the expression that has to appear as subscript. Type _{exp} to write an exp as subscript. The command for superscript involves an Caret followed by the expression that has to appear as superscript. Type ^{exp} to write an exp as superscript.

Examples for Subscript :

Result Latex Expression Comment
X_1
 X_1
X_{ni}
 X_{ni}
To include more than one symbol as subcript, use braces{}. If braces are not used, then only first symbol will appear as subscript.
X_{n_i}
 X_{n_i}
To write a subscript to a subscript.

 
Examples for Superscript :

Result Latex Expression Comment
X^2
 X^2
X^{ni}
 X^{ni}
To include more than one symbol as supercript, use braces{}. If braces are not used, then only first symbol will appear as superscript.
X^{n^i}
 X^{n^i}
Write a superscript to a superscript.

 
Examples for Subscript and Superscript together:

Result Latex Expression Comment
X_n^2
 X_n^2
X_{ni}^2
 X_{ni}^2
X_{n^i}^2
 X_{n^i}^2
Write a superscript to a subscript.
X^{n_i}_2
 X^{n_i}_2
Write a subscript to a superscript.
\sum^{n}_{i=1} x_i}
 \sum^{n}_{i=1} x_i
\sum \limits^{n}_{i=1} x_i
 \sum \limits^{n}_{i=1} x_i
same as above, to place the limits below and above the summation symbol use \limits
\int^n_{i=1} x_i dx}
 \int^n_{i=1} x_i dx
\oint \limits^n_{i=1} x_i dx
 \oint \limits^n_{i=1} x_i dx
\limits used to place the limits below and above the symbol
\prod ^{n}_{i=1} x_i
 \prod^{n}_{i=1} x_i
\prod \limits^{n}_{i=1} x_i
 \prod \limits^{n}_{i=1} x_i
same as above, to place the limits below and above the product symbol use \limits
\coprod^{n}_{i=1}
 \coprod^{n}_{i=1}

Leave a Reply