Half the symbols in maths sit above or below the line: , , . 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 , and e^x gives .
Subscripts with _
An underscore lowers the next character: a_1 gives , x_n gives . A subscript is how you number terms, label coordinates and name constants.
Braces: the one rule
^ and _ take only the next character. So x^10 gives : the 1 is raised and the 0 is not. Put everything that belongs up or down in braces: x^{10} gives .
Add braces to fix the formula below:
The same goes for subscripts: a_{n+1} gives , and e^{2x} gives . 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 , with the two stacked neatly.
Powers of powers
What is inside the braces can have its own power: e^{x^2} gives , and 2^{2^n} gives .
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 , and x^{2^3} gives .
Primes
An apostrophe gives a prime, for derivatives: f'(x) gives , and f''(x) gives . LaTeX raises it for you.
Words as subscripts
Letters in a subscript are italic, like any variable: T_{max} gives , which reads as m times a times x. For a label that is a word, put the word in \text{...}: T_{\text{max}} gives . There is more on \text in lesson 11.
Practise
A power uses ^.
x^2 + y^2 = r^2A subscript uses _.
a_1 + a_2 + a_3Two digits up need braces:
2^{10}.2^{10} = 1024The whole subscript
n+1goes in braces.x_{n+1} = x_n - 1Braces around
2x, or only the 2 is raised.e^{2x}A subscript and a power, in either order.
x_i^2A power inside a power:
e^{-x^2}.e^{-x^2}Two apostrophes.
f''(x)A word as a subscript goes in
\text{...}.T_{\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.