This is a list of the simplest TeX commands you might want to use in your problems/articles, etc. For a longer list, see the Short Maths Guide to LaTeX . Be forewarned that not everything in that guide works on our site, though (for example using "frac" for fractions fails).
You need to be in "math mode" to use special mathematical TeX symbols and structures. To get into "math mode" enter a $ (dollar sign). Likewise, to exit math mode, enter another $. Putting the two together, you would enter $x = 5$ to get the equation x=5 in TeX.
Using the content editor on the NRICH site, if you wanted to enter x=5 as TeX, you would select "insert->TeX..." from the top menu on the editor. Then into the window 'this'
type (or cut and paste) $ x=5 $.
In the resulting web page, this gives
Now on to some of the basic TeX commands. These all should go between dollar signs.
Superscript (exponentiation): ^ .
is written $2^5$. If you want a longer expression in the superscript, put it in curly braces: is written $e^2i$.Subscript: _ .
is written $x_2$. As for the superscript, longer expressions need to be in curly braces: is written $x_{i+j}$.Fractions: \over.
is written $a\over b$. is written ${i+j}\over{m+n}$.Square root: \sqrt.
is written $\sqrt{x+5}$.Here are some of the most common mathematical symbols. Most of the rest can be found in the guide mentioned earlier.