LatexNotes

Lesson 2 of 12

Powers and subscripts

Raise and lower with ^ and _, and the one rule that trips everyone up: braces. About ten minutes.

Half the symbols in maths sit above or below the line: x2x^2, a1a_1, eiπe^{i\pi}. Two characters do all of it, and one rule about braces keeps them in order.

Powers with ^

A caret raises the next character: x^2 gives x2x^2, and e^x gives exe^x.

x2+y2=r2x^2 + y^2 = r^2

Subscripts with _

An underscore lowers the next character: a_1 gives a1a_1, x_n gives xnx_n. A subscript is how you number terms, label coordinates and name constants.

a1+a2+a3a_1 + a_2 + a_3

Braces: the one rule

^ and _ take only the next character. So x^10 gives x10x^10: the 1 is raised and the 0 is not. Put everything that belongs up or down in braces: x^{10} gives x10x^{10}.

Add braces to fix the formula below:

x10+an+1x^10 + a_n+1

The same goes for subscripts: a_{n+1} gives an+1a_{n+1}, and e^{2x} gives e2xe^{2x}. When you are not sure, use braces anyway: x^{2} is exactly the same as x^2.

Both at once

A character can have a subscript and a power together. Type them in either order: x_1^2 and x^2_1 both give x12x_1^2, with the two stacked neatly.

xi2+yi2x_i^2 + y_i^2

Powers of powers

What is inside the braces can have its own power: e^{x^2} gives ex2e^{x^2}, and 2^{2^n} gives 22n2^{2^n}.

Typing x^2^3 is an error ("double superscript"), because LaTeX cannot tell which you mean. Say it with brackets or with braces: (x^2)^3 gives (x2)3(x^2)^3, and x^{2^3} gives x23x^{2^3}.

e−x2/2e^{-x^2/2}

Primes

An apostrophe gives a prime, for derivatives: f'(x) gives f′(x)f'(x), and f''(x) gives f′′(x)f''(x). LaTeX raises it for you.

Words as subscripts

Letters in a subscript are italic, like any variable: T_{max} gives TmaxT_{max}, which reads as m times a times x. For a label that is a word, put the word in \text{...}: T_{\text{max}} gives TmaxT_{\text{max}}. There is more on \text in lesson 11.

Tmax−TminT_{\text{max}} - T_{\text{min}}

Practise

  1. x2+y2=r2x^2 + y^2 = r^2

  2. a1+a2+a3a_1 + a_2 + a_3

  3. 210=10242^{10} = 1024

  4. xn+1=xn−1x_{n+1} = x_n - 1

  5. e2xe^{2x}

  6. xi2x_i^2

  7. e−x2e^{-x^2}

  8. f′′(x)f''(x)

  9. TmaxT_{\text{max}}

In short

  • ^ raises and _ lowers the next character.
  • Anything longer than one character goes in braces: x^{10}, a_{n+1}.
  • A subscript and a power can go in either order, and a power can hold another power in its braces.
  • An apostrophe is a prime, and a word as a subscript goes in \text{...}.

Next, in lesson 3: fractions and roots.

Would you rather write it by hand?

LatexNotes turns a photo or PDF of your handwritten maths into LaTeX like this. Free to try, no sign-up.

Convert your handwriting to LaTeX →