- The features to layout complicated mathematical formulas in a very
pleasing way are at the heart of L
^{A}TEX and one of the reasons for its widespread use in the scientific community.

- The basic environments for mathematical formulas are
**math**- formulas appear in the running text. Short form: $ $.
**displaymath**- produces a new paragraph. Short form: \[ \]
**equation**- like displaymath, but the equations are numbered.

Inside one of these environments L

^{A}TEX uses special formatting rules, the so called ``math mode''. Many of the following commands only work in math mode.

- L
^{A}TEX sets formulas in a running line in a more condensed form than in a displaymath or equation environment.

- The following table shows some of the many special mathematical commands:
description name result greek letters `\alpha`,`\beta``\Gamma`,`\Delta`sub and superscripts `a_i`,`e^{4\pi i}`relations `\leq`,`\geq`,`\subset`arrows `\leftrightarrow`,`\Rightarrow`fractions

`\frac{2}{4-x}`large brackets `\left(\frac{2}{4-x} \right)`square roots `\sqrt{42+y}`integrals `\int_0^1 x^2 dx`

- As always grouping with {, } has to be used properly. Compare the following:
L ^{A}TEX inputresult `a_n+1``a_{n+1}`

- A mathematical input file:
math.tex
The generated document looks like: