Intro | First attempt | Text | References | Figures | Maths | Source Code | Theorems

Mathematical Formulæ

Mathematical Formulæ is one of LaTeX's great strengths. A formula can appear either inlined in the paragraph, or separately (so-called display maths). You can try to insert the following code in a LaTeX document and compile it to see how it works:

  Mathematical formulæ are essential in most scientific texts,
  for instance $E = mc^2$.  It is important that they look good.
  Longer formulæ require a line of their own, like this:
  \[ P(x) = \sum_{i=1}^n c_i x^i. \]
  Greek letters are easily achieved:
  $\alpha=2$, and $\beta = 2\alpha + 1$.

  As you know, different symbols for multiplication.
  You would probably say that an image is $256\times256$,
  while a product is usually $ab$.  If you need symbol for
  the a product, it may be like this:
  \[ S = \alpha \cdot \frac{a + 1}{n-1}, \text{ where } a < 2. \]

Note that typesetting rules for maths are different from those for text; for instance, whitespace is ignored. The curly braces work as in C and Java, i.e. they group single tokens into a block which is treated as one token.

Almost any conceivable mathematical symbol can be typeset easily in LaTeX. If you need more than I have shown and what you can guess, you should look up in the book.

To get numbered equation, you can try this:


  A reference to \eqref{eq:B} may be used before it is declared.
    A & = \alpha + \frac{\beta}{n-1},\\
    B & = \beta + Bx^2.
  It is now possible to refer to Equation \eqref{eq:A} whenever you need it.

The ampersand (&) is used for alignment, so that the equal signs (=) come directly under eachother.