Many equations can be written perfectly well using standard ASCII characters, and this is often the easiest way to write your proof. However, this doesn't work well in certain situations, e.g. exponents, summations, complex fractions, special characters. For these, you'll need to use LaTeX equation mode.
LaTeX has a lot of features, but poor error messages. It is best to format only small sections of equation. To typeset a longer equation, put the main pieces individually into LaTeX and join them with ASCII characters (e.g. =). This warning applies even if you are familiar with LaTeX or other similar equation mode environments (e.g. piazza). There are small but annoying differences that you don't want to deal with during an exam. Keep it simple.
If you are curious about LaTeX, more details can be found in this quick summary of LaTeX. However, for this class, most of you will just want to use simple, basic bits of LaTeX.
If your LaTeX does not format properly and you can't quickly see why, remember that the graders can read LaTeX input. Don't waste a lot of time trying to find your small syntax error if you have other questions to answer or substantive problems to fix with your proof.
Each math-mode expression should be enclosed in dollar signs. For example, if you write this in your proof
$x^{10}$it will appear as
The above example shows you how to write an exponent (^). Also notice that curly brackets are used for grouping. Without them, only the 1 would appear in the exponent. So
$x^10$formats as
We can build a fraction using the frac command. So to write
$\frac{y+1}{3}$
A simple example like this could also be written in ASCII, e.g. (y+1)/3. Choose the method that gets you a readable result with the least hassle.
The command \not puts a slash through the following symbol. So
$x \not= y$
Finally, if you write a command directly followed by a character (e.g. a variable name), you need
to leave a space so that LaTeX will understand where the command ends. E.g.
$\frac y 3$
You'll get an error if you omit the space,e.g.
$\fracy3$
Summations are the main reason we're telling you about LaTeX. It's
easiest to explain by example. To write
$\sum_{k=3}^{20} k^2$
Notice the curly brackets used to make sure that multi-character expressions (e.g. "k=3") end up entirely in the subscript or superscript.
A product such as
$\prod_{k=3}^{20} \frac{k+3}{k+4}$
The limit
$\lim_{x \to \infty}$
The binomial coefficient
$\binom{n+2}{k+1}$
The \sqrt command produces the square root symbol. The stuff inside the root is enclosed
in curly brackets. E.g. to produce
$x + \sqrt{x+2}$
Adding a prime to a function f' produces the same thing inside math mode:
For set notation, the funny double-line versions of letters like R are made using the
command mathbb, e.g.
$\mathbb{R}$
These can be modified with subscripts and superscripts, e.g. to produce
$\mathbb{Z}^+$
Since curly brackets are grouping symbols in LaTeX, you can't use them directly to write set notation. One option is to enter math mode after you're inside the set brackets. For example
A = { $x^2$ | x is even }
appears as
A = {
Your other option is to "escape" the curly brackets using backslash. So
$A = \{ x^2 | x is even \}$
appears as
$A = \{ x^2 | x \text{ is even} \}$
will produce
A prettier version would be
$A = \{ x^2 \ | \ x \text{ is even} \}$
Most function names in math are single characters. The exceptions look odd unless they are set in text mode. To simplify typing, many have special commands. So
$\sin(s), \cos(x)$
appears as
LaTeX supports a very long list of special math symbols. In many cases, it will be faster for you to use words or standard ASCII symbols instead. Use the special symbols when they are important for making the proof easier to read. Here are the commands that are most likely to be useful:
command | output |
---|---|
\emptyset | |
\cap | |
\cup | |
\in | |
\subseteq | |
\rightarrow or \to | |
\times | |
\cdot | |
\ldots | |
\le | |
\ge | |
\equiv | |
\alpha | |
\beta | |
\gamma | |
\pi | |
\infty | |