amsmath package - cpshooter/geoML GitHub Wiki
The following commands are defined in the amsmath package; in other words, to typeset with these commands, the document class should start with \documentclass{article} % article document class \usepackage{amssymb, amsmath}
Note:
Inline math environment open and close with $ Examples: $ a + b $, $ a/b $ Displayed math environment open with [ and closed with ] Examples: [ \frac{1 + 2x}{x + y + xz} ] Arithmatic Subscripts and superscripts Accents Binomail coefficients Congruences Delimiters Operators Ellipses Integrals Matrices Roots Sums and Products Text Arithmatic The arithmetic operations such as +, -, *, /, fraction (\frac) Examples: $a + b$, $x - y$, $a \cdot b$, $x \times y$ Subscripts and superscripts Subscripts are typed with _ (underscore) and superscripts are typed with ^ (caret). Remember to enclose the subscripts and superscripts with { and }. Examples: $a^2$, $a_i$, $x_{ij}$ Accents (in math environment) There are four most often used math accents: $\bar{a}$ $\hat{a}$ $\tilde{a}$ $\vec{a}$ Binomial coefficients Use \binom{ }{ } for the binomial coefficients Example: $ \binom{n}{k} $ Congruences The two most important (examples) forms are: $a \equiv v \pmod{\theta}$ $a \equiv v \pod{\theta}$ Delimiters These are parenthesis-like symbols that vertically expand to enclose a formular. Examples: [ \left( \frac{1 + x}{2 + y^{2}} \right) ^{2} ] [ \left| \frac{a + b}{2} \right|, \quad \left| A^{2} \right| ] Operators Such as trig functions, limit; for instance, to typeset the sine function sin x type: $\sin x$. Examples: [ \lim{x \to 0} f(x) = 0 ] Ellipses vertical dots: \vdots low dots: \ldots centered dots: \cdots Note: \vdot, \ldot, \cdot produce a single dot. Integrals The command for an integral is \int; the lower limit is a subscript and the upper limit is a superscript. Example: $\int_{0}^{2 \pi} \cos x , dx$ Matrices The amsmath package provide you with a matrix environment. The matrix elements are separated by &; the rows are separted by \. (View these matrices.) The basic matrix (without parenthese)
[ \begin{matrix} a + b + c & uv & x - y & 27 \ a + b & u + v & z & 134 \end{matrix} ]
use pmatrix for matrix with parentheses
[ \begin{pmatrix} x + y + z & xy \ 2x + xy & xz \end{pmatrix} \begin{pmatrix} 223 & 43 \ 34 & 15 \end{pmatrix} ]
use bmatrix for matrix with brakets use vmatrix for matrix with vertical lines use Vmatrix for matrix with double vertical lines Roots \sqrt produces the square root. For nth squart root, use \sqrt[n]{ } Examples: $\sqrt{a + 2b}$ Sums and products The command for sum is \sum and for product is \prod . Examples: $\prod_{i = 1}^{n} x_{i}^2$ Text Place text in a formula with an \mbox command Example: [ a = b \mbox{by assumption} ]