LaTeX mathematic cheat sheet
Practically, LaTeX is the standard typesetting system for scientific writing. Most of the well-written equations that appeared in books and around the web are written using LaTeX.
Accents/diacritics
|
|
|
|
|
Standard functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Modular arithmetic
|
|
|
|
|
Derivatives
|
|
Sets
|
|
|
|
|
|
|
|
|
|
|
Operators
|
|
|
|
|
|
|
|
Logic
|
|
|
|
|
Root
|
|
Relations
|
|
|
|
|
|
|
|
Geometric
|
|
Arrows
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Special
|
|
|
|
|
|
|
|
|
|
|
|
|
|
USubscripts, superscripts, integrals
| Feature | Syntax | How it looks rendered | |
|---|---|---|---|
| Superscript |
|
||
| Subscript |
|
||
| Grouping |
|
||
|
|
|||
| Combining sub & super without and with horizontal separation |
|
||
|
|
|||
| Super super |
|
||
| Preceding and/or Additional sub & super |
|
||
|
|
|||
|
|
|||
| Stacking |
|
||
|
|
|||
|
|
|||
|
|
|||
| Derivatives |
|
||
|
|
|||
| Derivative dots |
|
||
| Underlines, overlines, vectors |
|
||
|
|
|||
|
|
|||
|
|
|||
| Arrows |
|
||
| Overbraces |
|
||
| Underbraces |
|
||
| Sum |
|
||
Sum (force \textstyle) |
|
||
| Product |
|
||
Product (force \textstyle) |
|
||
| Coproduct |
|
||
Coproduct (force \textstyle) |
|
||
| Limit |
|
||
Limit (force \textstyle) |
|
||
| Integral |
|
||
| Integral (alternate limits style) |
|
||
Integral (force \textstyle) |
|
||
Integral (force \textstyle, alternate limits style) |
|
||
| Double integral |
|
||
| Triple integral |
|
||
| Quadruple integral |
|
||
| Line or path integral |
|
||
| Closed line or path integral |
|
||
| Intersections |
|
||
| Unions |
|
||
Fractions, matrices, multi-lines
| Feature | Syntax | How it looks rendered |
|---|---|---|
| Fractions |
|
|
| Small ("text style") fractions |
|
|
| Large ("display style") fractions |
|
|
| Mixture of large and small fractions |
|
|
| Continued fractions (note the difference in formatting) |
\cfrac{2}{ c + \cfrac{2}{ d + \cfrac{1}{2} } } = a \qquad \dfrac{2}{ c + \dfrac{2}{ d + \dfrac{1}{2} } } = a |
|
| Binomial coefficients |
|
|
| Small ("text style") binomial coefficients |
|
|
| Large ("display style") binomial coefficients |
|
|
| Matrices |
\begin{matrix} x & y \\ z & v \end{matrix} |
|
|
\begin{vmatrix} x & y \\ z & v \end{vmatrix} |
||
|
\begin{Vmatrix} x & y \\ z & v \end{Vmatrix} |
||
|
\begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix} |
||
|
\begin{Bmatrix} x & y \\ z & v \end{Bmatrix} |
||
|
\begin{pmatrix} x & y \\ z & v \end{pmatrix} |
||
|
\bigl( \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \bigr) |
||
| Arrays |
\begin{array}{|c|c||c|} a & b & S \\ \hline 0&0&1\\ 0&1&1\\ 1&0&1\\ 1&1&0 \end{array} |
|
| Cases |
f(n) = \begin{cases} n/2, & \mbox{if }n\mbox{ is even} \\ 3n+1, & \mbox{if }n\mbox{ is odd} \end{cases} |
|
| System of equations |
\begin{cases} 3x + 5y + z &= 1 \\ 7x - 2y + 4z &= 2 \\ -6x + 3y + 2z &= 3 \end{cases} |
|
| Breaking up a long expression so it wraps when necessary |
<math>f(x) = \sum_{n=0}^\infty a_n x^n</math> <math>= a_0 + a_1x + a_2x^2 + \cdots</math> |
|
| Multiline equations |
\begin{align} f(x) & = (a+b)^2 \\ & = a^2+2ab+b^2 \end{align} |
|
|
\begin{alignat}{2} f(x) & = (a-b)^2 \\ & = a^2-2ab+b^2 \end{alignat} |
||
| Multiline equations with alignment specified (left, center, right) |
\begin{array}{lcl} z & = & a \\ f(x,y,z) & = & x + y + z \end{array} |
|
|
\begin{array}{lcr} z & = & a \\ f(x,y,z) & = & x + y + z \end{array} |
Parenthesizing big expressions, brackets, bars
| Feature | Syntax | How it looks rendered |
|---|---|---|
| Bad |
|
|
| Good |
|
You can use various delimiters with \left and \right:
| Feature | Syntax | How it looks rendered |
|---|---|---|
| Parentheses |
|
|
| Brackets |
|
|
| Braces (note the backslash before the braces in the code) |
|
|
| Angle brackets |
|
|
| Bars and double bars (note: "bars" provide the absolute value function) |
|
|
| Floor and ceiling functions: |
|
|
| Slashes and backslashes |
|
|
| Up, down and up-down arrows |
|
|
Delimiters can be mixed, as long as \left and \right are both used |
|
|
Use \left. or \right. if you don't want a delimiter to appear: |
|
|
| Size of the delimiters |
|
|
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
Alphabets
| Greek alphabet | |
|---|---|
| Boldface (greek) | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
References: