Skip to content

How to Type Superscripts, Subscripts, Left Scripts, Overscripts, and Underscripts

Video Tutorial

Written Tutorial

Enter Math Mode

  • If you want to type a math formula, enter Math Mode first.
  • For inline math, type $.
  • For a display equation on its own line, use Alt/Option + $.

Type Superscripts and Subscripts

  • After entering Math Mode, type the base first, such as x.
  • Press ^ to add a superscript. For example, type 2 to get x^2.
  • Press _ to add a subscript. For example, type i to get x_i.

For example:

xi2x_i^2

Type Left Superscripts and Left Subscripts

  • After entering Math Mode, type the base first, such as A.
  • Press Alt/Option + l, then press ^ to add a left superscript.
  • Press Alt/Option + l, then press _ to add a left subscript.
  • You can also press \ to enter command mode, type lsup or lsub, and press Enter to insert one.

For example:

T,αX,92238U{}^\ast T,\quad {}_\alpha X,\quad {}_{92}^{238}\mathrm{U}

Type Overscripts and Underscripts

  • An overscript is a mark placed directly above the base. Press Alt/Option + a to insert one.
  • An underscript is a mark placed directly below the base. Press Alt/Option + b to insert one.
  • You can also press \ to enter command mode, type above or below, and press Enter to insert one.
  • For operators such as lim, \sum, and \max, underscripts are commonly used for conditions placed underneath.

For example:

n,maxxAf(x)\overset{n \to \infty}{\longrightarrow},\quad \underset{x \in A}{\max} f(x)

Common Shortcuts

  • Superscript: ^
  • Subscript: _
  • Left superscript: Alt/Option + l, then ^
  • Left subscript: Alt/Option + l, then _
  • Overscript: Alt/Option + a
  • Underscript: Alt/Option + b

Optional Reading: How to Type Superscripts, Left Scripts, Overscripts, and Underscripts in LaTeX

In LaTeX\LaTeX, ordinary superscripts use ^, and ordinary subscripts use _. If a superscript or subscript contains more than one character, wrap it in {}.

latex
x^2
x_i
x_i^2
x^{n+1}
x_{i,j}

These render as:

x2,xi,xi2,xn+1,xi,jx^2,\quad x_i,\quad x_i^2,\quad x^{n+1},\quad x_{i,j}

Left scripts can usually be written with an empty group {}:

latex
{}^\ast T
{}_\alpha X
{}^\ast_\alpha T

These render as:

T,αX,αT{}^\ast T,\quad {}_\alpha X,\quad {}^\ast_\alpha T

Overscripts and underscripts commonly use \overset{} and \underset{}:

latex
\overset{n \to \infty}{\longrightarrow}
\underset{x \in A}{\max} f(x)

These render as:

n,maxxAf(x)\overset{n \to \infty}{\longrightarrow},\quad \underset{x \in A}{\max} f(x)

If you already have existing LaTeX\LaTeX code, you can convert it directly in Liii STEM with Magic Paste.