Search

Monday, January 31, 2022

A List of MathJax Commands

The following list of commands used in MathJax is based on the much richer and more comprehensive list made by Dr. Carol JVF Burns. Consult Dr. Burns website for more detailed information on MathJax and its use.

This page is intended as a quick reference for those who already know MathJax and just need to find the command or sequence of commands that is best suited to achieve their goals.

Links

# A B C D E F G H I J K L M N O P R S T U V W X Environments

#

$\def\specialFrac#1#2{\frac{x + #1}{y + #2}} \specialFrac{7}{z+3}$ \def\specialFrac#1#2{\frac{x + #1}{y + #2}}
\specialFrac{7}{z+3}
# indicates numbered arguments in definitions
$\begin{matrix} a & b\cr c & d \end{matrix}$ ∖begin{matrix}
a & b\cr
c & d
∖end{matrix}
& is used as separator in alignment environments
$a < b\\\text{Carol }\&\text{ Julia}$ a &lt; b
\text{Carol }\&\text{ Julia}
& is used in HTML entity references within math mode
$^i$ ^i ^ is used to indicate exponents; used to indicate superscripts; used for limits on large operators and in some ‘vertical’ constructions; argument #1 is optional; use braces, as needed, to clarify what is the exponent
$x^i_2$ x^i_2
${x^i}_2$ {x^i}_2
$x^{i_2}$ x^{i_2}
$x^{i^2}$ x^{i^2}
${x^i}^2$ {x^i}^2
$^ax^b$ ^ax^b
$\sum_{n=1}^\infty$ \sum_{n=1}^\infty inline mode
$\overbrace{x+\cdots+x} ^{n\text{ times}}$ \overbrace{x+\cdots+x} ^{n\text{ times}}
$_2$ _2 _ is used to indicate subscripts; used for limits on large operators and in some ‘vertical’ constructions; argument #1 is optional; use braces, as needed, to clarify what is the subscript
$x_i^2$ x_i^2
${x_i}^2$ {x_i}^2
$x_{i^2}$ x_{i^2}
$x_{i_2}$ x_{i_2}
${x_i}_2$ {x_i}_2
$^a_bx^c_d$ ^a_bx^c_d
$\underbrace{x+\cdots+x} _{n\text{ times}}$ \underbrace{x+\cdots+x} _{n\text{ times}}
$\rm IR\\ \rm I\! R$ \rm IR
\rm I\! R
\! negative thin space; i.e., it ‘back ups’ a thin space amount
$abababab\\a\,b\,a\,b\,a\,b$ abababab
a\,b\,a\,b\,a\,b
\, thin space
$a\:b\:a\:b\:a\:b$ a\:b\:a\:b\:a\:b \: medium space
$a\>b\>a\>b\>a\>b$ a\>b\>a\>b\>a\>b \> alternate medium space
$a\;b\;a\;b\;a\;b$ a\;b\;a\;b\;a\;b \; thick space
$\rm This is a sentence.\\\rm This\ is\ a\ sentence.\\\rm This~is~a~sentence.\\\text{This is a sentence.}$ \rm This is a sentence.
\rm This\ is\ a\ sentence.
\rm This~is~a~sentence.
\text{This is a sentence.}
\ (backslash space); in MathJax, this is the same as: \nobreakspace, \space, ~ (tilde character)
$a b c d\\a~b~~~~~~c~d$ a b      c d
a~b~~~~~~c~d
~ The tilde is useful to force a space where MathJax would otherwise collapse or ignore spaces.
$\begin{gather}a\\a+b\\a+b+c\end{gather}$ ∖begin{gather}a\\a+b\\a+b+c∖end{gather} \\ line separator in alignment modes and environments; in MathJax, these are essentially the same: \cr, \newline
${1,2,3}\\\{1,2,3\}\\\left\{\frac ab,c\right\}$ {1,2,3}
\{1,2,3\}
\left\{\frac ab,c\right\}
\{ \} literal braces; needed since braces are used for grouping in math mode; non-stretchy when used alone; stretchy when used with \left or \right
$|x|$ |x| | pipe character; vertical bar; absolute value; non-stretchy when used alone; stretchy when used with \left or \right
$|\frac ab|\quad\left|\frac ab\right|$ |\frac ab|
\left|\frac ab\right|
$\{x | x\in\Bbb Z\}\\\{x\,|\,x\in\Bbb Z\}$ \{x | x\in\Bbb Z\}
\{x\,|\,x\in\Bbb Z\}
$\|x\|$ \|x\| \| double pipe character; double vertical bar; norm; non-stretchy when used alone; stretchy when used with \left or \right
$\|\frac ab\|\quad\left\|\frac ab\right\|$ \|\frac ab\|
\left\|\frac ab\right\|
$(\frac ab,c)\quad \left(\frac ab,c\right)$ (\frac ab,c)
\left(\frac ab,c\right)
() parentheses; non-stretchy when used alone; stretchy when used with \left or \right
$3.14\\ a.b \\ a{.}b$ 3.14
a.b
a{.}b
. period; decimal point. With numbers on either side, there is no surrounding space. With non-numeric characters, there is a slight amount of space on right. To suppress this space, enclose the ‘.’ in braces.
$\text{first: } -a\star b \\ \text{first: } {-}a\star b \\ \text{first: } {-a}\star b$ \text{first: } -a\star b
\text{first: } {-}a\star b
\text{first: } {-a}\star b
- minus symbol; e.g., used for subtraction. When spacing is not optimal, you can put the minus sign (or, the group -a ) inside braces to suppress extra space
$[\frac ab,c]\\\left[\frac ab,c\right]$ [\frac ab,c]
\left[\frac ab,c\right]
[] square brackets; non-stretchy when used alone; stretchy when used with \left or \right
$f(x) = x^2\\f'(x) = 2x\\f''(x) = 2$ f(x) = x^2
f'(x) = 2x
f''(x) = 2
' prime symbol

A

$a+1 \above 1pt b$ a+1 \above 1pt b \above general command for making fractions; gives control over thickness of horizontal fraction bar
$a \above 1pt b+2$ a \above 1pt b+2
${a+1 \above 1.5pt b+2}+c$ {a+1 \above 1.5pt b+2}+c
$a+1 \abovewithdelims [ ] 1pt b$ a+1 \abovewithdelims [ ] 1pt b \abovewithdelims general command for making fractions; gives control over thickness of horizontal fraction bar; specifies left and right enclosing delimiters
${a \abovewithdelims . | 1.5pt b+2}_{a=3}$ {a \abovewithdelims . | 1.5pt b+2}_{a=3}
${a+1 \abovewithdelims \{ \} 1pt b+2}+c$ {a+1 \abovewithdelims \{ \} 1pt b+2}+c
$\acute e\\\acute E\\\acute eu\\\acute{eu}$ \acute e
\acute E
\acute eu
\acute{eu}
\acute acute accent
$\arccos\\\def\arccosAlt{\cos^{-1}}\\\arccosAlt(x)$ \arccos
\def\arccosAlt{\cos^{-1}}
\arccosAlt(x)
\arccos does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\arcsin\\\def\arcsinAlt{\sin^{-1}}\\\arcsinAlt(x)$ \arcsin
\def\arcsinAlt{\sin^{-1}}
\arcsinAlt(x)
\arcsin does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\arctan\\\def\arctanAlt{\sin^{-1}}\\\arctanAlt(x)$ \arctan
\def\arctanAlt{\sin^{-1}}
\arctanAlt(x)
\arctan does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\arg$ \arg \arg the complex argument function; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\array{ a & b+1 \cr c+1 & d }$ \array{ a & b+1 \cr c+1 & d } \array a synonym for \matrix
$a \atop b$ a \atop b \atop general command for making a fraction-like structure, but without the horizontal fraction bar
$a+1 \atop b+2$ a+1 \atop b+2
${a+1 \atop b+2}+c$ {a+1 \atop b+2}+c
$a \atopwithdelims [ ] b$ a \atopwithdelims [ ] b \atopwithdelims general command for making a fraction-like structure, but without the horizontal fraction bar; specifies left and right enclosing delimiters
$a+1 \atopwithdelims . | b+2$ a+1 \atopwithdelims . | b+2
${a+1 \atopwithdelims \{ \} b+2}+c $ {a+1 \atopwithdelims \{ \} b+2}+c

B

$\bar x\\\bar X\\\bar xy\\\bar{xy}$ \bar x
\bar X
\bar xy
\bar{xy}
\bar bar accent (non-stretchy)
$\Bbb R\\\Bbb ZR\\\Bbb{AaBbKk}Cc$ \Bbb R
\Bbb ZR
\Bbb{AaBbKk}Cc
\Bbb blackboard-bold for uppercase letters and lowercase ‘k’; if lowercase blackboard-bold letters are not available, then they are typeset in a roman font
$\bf AaBb\alpha\beta123\\{\bf A B} A B\\\bf AB \rm CD\\\bf{AB}CD$ \bf AaBb\alpha\beta123
{\bf A B} A B
\bf AB \rm CD
\bf{AB}CD
\bf turns on boldface; affects uppercase and lowercase letters, and digits
$\Bigg[\quad\bigg[\\\Big[\quad\big[$ \Bigg[
\bigg[
\Big[
\big[
\Bigg \bigg \Big \big used to obtain various-sized delimiters
$\Biggl( \Biggm| \Biggr)\\\biggl( \biggm| \biggr)\\\Bigl( \Bigm| \Bigr)\\\bigl( \bigm| \bigr)$ \Biggl( \Biggm| \Biggr)
\biggl( \biggm| \biggr)
\Bigl( \Bigm| \Bigr)
\bigl( \bigm| \bigr)
Used to obtain various-sized delimiters, with a left/right/middle context; The ‘l’ (left), ’m’ (middle), and ‘r’ (right) specifications may make reading the source code more meaningful, especially when there are delimiters inside delimiters.
$x\big| y\\x\bigm| y$ x\big| y
x\bigm| y
these commands affect typeset results in a fundamental way; it is best to use the form appropriate for the position of the desired delimiter
$\binom n k$ \$\binom n k\$ \binom notation commonly used for binomial coefficients (inline mode)
$$\binom n k$$ \$\$\binom n k\$\$ \binom notation commonly used for binomial coefficients (display mode)
$\binom{n-1}k-1\\\binom{n-1}{k-1}$ \binom{n-1}k-1
\binom{n-1}{k-1}
$\bmod$ \bmod \bmod properly spaced as a binary operator
$\boldsymbol aa\\\boldsymbol \alpha\alpha\\\boldsymbol{a\alpha}a\alpha$ \boldsymbol aa
\boldsymbol \alpha\alpha
\boldsymbol{a\alpha}a\alpha
\boldsymbol as opposed to \bf and \mathbf , \boldsymbol applies to nearly all symbols, not just letters and numbers
$\boldsymbol{a+2+\alpha+\frac{x+3}{\beta+4}}\\\mathbf{a+2+\alpha+\frac{x+3}{\beta+4}}$ \boldsymbol{a+2+\alpha+\frac{x+3}{\beta+4}}
\mathbf{a+2+\alpha+\frac{x+3}{\beta+4}}
$\boxed ab \\ \boxed{ab} \\ \boxed{ab\strut} \\ \boxed{\text{boxed text}}$ \boxed ab
\boxed{ab}
\boxed{ab\strut}
\boxed{\text{boxed text}}
\boxed puts a box around argument; argument is in math mode
$\brace$ \brace \brace creates a braced structure
$a\brace b$ a\brace b
$a+b+c\brace d+e+f$ a+b+c\brace d+e+f
$a+{b+c\brace d+e}+f$ a+{b+c\brace d+e}+f
$\brack$ \brack \brack creates a bracketed structure
$a\brack b$ a\brack b
$a+b+c\brack d+e+f$ a+b+c\brack d+e+f
$a+{b+c\brack d+e}+f$ a+{b+c\brack d+e}+f
$\breve e\\\breve E\\\breve eu\\\breve{eu}$ \breve e
\breve E
\breve eu
\breve{eu}
\breve breve accent
$\buildrel \alpha\beta \over \longrightarrow\\\buildrel \rm def \over {:=}$ \buildrel \alpha\beta \over \longrightarrow
\buildrel \rm def \over {:=}
\buildrel ... \over ... The result is of class REL (binary relation), so it has the spacing of a relation.

C

$\cal ABCDEFGHIJKLM$ \cal ABCDEFGHIJKLM \cal turns on calligraphic mode; only affects uppercase letters and digits
$\cal NOPQRSTUVWXYZ$ \cal NOPQRSTUVWXYZ
$\cal 0123456789$ \cal 0123456789
${\cal AB}AB\\\cal AB \rm AB\\\cal{AB}CD$ {\cal AB}AB
\cal AB \rm AB
\cal{AB}CD
$\require{cancel} \frac{(x+1)\cancel{(x+2)}}{3\cancel{(x+2)}}$ \frac{(x+1)\cancel{(x+2)}}{3\cancel{(x+2)}} \cancel Used to ‘cancel’ (strikeout). The command \require{cancel} must precede \cancel, if MathJax does not automatically interpret the command
$\frac{\bcancel{\frac13}}{\bcancel{\frac13}} = 1$ \frac{\bcancel{\frac13}}{\bcancel{\frac13}} = 1 \bcancel Used to ‘cancel’ (strikeout)
$|x| = \cases{x & if x > 0\cr -x & if x < 0}$ |x| =
\cases{
x & if x > 0\cr
-x & if x < 0
}
\cases for piecewise-defined functions. The second column is automatically in text-mode
$a\cdot b\\a\cdotp b\\a\centerdot b$ a\cdot b
a\cdotp b
a\centerdot b
\cdot \cdotp \centerdot centered dot or punctuation symbol
$x_1 + \cdots + x_n$ x_1 + \cdots + x_n \cdots centered dots; dot dot dot
$\frac{2}{1+\frac{2}{1+\frac{2}{1}}}\\\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}$ \frac{2}{1+\frac{2}{1+\frac{2}{1}}}

\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}
\cfrac use for continued fractions
$\check o\\\check O\\\check oe\\\check{oe}$ \check o
\check O
\check oe
\check{oe}
\check check accent
$\displaystyle n+1 \choose k+2\\\displaystyle {n+1 \choose k+2}$ \displaystyle n+1 \choose k+2
\displaystyle {n+1 \choose k+2}
\choose notation commonly used for binomial coefficients; different versions for inline and display modes
$n+1 \choose k+2$ \$n+1 \choose k+2\$
$$n+1 \choose k+2$$ \$\$n+1 \choose k+2\$\$
$1+{n \choose 2}+k$ 1+{n \choose 2}+k
$ab\class{smHighlightRed}{cdef}gh$ <style type="text/css">
.smHighlightRed {
font-size:small;
background-color:yellow;
color:red;
}
</style>

ab\class{smHighlightRed}{cdef}gh
\class non-standard; extension is loaded automatically when used; used to specify a CSS class for styling mathematics
$\color{red}{ \frac{1+\sqrt{5}}{2} }\\\color{#0000FF}AB$ \color{red}{ \frac{1+\sqrt{5}}{2} }
\color{#0000FF}AB
\color used to specify a color in mathematics
$\cos x\\\cos(2x-1)$ \cos x
\cos(2x-1)
\cos cosine; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\cosh x\\\cosh(2x-1)$ \cosh x
\cosh(2x-1)
\cosh hyperbolic cosine; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\cot x\\\cot(2x-1)$ \cot x
\cot(2x-1)
\cot cotangent; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\coth x\\\coth(2x-1)$ \coth x
\coth(2x-1)
\coth hyperbolic cotangent; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\csc x\\\csc(2x-1)$ \csc x
\csc(2x-1)
\csc cosecant; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits

D

$\dbinom n k$ \dbinom n k \dbinom notation commonly used for binomial coefficients; display version (in both inline and display modes)
$\dbinom{n-1}k-1$ \dbinom{n-1}k-1
$\dbinom{n-1}{k-1}$ \dbinom{n-1}{k-1}
$$
$\dot x\\\ddot x\\\dddot x\\\ddddot x\\\ddot x(t)\\\ddddot{y(x)}$ \dot x
\ddot x
\dddot x
\ddddot x
\ddot x(t)
\ddddot{y(x)}
\dot \ddot \dddot \ddddot dot accent, double dot accent, triple dot accent, quadruple dot accent
$myOp(x)\\\text{myOp}(x)\\\DeclareMathOperator {\myOp}{myOp} \myOp(x)$ myOp(x)
\text{myOp}(x)
\DeclareMathOperator {\myOp}{myOp} \myOp(x)
\DeclareMathOperator Multi-letter operator names (like log, sin, and lim) are traditionally typeset in a roman font. \DeclareMathOperator allows you to define your own operator names; they are subsequently typeset using the proper font and spacing; you can control the way that limits appear
$\myOp_a^b(x)$ \$\myOp_a^b(x)\$ standard subscript and superscript position for inline mode
$$\myOp_a^b(x)$$ \$\$\myOp_a^b(x)\$\$ standard subscript and superscript position for display mode
$\DeclareMathOperator* {\myOP}{myOP} \myOP_a^b(x)$ \DeclareMathOperator* {\myOP}{myOP} \myOP_a^b(x) operator names are case-sensitive, so \myOp is different from \myOP; if displaystyle limits are desired in both inline and display modes, then use DeclareMathOperator* instead of DeclareMathOperator
$\def\myHearts{\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}} \myHearts\myHearts$ \def\myHearts{\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}} \myHearts\myHearts \def for defining your own commands (control sequences, macros, definitions); must appear (within math delimiters) before it is used
$\def\myHearts#1#2{\color{#1}{\heartsuit}\kern-2.5pt\color{#2}{\heartsuit}} \myHearts{red}{blue}$ \def\myHearts#1#2{\color{#1}{\heartsuit}\kern-2.5pt\color{#2}{\heartsuit}} \myHearts{red}{blue}
$\deg$ \deg \deg degree; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\det_{\rm sub}\\\det\limits_{\rm sub}$ \$\det_{\rm sub}\\\det\limits_{\rm sub}\$ \det determinant; does not change size; default limit placement can be changed using \limits and \nolimits
$$\det_{\rm sub}\\\det\nolimits_{\rm sub}$$ \$\$\det_{\rm sub}\\\det\nolimits_{\rm sub}\$\$
$\dfrac a b\\\frac a b$ \dfrac a b
\frac a b
\dfrac fractions; display version (in both inline and display modes)
$\dfrac{a-1}b-1$ \dfrac{a-1}b-1
$\dfrac{a-1}{b-1}$ \dfrac{a-1}{b-1}
$\dim$ \dim \dim dimension; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\displaylines{ a = a\\ \text{if } a=b \text{ then } b=a\\ \text{if } a=b \text{ and } b=c \text{ then } a=c }$ \displaylines{
a = a\\
\text{if } a=b \text{ then } b=a\\
\text{if } a=b \text{ and } b=c \text{ then } a=c
}
\displaylines to display any number of centered formulas (without any alignment)
$\frac ab+\displaystyle\frac ab+\textstyle\frac ab +\scriptstyle\frac ab+\scriptscriptstyle\frac ab$ \frac ab+\displaystyle\frac ab+\textstyle\frac ab +\scriptstyle\frac ab+\scriptscriptstyle\frac ab \displaystyle used to over-ride automatic style rules and force display style; stays in force until the end of math mode or the braced group, or until another style is selected
$\frac ab + {\displaystyle \frac cd + \frac ef} + \frac gh$ \frac ab + {\displaystyle \frac cd + \frac ef} + \frac gh
$\frac ab + \displaystyle{\frac cd + \frac ef} + \frac gh$ \frac ab + \displaystyle{\frac cd + \frac ef} + \frac gh
$x_1, \dots, x_n\\x_1 + \dots + x_n\\x_1 + \dotsb + x_n\\x_1 + \cdots + x_n$ x_1, \dots, x_n
x_1 + \dots + x_n
x_1 + \dotsb + x_n
x_1 + \cdots + x_n
\dots lower dots; ellipsis; ellipses; dot dot dot; In LATEX, \dots chooses either \cdots or \ldots depending on the context; MathJax, however, always gives lower dots
$x_1+x_2+\dotsb +x_n$ x_1+x_2+\dotsb +x_n \dotsb dots with binary operations and relations
$x_1,x_2,\dotsc,x_n$ x_1,x_2,\dotsc,x_n \dotsc dots with commas
$\int_{A_1}\int_{A_2}\dotsi\int_{A_n}$ \int_{A_1}\int_{A_2}\dotsi\int_{A_n} \dotsi dots with integrals
$x_1x_2\dotsm x_n$ x_1x_2\dotsm x_n \dotsm dots with multiplication
$A_1\dotso A_n$ A_1\dotso A_n \dotso other dots

E

$|\enspace|\enspace|$ |\enspace|\enspace| \enspace is a 0.5em space
$\eqalign{ 3x - 4y &= 5\cr x + 7 &= -2y }$ \eqalign{
3x - 4y &= 5\cr
x + 7 &= -2y
}
\eqalign equation alignment; for aligning multi-line displays at a single place
$\eqalign{ (a+b)^2 &= (a+b)(a+b) \\ &= a^2 + ab + ba + b^2 \\ &= a^2 + 2ab + b^2 }$ \eqalign{
(a+b)^2 &= (a+b)(a+b) \\
&= a^2 + ab + ba + b^2 \\
&= a^2 + 2ab + b^2
}
A math component may be empty
$\left\{ \eqalign{ a &= 1\\ b &= 2\\ c &= 3 }\right\} \qquad \eqalign{ ax + by &= c \\ x + 2y &= 3 }$ \left\{
\eqalign{
a &= 1\\
b &= 2\\
c &= 3
}\right\}
\qquad
\eqalign{
ax + by &= c \\
x + 2y &= 3
}
The result of \eqalign is a vertically-centered block; you can use more than one in the same display
$\eqalignno{ 3x - 4y &= 5 &(\dagger) \cr x + 7 &= -2y &(\ddagger)\cr z &= 2 }$ \eqalignno{
3x - 4y &= 5 &(\dagger) \cr
x + 7 &= -2y &
(\ddagger)\cr
z &= 2
}
\eqalignno equation alignment with optionally numbered (tagged) lines
$\exp$ \exp \exp exponential function; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits

F

$\boxed{Hi there!}\\\fbox{Hi there!}$ \boxed{Hi there!}
\fbox{Hi there!}
\fbox puts a box around argument; argument is in text mode equivalent to: \boxed{\text{#1}}
$\frac a b$ \$\frac a b\$ \frac fractions; displays differently in inline and display modes
$$\frac a b$$ \$\$\frac a b\$\$
$\frac{a-1}b-1$ \frac{a-1}b-1
$\frac{a-1}{b-1}$ \frac{a-1}{b-1}
$\frak ABCDEFGHIJKLM$ \frak ABCDEFGHIJKLM \frak turns on fraktur; affects uppercase and lowercase letters, and digits
$\frak NOPQRSTUVWXYZ$ \frak NOPQRSTUVWXYZ
$\frak 0123456789$ \frak 0123456789
$\frak abcdefghijklmnopqrstuvwxyz$ \frak abcdefghijklmnopqrstuvwxyz
${\frak AB}AB$ {\frak AB}AB
$\frak AB \rm AB$ \frak AB \rm AB
${\frak AB \cal AB} AB$ {\frak AB \cal AB} AB

G

$\gcd_{\rm sub}^{\rm sup}$ \$\gcd_{\rm sub}^{\rm sup}\$ \gcd greatest common divisor; does not change size; can change limit placement using \limits and \nolimits
$$\gcd_{\rm sub}^{\rm sup}$$ \$\$\gcd_{\rm sub}^{\rm sup}\$\$
$\genfrac(){1px}{0}{2x+5}{4y-2}\\\genfrac(){1px}{1}{2x+5}{4y-2}\\\genfrac(){1px}{2}{2x+5}{4y-2}\\\genfrac(){1px}{3}{2x+5}{4y-2}$ \genfrac(){1px}{0}{2x+5}{4y-2}
\genfrac(){1px}{1}{2x+5}{4y-2}
\genfrac(){1px}{2}{2x+5}{4y-2}
\genfrac(){1px}{3}{2x+5}{4y-2}
the most general command for defining fractions with optional delimiters, line thickness, and specified style \genfrac #1 #2 #3 #4 #5 #6 where:
#1 is the left delimiter (empty, for no left delimiter)
#2 is the right delimiter (empty, for no right delimiter)
#3 is the fraction bar thickness (set to 0pt to make it disappear)
#4 is either 0, 1, 2, or 3, where:
0 denotes \displaystyle
1 denotes \textstyle
2 denotes \scriptstyle
3 denotes \scriptscriptstyle
#5 is the numerator
#6 is the denominator
$\grave e\\\grave E\\\grave eu\\\grave{eu}$ \grave e
\grave E
\grave eu
\grave{eu}
\grave grave accent

H

$\hat\imath\\\hat\jmath\\\hat ab\\\hat{ab}$ \hat\imath
\hat\jmath
\hat ab
\hat{ab}
\hat non-stretchy hat accent
$\hbox{\alpha a }\alpha a\\\hbox{This is a sentence.}\\\hbox{for all $x > 0$}$ \hbox{\alpha a }\alpha a
\hbox{This is a sentence.}
\hbox{for all $x > 0$}
\hbox horizontal box; contents are treated as text, but you can switch to math mode inside; text appears in \rm
$\begin{matrix} \hdashline x_{11} & x_{12} \\ x_{21} & x_{22} \\ x_{31} & x_{32} \end{matrix}$ ∖begin{matrix}
\hdashline
x_{11} & x_{12} \\
x_{21} & x_{22} \\
x_{31} & x_{32}
∖end{matrix}
\hdashline \hline works in many of the environments to create a horizontal line (\hline), or a horizontal dashed line (\hdashline)
$\begin{matrix} x_{11} & x_{12} \\ x_{21} & x_{22} \\ x_{31} & x_{32} \\ \hline \end{matrix}$ ∖begin{matrix}
x_{11} & x_{12} \\
x_{21} & x_{22} \\
x_{31} & x_{32} \\
\hline
∖end{matrix}
$\begin{matrix} x_{11} & x_{12} \\ x_{21} & x_{22} \\ \hline x_{31} & x_{32} \end{matrix}$ ∖begin{matrix}
x_{11} & x_{12} \\
x_{21} & x_{22} \\
\hline
x_{31} & x_{32}
∖end{matrix}
Putting \hdashline or \hline at the beginning of any subsequent row puts a line over that row
$\begin{matrix} \hline x_{11} & x_{12} \\ x_{21} & x_{22} \strut \\ \hdashline x_{31} & x_{32} \strut \end{matrix}$ ∖begin{matrix}
\hline
x_{11} & x_{12} \\
x_{21} & x_{22} \strut \\
\hdashline
x_{31} & x_{32} \strut
∖end{matrix}
You can combine effects, and put in struts (as desired) for additional vertical spacing
$\begin{matrix} xxxxxx & xxxxxx & xxxxxx \cr ab & \hfil ab & ab\hfil\cr \end{matrix}$ ∖begin{matrix}
xxxxxx & xxxxxx & xxxxxx \cr
ab & \hfil ab & ab\hfil\cr
∖end{matrix}
\hfil \hfill horizontal glue; horizontal fill; can be used to set horizontal alignment in matrices and arrays; it ‘expands’ to fill available horizontal space, pushing contents on right or left to the boundary
$\begin{matrix} xxxxxx & xxxxxx & xxxxxx \cr ab & \hfill ab & ab\hfill\cr \end{matrix}$ ∖begin{matrix}
xxxxxx & xxxxxx & xxxxxx \cr
ab & \hfill ab & ab\hfill\cr
∖end{matrix}
$\hom$ \hom \hom homomorphism; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\begin{array}{l} \text{Side Angle Side}\\ \text{S}\hphantom{\text{ide }}\text{A}\hphantom{\text{ngle }}\text{S} \end{array}$ ∖begin{array}{l}
\text{Side Angle Side}\\
\text{S}\hphantom{\text{ide }}\text{A}\hphantom{\text{ngle }}\text{S}
∖end{array}
\hphantom creates horizontal space equal to that produced by its argument, but doesn't create any vertical space
$\href{http://www.onemathematicalcat.org}{M^{A^{T^H}}}$ \href{http://www.onemathematicalcat.org}{M^{A^{T^H}}} \href used to make a math object into a link
$w\hskip1em i\hskip2em d\hskip3em e\hskip4em r$ w\hskip1em i\hskip2em d\hskip3em e\hskip4em r \hskip horizontal glue; horizontal space; horizontal skipping;
$s\hspace7ex k\hspace6ex i\hspace5ex n\hspace4ex n\hspace3ex i\hspace2ex e\hspace1ex r$ s\hspace7ex k\hspace6ex i\hspace5ex n\hspace4ex n\hspace3ex i\hspace2ex e\hspace1ex r \hspace horizontal glue; horizontal space; horizontal skipping
$\huge AaBb\alpha\beta123\frac ab\sqrt x$ \huge AaBb\alpha\beta123\frac ab\sqrt x \Huge \huge turns on huge mode and an even bigger Huge mode
${\huge A B} A B$ {\huge A B} A B
$A\alpha\huge A\alpha \Huge A\alpha$ A\alpha\huge A\alpha \Huge A\alpha

I

$\def\iddots{ {\kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.}}}\\\iddots$ \def\iddots{ {\kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.}}}
\iddots
\iddots inner diagonal dots; This macro must be supplied by the user, if desired
$\int_a^b\\\intop_a^b$ \$\int_a^b
\intop_a^b\$
\int \intop integral with movable limits (inline mode)
$$\int_a^b\\\intop_a^b$$ \$\$\int_a^b
\intop_a^b\$\$
display mode
$\hat i\\\hat\imath$ \hat i
\hat\imath
\imath a dotless ‘i’
$\inf_{\rm limit}$ \$\inf_{\rm limit}\$ \inf infimum; greatest lower bound; does not change size; can change limit placement using \limits and \nolimits
$$\inf_{\rm limit}$$ \$\$\inf_{\rm limit}\$\$
$\injlim$ \injlim \injlim injective limit; does not change size; can change limit placement using \limits and \nolimits
${\bf ab \it ab} ab$ {\bf ab \it ab} ab \it turns on math italic mode; to return to math italic mode if it had been turned off
$\rm for\ all\ {\it x}\ in\ \Bbb R$ \rm for\ all\ {\it x}\ in\ \Bbb R
$\Delta\Gamma\Lambda{\it \Delta\Gamma\Lambda}$ \Delta\Gamma\Lambda{\it \Delta\Gamma\Lambda}

J

$\hat j\\\hat\jmath$ \hat j
\hat\jmath
\jmath a dotless ‘j’

K

$\ker$ \ker \ker kernel; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$|\kern 2ex|\kern 2em|\kern 2pt|$ |\kern 2ex|\kern 2em|\kern 2pt| \kern to get a specified amount of horizontal space; a negative argument forces ‘backing up’, so items can overlap
$\rm I\kern-2.5pt R$ \rm I\kern-2.5pt R

L

$\left\langle \matrix{a & b\cr c & d} \right\rangle$ \left\langle
\matrix{a & b\cr c & d}
\right\rangle
\langle left angle bracket; non-stretchy when used alone; stretchy when used with \left or \right
$\Large AaBb\alpha\beta123\frac ab$ \Large AaBb\alpha\beta123\frac ab \LARGE \Large \large turns on large typestyles; affects all math
${\Large A B} A B$ {\Large A B} A B
$AB \large AB \Large AB \LARGE AB$ AB \large AB \Large AB \LARGE AB
$\Large{AB}CD$ \Large{AB}CD
$\lbrace \frac ab, c \rbrace\\\left\lbrace \frac ab, c \right\rbrace$ \lbrace \frac ab, c \rbrace
\left\lbrace \frac ab, c \right\rbrace
\lbrace left brace: non-stretchy when used alone; stretchy when used with \left or \right
$\lbrack \frac ab, c \rbrack\\\left\lbrack \frac ab, c \right\rbrack$ \lbrack \frac ab, c \rbrack
\left\lbrack \frac ab, c \right\rbrack
\lbrack left bracket: non-stretchy when used alone; stretchy when used with \left or \right
$\left\lceil \matrix{a & b\cr c & d} \right\rceil$ \left\lceil
\matrix{a & b\cr c & d}
\right\rceil
\lceil left ceiling; non-stretchy when used alone; stretchy when used with \left or \right
$\left( \frac12 \right)\\\left\updownarrow \phantom{\frac12} \right\Updownarrow$ \left( \frac12 \right)
\left\updownarrow \phantom{\frac12} \right\Updownarrow
\left used for stretchy delimiters
$\sqrt[3]{x}\\\sqrt[3\leftroot1]{x}\\\root 3 \of x\\\root 3\leftroot{-1} \of x\\\root 3\leftroot{-1}\uproot2 \of x$ \sqrt[3]{x}
\sqrt[3\leftroot1]{x}
\root 3 \of x
\root 3\leftroot{-1} \of x
\root 3\leftroot{-1}\uproot2 \of x
\leftroot used to fine-tune the placement of the index inside \sqrt or \root; where the argument is a small integer: a positive integer moves the index to the left; a negative integer moves the index to the right
$\leqalignno{ 3x - 4y &= 5 &(\dagger) \cr x + 7 &= -2y &(\ddagger)\cr z &= 2 }$ \leqalignno{
3x - 4y &= 5 &(\dagger) \cr
x + 7 &= -2y &(\ddagger)\cr
z &= 2
}
\leqalignno equation alignment with optionally numbered (tagged) lines; output is the same in both inline and display modes (except for the amount of vertical space before and after)
$\lfloor$ \lfloor \lfloor left floor; non-stretchy when used alone; stretchy when used with \left or \right
$\lg$ \lg \lg does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\left\lgroup \matrix{a & b\cr c & d} \right\rgroup$ \left\lgroup
\matrix{a & b\cr c & d}
\right\rgroup
\lgroup left group; non-stretchy when used alone; stretchy when used with \left or \right
$\lim_{n\rightarrow\infty} f(x) = \ell$ \$\lim_{n\rightarrow\infty} f(x) = \ell\$ \lim limit; does not change size; can change limit placement using \limits and \nolimits;
$$\lim_{n\rightarrow\infty} f(x) = \ell$$ \$\$\lim_{n\rightarrow\infty} f(x) = \ell\$\$
$\liminf_{n\rightarrow\infty} f(x) = \ell$ \$\liminf_{n\rightarrow\infty} f(x) = \ell\$ \liminf limit inferior; does not change size; can change limit placement using \limits and \nolimits;
$$\liminf_{n\rightarrow\infty} f(x) = \ell$$ \$\$\liminf_{n\rightarrow\infty} f(x) = \ell\$\$
$\limsup_{n\rightarrow\infty} f(x) = \ell$ \$\limsup_{n\rightarrow\infty} f(x) = \ell\$ \limsup limit superior; does not change size; can change limit placement using \limits and \nolimits;
$$\limsup_{n\rightarrow\infty} f(x) = \ell$$ \$\$\limsup_{n\rightarrow\infty} f(x) = \ell\$\$
$\int_a^b f(x)\,dx\\\int\limits_a^b f(x)\,dx$ \$\int_a^b f(x)\,dx
\int\limits_a^b f(x)\,dx\$
\limits used to set limits above/below any token of class OP
$$\int_a^b f(x)\,dx\\\int\limits_a^b f(x)\,dx$$ \$\$\int_a^b f(x)\,dx
\int\limits_a^b f(x)\,dx\$\$
$\mathop{x}\limits_0^1$ \mathop{x}\limits_0^1
$a\mathrel{{=}\llap{/}}b\\a\mathrel{{=}\llap{/\,}}b\\a=\mathrel{\llap{/\,}}b$ a\mathrel{{=}\llap{/}}b
a\mathrel{{=}\llap{/\,}}b
a=\mathrel{\llap{/\,}}b
\llap left overlap creates a box of width zero; the argument is then placed just to the left of this zero-width box (and hence will overlap whatever lies to the left)
$\left\lmoustache \phantom{\matrix{a & b\cr c & d}} \right\rmoustache$ \left\lmoustache
\phantom{\matrix{a & b\cr c & d}}
\right\rmoustache
\lmoustache left moustache; non-stretchy when used alone; stretchy when used with \left or \right
$\ln$ \ln \ln natural logarithm; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\log$ \log \log logarithm; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$l\lower 2pt {owe} r$ l\lower 2pt {owe} r \lower lowers the argument by the amount specified; in TEX the argument to \lower (and \raise ) must be an \hbox , but in MathJax it can be any expression (using an \hbox is allowed, but not required)
$\left\lvert\frac{\frac ab}{\frac cd}\right\rvert$ \left\lvert\frac{\frac ab}{\frac cd}\right\rvert \lvert non-stretchy when used alone; stretchy when used with \left or \right
$\left\lVert\frac{\frac ab}{\frac cd}\right\rVert$ \left\lVert\frac{\frac ab}{\frac cd}\right\rVert \lVert non-stretchy when used alone; stretchy when used with \left or \right

M

$\mathbb R\\\mathbb ZR\\\mathbb{AaBbKk}Cc$ \mathbb R
\mathbb ZR
\mathbb{AaBbKk}Cc
\mathbb blackboard-bold for uppercase letters and lowercase ‘k’; if lowercase blackboard-bold letters are not available, then they are typeset in a roman font
$\mathbf{AaBb\alpha\beta123}\\\mathbf ZR\\\mathbf{uvw}xyz$ \mathbf{AaBb\alpha\beta123}
\mathbf ZR
\mathbf{uvw}xyz
\mathbf boldface for uppercase and lowercase letters and digits
$a\text{op} b\\a\mathbin{\text{op}} b\\a\Diamond b\\a\mathbin{\Diamond}b$ a\text{op} b
a\mathbin{\text{op}} b
a\Diamond b
a\mathbin{\Diamond}b
\mathbin gives the correct spacing to make an object into a binary operator; binary operators have some extra space around them
$\mathcal{ABCDEFGHIJKLM}$ \mathcal{ABCDEFGHIJKLM} \mathcal calligraphic font for uppercase letters and digits
$\mathcal{NOPQRSTUVWXYZ}$ \mathcal{NOPQRSTUVWXYZ}
$\mathcal{0123456789}$ \mathcal{0123456789}
$\mathcal{AB}AB$ \mathcal{AB}AB
$\mathchoice{D}{T}{S}{SS}\\\scriptstyle\mathchoice{D}{T}{S}{SS}\\\scriptscriptstyle\mathchoice{D}{T}{S}{SS}$ \$\mathchoice{D}{T}{S}{SS}
\scriptstyle\mathchoice{D}{T}{S}{SS}
\scriptscriptstyle\mathchoice{D}{T}{S}{SS}\$
\mathchoice provides content that is dependent on the current style (display, text, script, or scriptscript); can be used in defining a macro for general use; \mathchoice #1 #2 #3 #4 where:
#1 is rendered when the \mathchoice appears in display style
#2 is rendered when the \mathchoice appears in text style
#3 is rendered when the \mathchoice appears in script style
#4 is rendered when the \mathchoice appears in scriptscript style
$$\mathchoice{D}{T}{S}{SS}$$ \$\$\mathchoice{D}{T}{S}{SS}\$\$
$\def\puzzle{\mathchoice{D}{T}{S}{SS}}\\\puzzle{\puzzle\over\puzzle^{\puzzle^\puzzle}}$ \def\puzzle{\mathchoice{D}{T}{S}{SS}}
\$\puzzle{\puzzle\over\puzzle^{\puzzle^\puzzle}}\$
$$\puzzle{\puzzle\over\puzzle^{\puzzle^\puzzle}}$$ \$\$\puzzle{\puzzle\over\puzzle^{\puzzle^\puzzle}}\$\$
$a + \lt b\gt + c\\a + \mathopen\lt b\mathclose\gt + c$ a + \lt b\gt + c
a + \mathopen\lt b\mathclose\gt + c
\mathopen \mathclose the first command forces the argument to be treated in the ‘opening’ class; for example, like ‘(’ and ‘[’; creates an element of class OPEN; the second forces the argument to be treated in the ‘closing’ class; for example, like ‘)’ and ‘]’; creates an element of class CLOSE
$\mathfrak{ABCDEFGHIJKLM}\\\mathfrak{0123456789}\\\mathfrak{nopqrstuvwxyz}\\\mathfrak{AB}AB$ \mathfrak{ABCDEFGHIJKLM}
\mathfrak{0123456789}
\mathfrak{nopqrstuvwxyz}
\mathfrak{AB}AB
\mathfrak fraktur font for uppercase and lowercase letters and digits (and a few other characters)
$ab\text{inside}cd\\ab\mathinner{\text{inside}}cd$ ab\text{inside}cd
ab\mathinner{\text{inside}}cd
\mathinner some constructions are meant to appear ‘inside’ other formulas, and should be surrounded by additional space in certain circumstances; this classification is forced on the argument by using \mathinner
$\rm abc \mathit{def} ghi$ \rm abc \mathit{def} ghi \mathit math italic mode; in MathJax, this is the same as: \mit and \it
$atbtc\\a\mathop{t}b\mathop{t}c$ atbtc
a\mathop{t}b\mathop{t}c
\mathop forces the argument to be treated in the ‘large operator’ class; for example, like ‘∑’; creates an element of class OP
$$\star_a^b\\\mathop{\star}_a^b$$ \$\$\star_a^b
\mathop{\star}_a^b\$\$
$a+b+c\\a\mathord{+}b\mathord{+}c\\1,234,567\\1\mathord{,}234{,}567$ a+b+c
a\mathord{+}b\mathord{+}c
1,234,567
1\mathord{,}234{,}567
\mathord forces the argument to be treated in the ‘ordinary’ class; for example, like ‘/’; spacing is determined by pairs of tokens; there is no extra spacing between adjacent ORD's; there is extra spacing between an ORD and a BIN; creates an element of class ORD
$1.234\\1\mathpunct{.}234$ 1.234
1\mathpunct{.}234
\mathpunct forces the argument to be treated in the ‘punctuation’ class; for example, like ‘,’; punctuation tends to have some extra space after the symbol
$a \# b\\a \mathrel{\#} b$ a \# b
a \mathrel{\#} b
\mathrel forces the argument to be treated in the ‘relation’ class; for example, like ‘=’ and ‘>’; relations have a bit more space on both sides than binary operators
$\mathring A\\\mathring{AB}C$ \mathring A
\mathring{AB}C
\mathring
$\mathrm{AaBb\alpha\beta123}\\\mathrm ZR\\\mathrm{uvw}xyz$ \mathrm{AaBb\alpha\beta123}
\mathrm ZR
\mathrm{uvw}xyz
\mathrm roman typestyle for uppercase and lowercase letters
$\mathscr{ABCDEFGHIJKLM}\\\mathscr{NOPQRSTUVWXYZ}$ \mathscr{ABCDEFGHIJKLM}
\mathscr{NOPQRSTUVWXYZ}
\mathscr script typestyle for uppercase letters; if lowercase script letters are not available, then they are typeset in a roman typestyle. Whether lower-case letters are displayed in script, or not, depends on the fonts being used. The MathJax web-based fonts don't have lowercase script, but the STIX fonts do; so users with the STIX fonts installed will be able to display lowercase script letters
$\mathscr{0123456789}$ \mathscr{0123456789}
$\mathscr{abcdefghijklmnopqrstuvwxyz}$ \mathscr{abcdefghijklmnopqrstuvwxyz}
$\mathscr{AB}AB$ \mathscr{AB}AB
$\mathsf{ABCDEFGHIJKLM}\\\mathsf{NOPQRSTUVWXYZ}$ \mathsf{ABCDEFGHIJKLM}
\mathsf{NOPQRSTUVWXYZ}
\mathsf sans serif typestyle for uppercase and lowercase letters and digits; also affects uppercase greek (as do the other font switches, like \rm, \it, \bf, \mathrm, \mathit, \mathbf, etc)
$\mathsf{0123456789}$ \mathsf{0123456789}
$\mathsf{abcdefghijklmnopqrstuvwxyz}$ \mathsf{abcdefghijklmnopqrstuvwxyz}
$\Delta\Gamma\Lambda\mathsf{\Delta\Gamma\Lambda}$ \Delta\Gamma\Lambda\mathsf{\Delta\Gamma\Lambda}
$\mathsf{AB}AB$ \mathsf{AB}AB
$\sqrt3 + \sqrt\alpha\\\sqrt{\mathstrut 3} + \sqrt{\mathstrut\alpha}$ \sqrt3 + \sqrt\alpha
\sqrt{\mathstrut 3} + \sqrt{\mathstrut\alpha}
\mathstrut an invisible box whose width is zero; its height and depth are the same as a parenthesis ‘(’; can be used to achieve more uniform appearance in adjacent formulas
$\mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ} \mathtt typewriter typestyle for uppercase and lowercase letters and digits; also affects uppercase Greek
$\mathtt{0123456789}$ \mathtt{0123456789}
$\mathtt{abcdefghijklmnopqrstuvwxyz}$ \mathtt{abcdefghijklmnopqrstuvwxyz}
$\Delta\Gamma\Lambda\mathtt{\Delta\Gamma\Lambda}$ \Delta\Gamma\Lambda\mathtt{\Delta\Gamma\Lambda}
$\mathtt{AB}AB$ \mathtt{AB}AB
$\matrix{ a & b \cr c & d }$ \matrix{ a & b \cr c & d } \matrix matrix (without any delimiters)
$\max_{\rm sub}$ \$\max_{\rm sub}\$ \max maximum; does not change size; can change limit placement using \limits and \nolimits
$$\max_{\rm sub}$$ \$\$\max_{\rm sub}\$\$
$a + b \mbox{ (attention!) } = c\\a + b \text{ (attention!) } = c$ a + b \mbox{ (attention!) } = c
a + b \text{ (attention!) } = c
\mbox creates a box just wide enough to hold the text in its argument; no linebreaks are allowed in the text; text appears in \rm; in MathJax, these are essentially the same: \text, \hbox
$\{x | x\gt 1\}\\\{x \mid x\gt 1\}$ \{x | x\gt 1\}
\{x \mid x\gt 1\}
\mid the spacing is perfect for use in set-builder notation
$\min_{\rm sub}$ \$\min_{\rm sub}\$ \min minimum; does not change size; can change limit placement using \limits and \nolimits
$$\min_{\rm sub}$$ \$\$\min_{\rm sub}\$\$
$\mit{\Gamma\Delta\Theta\Omega}\\\mathit{\Gamma\Delta\Theta\Omega}\\\Gamma\Delta\Theta\Omega$ \mit{\Gamma\Delta\Theta\Omega}
\mathit{\Gamma\Delta\Theta\Omega}
\Gamma\Delta\Theta\Omega
\mit math italic typestyle; in MathJax, this is the same as: \mathit and \it
$ab\\a\mkern18mu b\\a\mkern18pt b$ ab
a\mkern18mu b
a\mkern18pt b
\mkern gives horizontal space; in MathJax, these all behave the same: \hskip, \hspace, \kern, \mskip, \mspace
$3\equiv 5 \mod 2$ 3\equiv 5 \mod 2 \mod modulus operator; modulo; the leading space depends on the style: displaystyle has 18 mu, others 12 mu; 2 thinspaces of following space; for things like equations modulo a number
$\rm tight\\\rm t\moveleft3pt ight$ \rm tight

\rm t\moveleft3pt ight
\moveleft \moveright shifts boxes to the left or right; the box takes up its original space (unlike something like \llap or \rlap ), but its contents are shifted (without affecting its bounding box)
$\rm t\moveleft3pt i\moveleft3pt g\moveleft3pt h\moveleft3pt t\\\rm t\moveleft3pt i\moveleft6pt g\moveleft9pt h\moveleft12pt t$ \rm t\moveleft3pt i\moveleft3pt g\moveleft3pt h\moveleft3pt t

\rm t\moveleft3pt i\moveleft6pt g\moveleft9pt h\moveleft12pt t
$\square\square\moveleft 2em {\diamond\diamond}\\\square\square\moveright 2em {\diamond\diamond}$ \square\square\moveleft 2em {\diamond\diamond}
\square\square\moveright 2em {\diamond\diamond}
$ab\\a\mskip18mu b\\a\mskip18pt b$ ab
a\mskip18mu b
a\mskip18pt b
\mskip gives horizontal space; in MathJax, these all behave the same: \hskip, \hspace, \kern, \mkern, \mspace
$ab\\a\mspace18mu b\\a\mspace18pt b$ ab
a\mspace18mu b
a\mspace18pt b
\mspace gives horizontal space; in MathJax, these all behave the same: \hskip, \hspace, \kern, \mkern, \mskip

N

$ab\\a\negthinspace b\\a\negmedspace b\\a\negthickspace b$ ab
a\negthinspace b
a\negmedspace b
a\negthickspace b
\negthinspace \negmedspace \negthickspace negative thin space, negative medium space, negative thick space
$\newcommand\myHearts {\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}} \myHearts\myHearts$ \newcommand\myHearts {\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}}

\myHearts\myHearts
\newcommand for defining your own commands (control sequences, macros, definitions); \newcommand must appear (within math delimiters) before it is used
$\newcommand\myHearts[2] {\color{#1}{\heartsuit}\kern-2.5pt\color{#2}{\heartsuit}} \myHearts{red}{blue}$ \newcommand\myHearts[2]
{\color{#1}{\heartsuit}\kern-2.5pt\color{#2}{\heartsuit}}

\myHearts{red}{blue}
A definition may take up to nine arguments
$\newenvironment{myHeartEnv} {\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}} {\text{ forever}} \begin{myHeartEnv} \end{myHeartEnv}$ \newenvironment{myHeartEnv}
{\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}}
{\text{ forever}}

∖begin{myHeartEnv}
∖end{myHeartEnv}
\newenvironment for defining your own environments; it must appear (within math delimiters) before it is used. The bracketed # of arguments is omitted when there are no arguments. There must not be a command having the same name as the environment
$\newenvironment{myHeartEnv}[2] {\color{#1}{\heartsuit}\kern-2.5pt\color{#2}{\heartsuit}} {\text{ forever}} \begin{myHeartEnv}{red}{blue} \end{myHeartEnv}$ \newenvironment{myHeartEnv}[2]
{\color{#1}{\heartsuit}\kern-2.5pt\color{#2}{\heartsuit}}
{\text{ forever}}

∖begin{myHeartEnv}{red}{blue} ∖end{myHeartEnv}
An environment may take up to nine arguments
$a\nobreakspace b$ a\nobreakspace b \nobreakspace in MathJax, this is the same as: \ (backslash space)
$$\sum_{k=1}^n a_k\\ \\\sum\nolimits_{k=1}^n a_k$$ \$\$\sum_{k=1}^n a_k

\sum\nolimits_{k=1}^n a_k\$\$
\nolimits used to change the default placement of limits
$\rm \scriptsize script \normalsize normal \large large$ \rm \scriptsize script \normalsize normal \large large \normalsize turns on normal size
$\notag$ \notag \notag used in AMS math environments that do automatic equation numbering, to suppress the equation number; it will cancel an explicit \tag; when auto-numbering is added, then this will work as expected;

O

$\oint$ \oint \oint changes size; can change limit placement using \limits
$\oldstyle 0123456789\\{\oldstyle AB}AB\\\oldstyle AB \rm AB\\\oldstyle{AB}CD$ \oldstyle 0123456789
{\oldstyle AB}AB
\oldstyle AB \rm AB
\oldstyle{AB}CD
\oldstyle this is intended for oldstyle numbers; it is a switch that turns on oldstyle mode; the way it works in TEX is to select the caligraphic font (which is where the oldstyle numbers are stored), so it has the side effect of selecting caligraphic upper-case letters; MathJax does the same for compatibility
$\operatorname{myFct}(x)\\\operatorname*{myFct}_a^b(x)$ \operatorname{myFct}(x)
\operatorname*{myFct}_a^b(x)
\operatorname This is similar to \DeclareMathOperator. For example, \operatorname{myOp} is equivalent to the use of \myOp , after having defined \DeclareMathOperator{\myOp}{myOp}. If displaystyle limits are desired in both inline and display modes, then use operatorname* instead of operatorname
$a \over b\\a+1 \over b+2\\{a+1 \over b+2}+c$ a \over b
a+1 \over b+2
{a+1 \over b+2}+c
\over general command for making fractions
$ \overbrace a+b+c\\ \overbrace {a+b+c}$ \overbrace a+b+c
\overbrace {a+b+c}
\overbrace puts a (stretchy) over-brace over the argument; can use ‘^’ to place an optional superscript over the overbrace; can use ‘_’ to place an optional subscript below the argument
$\overleftarrow{\text{the argument}}$ \overleftarrow{\text{the argument}} \overleftarrow stretchy over left arrow
$\overrightarrow{AB}\\\overrightarrow{AB\strut}$ \overrightarrow{AB}
\overrightarrow{AB\strut}
\overrightarrow stretchy over right arrow
$\overleftrightarrow{\hspace1in}$ \overleftrightarrow{\hspace1in} \overleftrightarrow stretchy over left right arrow
$\overline{AB}\\\overline a\\\overline{\text{a long argument}}$ \overline{AB}
\overline a
\overline{\text{a long argument}}
\overline stretchy overline
$\overparen a \\ \overparen ab \\ \overparen{ab} \\ \overparen{abc} \\ \overparen{abcdef} \\ \overparen{\underparen{abcd}}$ \overparen a
\overparen ab
\overparen{ab}
\overparen{abc}
\overparen{abcdef}
\overparen{\underparen{abcd}}
\overparen puts a (stretchy) over-parenthesis (over-arc, frown) over the argument
$\overset{\rm top}{\rm bottom}\\\overset ab\\a\,\overset{?}{=}\,b$ \overset{\rm top}{\rm bottom}
\overset ab
a\,\overset{?}{=}\,b
\overset \overset #1 #2 oversets argument #1 (in scriptstyle) over argument #2
$a \overwithdelims [ ] b$ a \overwithdelims [ ] b \overwithdelims general command for making fractions; uses default thickness for fraction bar for current size specifies left and right enclosing delimiters
$a+1 \overwithdelims . | b+2$ a+1 \overwithdelims . | b+2
${a+1 \overwithdelims \{ \} b+2}+c$ {a+1 \overwithdelims \{ \} b+2}+c

P

$\sqrt{\frac ab}\\\sqrt{\phantom{\frac ab}}$ \sqrt{\frac ab}
\sqrt{\phantom{\frac ab}}
\phantom it creates horizontal and vertical space equal to that of its argument, even though the argument isn't visible.
$\frac{2x+3y-\phantom{5}z} {\phantom{2}x+\phantom{3}y+5z}$ \frac{2x+3y-\phantom{5}z} {\phantom{2}x+\phantom{3}y+5z}
$\Gamma^{\phantom{i}j}_{i\phantom{j}k}$ \Gamma^{\phantom{i}j}_{i\phantom{j}k}
$\matrix{1&-1\cr 2&\phantom{-}3}$ \matrix{1&-1\cr 2&\phantom{-}3}
$A = \pmatrix{ a_{11} & a_{12} & \ldots & a_{1n} \cr a_{21} & a_{22} & \ldots & a_{2n} \cr \vdots & \vdots & \ddots & \vdots \cr a_{m1} & a_{m2} & \ldots & a_{mn} \cr }$ A = \pmatrix{
a_{11} & a_{12} & \ldots & a_{1n} \cr
a_{21} & a_{22} & \ldots & a_{2n} \cr
\vdots & \vdots & \ddots & \vdots \cr
}
\pmatrix matrix enclosed in parentheses
$a \pmb a \boldsymbol a\\\pmb{a+b-c}\ \ a+b-c$ a \pmb a \boldsymbol a
\pmb{a+b-c}\ \ a+b-c
\pmb poor man's bold; it works by duplicating its argument slightly offset, giving a bold effect (at least in the horizontal direction); doesn't work well for horizontal lines, like − or +
$5\equiv 8 \pmod 3\\\pmod{n+m}$ 5\equiv 8 \pmod 3
\pmod{n+m}
\pmod parenthesized modulus operator; parenthesized modulo; 18 mu of leading space before the opening parenthesis in display style; 8 mu of leading space before the opening parenthesis in other styles; 6 mu of space after the word mod
$x=y\pod{\text{inline mode}}$ \$x=y\pod{\text{inline mode}}\$ \pod parenthesized argument with leading space; 18 mu of leading space before the opening parenthesis in display style; 8 mu of leading space before the opening parenthesis in other styles
$$x=y\pod{\text{display mode}}$$ \$\$x=y\pod{\text{display mode}}\$\$
$\Pr_{\rm sub}$ \$\Pr_{\rm sub}\$ \pr does not change size; default limit placement can be changed using \limits and \nolimits
$$\Pr_{\rm sub}$$ \$\$\Pr_{\rm sub}\$\$
$f'\\f\prime\\f^\prime\\f^{\prime\prime}\\f''$ f'
f\prime
f^\prime
f^{\prime\prime}
f''
\prime prime character
$\prod_{j=1}^n\\\displaystyle {\prod_{j=1}^n}$ \prod_{j=1}^n

\displaystyle {\prod_{j=1}^n}
\prod changes size; can change limit placement using \limits and \nolimits
$\projlim$ \projlim \projlim projective limit; does not change size; can change limit placement using \limits and \nolimits

Q

$|\quad|\quad|$ |\quad|\quad| \quad is a 1em space
$|\qquad\hphantom{|}|$ |\qquad\hphantom{|}| \qquad is a 2em space

R

$h\raise 2pt {ighe} r$ h\raise 2pt {ighe} r \raise raises the argument by the amount specified
$\left\langle \matrix{a & b\cr c & d} \right\rangle$ \left\langle
\matrix{a & b\cr c & d}
\right\rangle
\rangle right angle bracket; non-stretchy when used alone; stretchy when used with \left or \right
$\left\lbrace \matrix{a & b\cr c & d} \right\rbrace$ \left\lbrace
\matrix{a & b\cr c & d}
\right\rbrace
\rbrace right brace; non-stretchy when used alone; stretchy when used with \left or \right
$\lbrack \frac ab, c \rbrack\\\left\lbrack \frac ab, c \right\rbrack$ \lbrack \frac ab, c \rbrack
\left\lbrack \frac ab, c \right\rbrack
\rbrack right bracket; non-stretchy when used alone; stretchy when used with \left or \right
$\left\lceil \matrix{a & b\cr c & d} \right\rceil$ \left\lceil
\matrix{a & b\cr c & d}
\right\rceil
\rceil right ceiling; non-stretchy when used alone; stretchy when used with \left or \right
$\renewcommand\myHearts {\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}} \myHearts\myHearts$ \renewcommand\myHearts {\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}}

\myHearts\myHearts
\renewcommand equivalent to \newcommand; for clarity of code, you may choose to use \renewcommand when re-defining a macro; this is different from actual TEX, where \renewcommand only allows redefining of an existing command
$\require{AMSsymbols}$ \require{AMSsymbols} \require This is a MathJax-specific macro that can be used to load MathJax TEX extensions (like the AMSmath extension) from within math mode, rather than having to include it in the configuration
$\rfloor$ \rfloor \rfloor right floor; non-stretchy when used alone; stretchy when used with \left or \right
$\left\lgroup \matrix{a & b\cr c & d} \right\rgroup$ \left\lgroup
\matrix{a & b\cr c & d}
\right\rgroup
\rgroup right group; non-stretchy when used alone; stretchy when used with \left or \right
$\left( \frac12 \right)$ \left( \frac12 \right) \right used for stretchy delimiters
$\left\updownarrow \phantom{\frac12} \right\Updownarrow$ \left\updownarrow \phantom{\frac12} \right\Updownarrow
$a \rlap{/}{=} b\\a \rlap{\;/}{=} b\\a \rlap /=b\\a \rlap /{=}b$ a \rlap{/}{=} b
a \rlap{\;/}{=} b
a \rlap /=b
a \rlap /{=}b
\rlap right overlap creates a box of width zero; the argument is then placed just to the right of this zero-width box (and hence will overlap whatever lies to the right)
$\rm AaBb\alpha\beta123\\{\rm A B} A B\\\Delta\Gamma\Lambda{\rm\Delta\Gamma\Lambda}\\\rm AB \bf CD\\\rm{AB}CD$ \rm AaBb\alpha\beta123
{\rm A B} A B
\Delta\Gamma\Lambda{\rm\Delta\Gamma\Lambda}
\rm AB \bf CD
\rm{AB}CD
\rm turns on roman; affects uppercase and lowercase letters, and digits; also affects uppercase Greek
$\left\lmoustache \phantom{\matrix{a & b\cr c & d}} \right\rmoustache$ \left\lmoustache
\phantom{\matrix{a & b\cr c & d}}
\right\rmoustache
\rmoustache right moustache; non-stretchy when used alone; stretchy when used with \left or \right
$\root 3 \of x\\\root 13 \of {\frac 12}\\\root n+1 \of x + 2$ \root 3 \of x
\root 13 \of {\frac 12}
\root n+1 \of x + 2
\root ... \of
$x\Rule{3px}{1ex}{2ex}x\\x\Rule{3px}{2ex}{1ex}x$ x\Rule{3px}{1ex}{2ex}x
x\Rule{3px}{2ex}{1ex}x
\Rule a MathJax-specific macro giving a rule with a specified width, height, and depth

S

$\scr ABCDEFGHIJKLM$ \scr ABCDEFGHIJKLM \scr turns on script typestyle for uppercase letters; lowercase letters are in a roman typestyle
$\scr NOPQRSTUVWXYZ$ \scr NOPQRSTUVWXYZ
${\scr AB}AB\\\scr AB \rm AB\\\scr{AB}CD$ {\scr AB}AB
\scr AB \rm AB
\scr{AB}CD
$\frac ab+\displaystyle\frac ab+\textstyle\frac ab+\scriptstyle\frac ab+\scriptscriptstyle\frac ab$ \frac ab+\displaystyle\frac ab+\textstyle\frac ab+\scriptstyle\frac ab+\scriptscriptstyle\frac ab \scriptscriptstyle used to over-ride automatic style rules and force scriptscript style; stays in force until the end of math mode or the braced group, or until another style is selected
$\frac ab + {\scriptscriptstyle \frac cd + \frac ef} + \frac gh$ \frac ab + {\scriptscriptstyle \frac cd + \frac ef} + \frac gh
$\frac ab + \scriptscriptstyle{\frac cd + \frac ef} + \frac gh$ \frac ab + \scriptscriptstyle{\frac cd + \frac ef} + \frac gh
$\rm \scriptsize script \normalsize normal \large large$ \rm \scriptsize script \normalsize normal \large large \scriptsize turns on script size
$\frac ab+\displaystyle\frac ab+\textstyle\frac ab+\scriptstyle\frac ab+\scriptscriptstyle\frac ab$ \frac ab+\displaystyle\frac ab+\textstyle\frac ab+\scriptstyle\frac ab+\scriptscriptstyle\frac ab \scriptstyle used to over-ride automatic style rules and force script style; stays in force until the end of math mode or the braced group, or until another style is selected
$\frac ab + {\scriptstyle \frac cd + \frac ef} + \frac gh$ \frac ab + {\scriptstyle \frac cd + \frac ef} + \frac gh
$\frac ab + \scriptstyle{\frac cd + \frac ef} + \frac gh$ \frac ab + \scriptstyle{\frac cd + \frac ef} + \frac gh
$\sec x\\\sec(2x-1)$ \sec x
\sec(2x-1)
\sec secant; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$A\setminus B\\A\backslash B$ A\setminus B
A\backslash B
\setminus set minus
$\sf ABCDEFGHIJKLM$ \sf ABCDEFGHIJKLM \sf turns on sans serif mode for uppercase and lowercase letters and digits, and for uppercase Greek
$\sf NOPQRSTUVWXYZ$ \sf NOPQRSTUVWXYZ
$\sf 0123456789$ \sf 0123456789
$\sf ABCDE 01234 abcde$ \sf ABCDE 01234 abcde
${\sf AB\Delta\Gamma\Lambda}\ AB\Delta\Gamma\Lambda$ {\sf AB\Delta\Gamma\Lambda}\ AB\Delta\Gamma\Lambda
$\sf AB \rm AB\\\sf{AB}CD$ \sf AB \rm AB
\sf{AB}CD
$\begin{multline} (a+b+c+d)^2 \\ + (i+j)^2 + (k+l)^2 \\ + (s+t)^2 + (u+v)^2 \\ + (w+x+y+z)^2 \end{multline}$ ∖begin{multline} (a+b+c+d)^2 \\
+ (i+j)^2 + (k+l)^2 \\
+ (s+t)^2 + (u+v)^2 \\
+ (w+x+y+z)^2
∖end{multline}
\shoveleft \shoveright forces flush left or flush right typesetting in a \multline or \multline* environment
$\begin{multline} (a+b+c+d)^2 \\ \shoveleft{+ (i+j)^2 + (k+l)^2} \\ \shoveright{+ (s+t)^2 + (u+v)^2} \\ + (w+x+y+z)^2 \end{multline}$ ∖begin{multline}
(a+b+c+d)^2 \\
\shoveleft{+ (i+j)^2 + (k+l)^2} \\
\shoveright{+ (s+t)^2 + (u+v)^2} \\
+ (w+x+y+z)^2
∖end{multline}
$\sideset{_1^2}{_3^4}\sum$ \sideset{_1^2}{_3^4}\sum \sideset used for putting symbols at the four ‘corners’ of a large operator (like ∑ or ∏)
$\sin x$ \sin x \sin sine; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\sinh x$ \sinh x \sinh hyperbolic sine; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\hat A\\\skew7\hat A$ \hat A
\skew7\hat A
\skew used to finely adjust the positioning on accents; particularly useful for adjusting superaccents (accents on accents); usually requires trial-and-error adjustment for proper positioning
$\tilde M$\\\skew{8}\tilde M \tilde M
\skew{8}\tilde M
$\hat{\hat A}\\\skew4\hat{\hat A}$ \hat{\hat A}
\skew4\hat{\hat A}
$\rm\tiny tiny \Tiny Tiny \small small \normalsize normal\\ \large lg \Large Lg \LARGE LG \huge hg \Huge Hg$ \rm\tiny tiny \Tiny Tiny \small small \normalsize normal \large lg \Large Lg \LARGE LG \huge hg \Huge Hg \small turns on small size; affects all math
$\def\myExp{\alpha\frac xy} \tiny\myExp \Tiny\myExp \small\myExp \normalsize\myExp \large\myExp \Large\myExp \\ \LARGE\myExp \huge\myExp \Huge\myExp$ \def\myExp{\alpha\frac xy} \tiny\myExp \Tiny\myExp \small\myExp \normalsize\myExp \large\myExp \Large\myExp \LARGE\myExp \huge\myExp \Huge\myExp
$ab{\small cd} cd\\ab\small{cd} cd$ ab{\small cd} cd
ab\small{cd} cd
$\sqrt{\frac ab} \sqrt{\smash{7}\vphantom{\frac ab}}$ \sqrt{\frac ab} \sqrt{\smash{7}\vphantom{\frac ab}} \smash By using \smash, \phantom, \hphantom, \vphantom, \rlap, \llap, you can typeset any mathematics, yet give it the width and/or height and/or depth of any other mathematics. Typesets the argument in a box with the same width as the argument, but with height and depth equal to zero. In other words: the argument of \smash is visible, and has its natural width, but does not contribute any height or depth to the surrounding mathematics (hence leaving the surrounding mathematics to dictate height and depth)
$\sqrt{\frac{\frac ab}{\frac cd}} \sqrt{\smash{\frac ef}\vphantom{\frac{\frac ab}{\frac cd}}}$ \sqrt{\frac{\frac ab}{\frac cd}} \sqrt{\smash{\frac ef}\vphantom{\frac{\frac ab}{\frac cd}}}
$\rlap{this}\hphantom{that}\\ \hphantom{that}\llap{this}$ \rlap{this}\hphantom{that}\\
\hphantom{that}\llap{this}
$\sqrt{\rm very\ wide} \sqrt{\rlap{\rm thin}\hphantom{\rm very\ wide}}$ \sqrt{\rm very\ wide} \sqrt{\rlap{\rm thin}\hphantom{\rm very\ wide}}
$\sqrt{\rm very\ wide} \sqrt{\hphantom{\rm very\ wide}\llap{\rm thin}}$ \sqrt{\rm very\ wide} \sqrt{\hphantom{\rm very\ wide}\llap{\rm thin}}
$\smash{this}\vphantom{that}\\ \rlap{\smash{this}}\phantom{that}\\ \phantom{that}\llap{\smash{this}}$ \smash{this}\vphantom{that}\\
\rlap{\smash{this}}\phantom{that}\\
\phantom{that}\llap{\smash{this}}
$\sqrt{\matrix{a & b\cr c & d}} \sqrt{ \rlap{\smash{\rm Hi!}} \phantom{\matrix{a & b\cr c & d}} }$ \sqrt{\matrix{a & b\cr c & d}} \sqrt{ \rlap{\smash{\rm Hi!}} \phantom{\matrix{a & b\cr c & d}} }
$a\space b$ a\space b \space in MathJax, this is the same as: \ (backslash space), \nobreakspace
$a\Rule{5px}{4ex}{2ex}^b_c d\quad\quad a\Space{5px}{4ex}{2ex}^b_c d$ a\Rule{5px}{4ex}{2ex}^b_c d
a\Space{5px}{4ex}{2ex}^b_c d
\Space a MathJax-specific macro giving space with a specified width, height, and depth
$\sqrt x\\\sqrt xy\\\sqrt{xy}\\\sqrt[3]{x+1}$ \sqrt x
\sqrt xy
\sqrt{xy}
\sqrt[3]{x+1}
\sqrt square root (and other roots)
$\stackrel{\rm def}{=}$ \stackrel{\rm def}{=} \stackrel stack relations; you can stack anything (not just relations) but it creates an item of class REL (and usually the bottom is a REL to start with, but doesn't have to be)
$\stackrel{\rm top}{\rm bottom}$ \stackrel{\rm top}{\rm bottom}
$\sqrt{(\ )} \sqrt{\mathstrut\rm mathstrut} \sqrt{\strut\rm strut}$ \sqrt{(\ )} \sqrt{\mathstrut\rm mathstrut} \sqrt{\strut\rm strut} \strut an invisible box with no width, height 8.6pt and depth 3pt; note that \mathstrut changes with the current size, but \strut does not
$\Tiny \sqrt{(\ )} \sqrt{\mathstrut\rm mathstrut} \sqrt{\strut\rm strut}$ \Tiny \sqrt{(\ )} \sqrt{\mathstrut\rm mathstrut} \sqrt{\strut\rm strut}
$\Large \sqrt{(\ )} \sqrt{\mathstrut\rm mathstrut}\\ \sqrt{\strut\rm strut}$ \Large \sqrt{(\ )} \sqrt{\mathstrut\rm mathstrut} \sqrt{\strut\rm strut}
$\frac{\style{color:red}{x+1}}{y+2}$ \frac{\style{color:red}{x+1}}{y+2} \style used to apply CSS styling to mathematics
$\style{background-color:yellow}{\frac{x+1}{y+2}}$ \style{background-color:yellow}{\frac{x+1}{y+2}}
$\sum_{ \substack{ 1\lt i\lt 3 \\ 1\le j\lt 5 }} a_{ij}$ \sum_{ \substack{ 1\lt i\lt 3 \\ 1\le j\lt 5 }} a_{ij} \substack use for multi-line subscripts or superscripts
$^{\substack{\text{a very} \\ \text{contrived} \\ \text{example} }} {\frac ab}_{\substack{ \text{isn't} \\ \text{it?} }}$ ^{\substack{\text{a very} \\ \text{contrived} \\ \text{example} }} {\frac ab}_{\substack{ \text{isn't} \\ \text{it?} }}
$\sum$ \sum \sum summation notation; changes size; can change limit placement using \limits and \nolimits
$\sup_{\rm limit}$ \sup_{\rm limit} \sup supremum; least upper bound; does not change size; can change limit placement using \limits and \nolimits
$\displaystyle {\sup_{\rm limit}}$ \displaystyle {\sup_{\rm limit}}

T

$\eqalign{ 3x - 4y &= 5\cr x + 7 &= -2y } \tag{3.1c}$ \eqalign{ 3x - 4y &= 5\cr x + 7 &= -2y } \tag{3.1c} \tag used primarily in AMS math environments to get tags (equation numbers, labels); can, however, be used on any equation; the argument of \tag is typeset in text mode, but math mode can be used within the text: for example, \tag{\$\bullet\$} You can use dollar signs in text-mode regardless of the settings of the inlineMath delimiters in the tex2jax preprocessor
$\tan x$ \tan x \tan tangent; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\tanh x$ \tanh x \tanh hyperbolic tangent; does not change size; default limit placement is the same in both inline and display modes; can change limit placement using \limits
$\tbinom n k$ \$\tbinom n k\$ \tbinom notation commonly used for binomial coefficients; in textstyle
$$\tbinom n k\\\binom n k$$ \$\$\tbinom n k
\binom n k\$\$
$\tbinom{n-1}k-1$ \tbinom{n-1}k-1
$\tbinom{n-1}{k-1}$ \tbinom{n-1}{k-1}
$|x| = x \text{ for all \(x \ge 0\)}$ |x| = x \text{ for all \(x \ge 0\)} \text \textbf \textit \textrm \textsf \texttt used to produce text-mode material (in a given font) within a mathematical expression; MathJax does not process any macros within the text; you can get math mode within the text using \(...\) delimiters
$\text{\alpha in text mode }\alpha$ \text{\alpha in text mode }\alpha
$\textbf{\alpha in textbf mode }\alpha$ \textbf{\alpha in textbf mode }\alpha boldface text
$\textit{\alpha in textit mode }\alpha$ \textit{\alpha in textit mode }\alpha italic text
$\textrm{\alpha in textrm mode }\alpha$ \textrm{\alpha in textrm mode }\alpha roman text
$\textsf{\alpha in textsf mode }\alpha$ \textsf{\alpha in textsf mode }\alpha sans serif text
$\texttt{\alpha in texttt mode }\alpha$ \texttt{\alpha in texttt mode }\alpha typewriter text
$$\frac ab + {\textstyle \frac cd + \frac ef} + \frac gh$$ \$\$\frac ab + {\textstyle \frac cd + \frac ef} + \frac gh\$\$ \textstyle used to over-ride automatic style rules and force text (inline) style; stays in force until the end of math mode or the braced group, or until another style is selected
$\frac ab+{\displaystyle\frac ab}+\frac ab+\textstyle\frac ab+\scriptscriptstyle\frac ab$ \$\frac ab+{\displaystyle\frac ab}+\frac ab+\textstyle\frac ab+\scriptscriptstyle\frac ab\$
$\tfrac ab \frac ab$ \$\tfrac ab \frac ab\$ \tfrac textstyle fraction
$$\tfrac ab \frac ab$$ \$\$\tfrac ab \frac ab\$\$
$a\thinspace b\thinspace c\thinspace d$ a\thinspace b\thinspace c\thinspace d \thinspace thin space; normally $ \frac 16 $ of a quad
$\tilde e\\\tilde E\\\tilde eu\\\tilde{eu}$ \tilde e
\tilde E
\tilde eu
\tilde{eu}
\tilde non-stretchy tilde accent
$\tiny AaBb\alpha\beta123\\{\tiny A B} A B\\\tiny AB\\\Tiny CD\tiny{AB}CD$ \tiny AaBb\alpha\beta123
{\tiny A B} A B
\tiny AB
\Tiny CD\tiny{AB}CD
\tiny turns on tiny; a bit smaller than \Tiny
$\Tiny AaBb\alpha\beta123\\{\Tiny A B} A B\\\Tiny AB \tiny CD\\\Tiny{AB}CD$ \Tiny AaBb\alpha\beta123
{\Tiny A B} A B
\Tiny AB \tiny CD
\Tiny{AB}CD
\Tiny turns on Tiny; a bit bigger than \tiny
$\tt AaBb\alpha\beta123\\{\tt A B} A B\\\tt AB \rm CD\\\tt{AB}CD$ \tt AaBb\alpha\beta123
{\tt A B} A B
\tt AB \rm CD
\tt{AB}CD
\tt turns on typewriter type

U

$\underbrace {x + \cdots + x}$ \underbrace {x + \cdots + x} \underbrace puts a (stretchy) under-brace under the argument; can use ‘^’ to place an optional superscript over the argument; can use ‘_’ to place an optional subscript below the underbrace
$\underleftarrow{\text{the argument}}$ \underleftarrow{\text{the argument}} \underleftarrow stretchy under left arrow
$\underrightarrow{AB}\\\underrightarrow{AB\strut}$ \underrightarrow{AB}
\underrightarrow{AB\strut}
\underrightarrow stretchy under right arrow
$\underleftrightarrow{\hspace1in}$ \underleftrightarrow{\hspace1in} \underleftrightarrow stretchy under left right arrow
$\underline{AB}\\\underline a\\\underline{\text{a long argument}}$ \underline{AB}
\underline a
\underline{\text{a long argument}}
\underline stretchy underline
$\underparen a \quad \underparen ab \quad \underparen{ab} \quad \underparen{abc} \\ \underparen{abcdef} \quad \underparen{\overparen{abcd}}$ \underparen a \quad \underparen ab \quad \underparen{ab} \quad \underparen{abc} \quad \underparen{abcdef} \quad \underparen{\overparen{abcd}} \underparen puts a (stretchy) under-parenthesis (under-arc, smile) under the argument
$\underset{\rm bottom}{\rm top}$ \underset{\rm bottom}{\rm top} \underset undersets argument #1 (in scriptstyle) under argument #2; the top item is properly aligned with the surrounding text (their baselines match)
$\underset ab$ \underset ab
$\unicode{x263a}\\☺$ \\unicode{x263a} &#x263a; \unicode allows arbitrary unicode code points to be entered in mathematics; can optionally specify height and depth of character (width is determined by browser); can optionally specify the default font from which to take the character; once a size and font are provided for a given unicode point, they need not be specified again in subsequent \unicode{} calls for that character
$\unicode[.55,0.05]{x22D6}$ \\unicode[.55,0.05]{x22D6} less-than with dot, with height 0.55em and depth 0.05em
$\unicode[.55,0.05][Garamond]{x22D6}$ \\unicode[.55,0.05][Garamond]{x22D6} same as above, taken from Garamond font
$\unicode[Arial]{x22D6}$ \\unicode[Arial]{x22D6} Arial with default (height,depth) of (0.8em,0.2em)
$\sqrt[3]{x}\\\sqrt[3\uproot2]{x}$ \sqrt[3]{x}
\sqrt[3\uproot2]{x}
\uproot used to fine-tune the placement of the index inside \sqrt or \root; a positive integer moves the index up; a negative integer moves the index down
$ \root 3 \of x \quad \root 3 \uproot{-2} \of x $ \root 3 \of x
\root 3\uproot{-2} \of x

V

$\varinjlim$ \varinjlim \varinjlim injective limit; variant; does not change size; can change limit placement using \limits and \nolimits
$\varlimsup$ \varlimsup \varlimsup limit superior; variant do not change size; can change limit placement using \limits and \nolimits
$\varliminf$ \varliminf \varliminf limit inferior; variant; do not change size; can change limit placement using \limits and \nolimits
$\varprojlim$ \varprojlim \varprojlim projective limit; variant; does not change size; can change limit placement using \limits and \nolimits
$\left(\Rule{1ex}{2em}{0pt}\right) \quad \left(\vcenter{\Rule{1ex}{2em}{0pt}}\right)$ \left(\Rule{1ex}{2em}{0pt}\right) \quad \left(\vcenter{\Rule{1ex}{2em}{0pt}}\right) \vcenter centers the argument on the ‘math axis’, which is at half the height of an ‘x’, or about the position of a minus sign; one of the reasons for \vcenter is to get stretchy delimiters to match the contents better
$\left(\frac{a+b}{\dfrac{c}{d}}\right) \quad \left(\vcenter{\frac{a+b}{\dfrac{c}{d}}}\right)$ \left(\frac{a+b}{\dfrac{c}{d}}\right) \quad \left(\vcenter{\frac{a+b}{\dfrac{c}{d}}}\right)
$\vec v \quad \vec{AB}$ \vec v \quad \vec{AB} \vec non-stretchy vector symbol
$\verb *x^2\sqrt y* \text{ yields } x^2\sqrt y \\ \verb !Text and \frac ab in \verb mode!$ \verb *x^2\sqrt y* \text{ yields } x^2\sqrt y
\verb !Text and \frac ab in \verb mode!
\verb verbatim mode; useful for code snippets and for displaying special characters ‘as is’ (i.e., not interpreted by MathJax). Only works in display mode. Usually, verbatim content is typeset in a sans serif font. To use \verb : First look through the material that is to be typeset ‘as is’ (verbatim). Choose a non-letter character that does not appear in this material. This chosen non-letter character will mark the beginning and end of the verbatim material, as illustrated in the examples
$\binom{\frac ab}c \binom{\vphantom{\frac ab}?}c \binom{\frac ab}c \binom{\vphantom{\frac ab}?}c $ \binom{\frac ab}c \binom{\vphantom{\frac ab}?}c \vphantom vertical phantom. Sometimes you want to pretend that something is there, for spacing reasons, but you don't want it to appear—you want it to be invisible—you want it to be a phantom. The box created by \vphantom has the height and depth of its argument, but its width is zero (so it doesn't contribute to any horizontal spacing issues). In other words, \vphantom creates vertical space equal to that produced by its argument, but doesn't create any horizontal space

W

$\widehat a\\\widehat A\\\widehat AB\\\widehat{AB}$ \widehat a
\widehat A
\widehat AB
\widehat{AB}
\widehat stretchy hat accent
$\widetilde a\\\widetilde A\\\widetilde AB\\\widetilde{AB}$ \widetilde a
\widetilde A
\widetilde AB
\widetilde{AB}
\widetilde stretchy tilde accent

X

$\xrightarrow a$ \xrightarrow a \xleftarrow \xrightarrow stretchy arrows with mathematical overset and optional mathematical underset
$\xrightarrow ab$ \xrightarrow ab
$\xrightarrow{ab}$ \xrightarrow{ab}
$\xleftarrow{\text{see equation (1)}}$ \xleftarrow{\text{see equation (1)}}
$\xrightarrow[f]{\text{see (1)}}$ \xrightarrow[f]{\text{see (1)}}

Environments

$\begin{align} (a+b)^2 &= (a+b)(a+b) \tag{3.1c} \\ &= a^2 + ab + ba + b^2 \tag{$\dagger$} \\ &= a^2 + 2ab + b^2 \tag{$\ast$} \end{align}$ ∖begin{align} (a+b)^2 &= (a+b)(a+b) \tag{3.1c} \\ &= a^2 + ab + ba + b^2 \tag{$\dagger$} \\ &= a^2 + 2ab + b^2 \tag{$\ast$} ∖end{align} align For vertical alignment of two or more lines at one or more places: ampersand(s) ‘&’ are used to indicate desired alignments a double backslash ‘\\’ or carriage return ‘\cr’ separates lines; individual lines may be tagged using the \tag{} command: default input for \tag{} is text you may get mathematical content inside \tag{} by using math delimiters; e.g., \tag{$\alpha$}
$\begin{align} a &= bbbbbb& &= cc& &= d \\ aaa &= bbbb& &= cccccc& &= ddd \end{align}$ ∖begin{align} a &= bbbbbb& &= cc& &= d \\ aaa &= bbbb& &= cccccc& &= ddd ∖end{align} Pushing all content to the left:
$\begin{align} a &= &bbbbbb &= &cc &= d \\ aaa &= &bbbb &= &cccccc &= ddd \end{align}$ ∖begin{align} a &= &bbbbbb &= &cc &= d \\ aaa &= &bbbb &= &cccccc &= ddd ∖end{align} Pushing all content to the right
$\begin{align} a &= bbb&bbb &= c&c &= d \\ aaa &= bb&bb &= ccc&ccc &= ddd \end{align}$ ∖begin{align} a &= bbb&bbb &= c&c &= d \\ aaa &= bb&bb &= ccc&ccc &= ddd ∖end{align} Splitting the content, with half left and half right
$\begin{alignat}{3} a &= bbbbbb& &= cc& &= d \tag{3.1} \\ aaa &= bbbb& &= cccccc& &= ddd \tag{3.2} \end{alignat}$ ∖begin{alignat}{3} a &= bbbbbb& &= cc& &= d \tag{3.1} \\ aaa &= bbbb& &= cccccc& &= ddd \tag{3.2} ∖end{alignat} alignat For vertical alignment of two or more lines at one or more places; produces a more horizontally-compressed display than align; the alignat environment is started with \begin{alignat}{num} , where num is a positive integer that indicates the number of places where alignment is desired
$\begin{alignat}{3} a &= &bbbbbb &= &cc &= d \\ aaa &= &bbbb &= &cccccc &= ddd \end{alignat}$ ∖begin{alignat}{3} a &= &bbbbbb &= &cc &= d \\ aaa &= &bbbb &= &cccccc &= ddd ∖end{alignat} Pushing all content to the right
$\begin{alignat}{3} a &= bbb&bbb &= c&c &= d \\ aaa &= bb&bb &= ccc&ccc &= ddd \end{alignat}$ ∖begin{alignat}{3} a &= bbb&bbb &= c&c &= d \\ aaa &= bb&bb &= ccc&ccc &= ddd ∖end{alignat} Splitting the content, with half left and half right
$\begin{array}{ll} aaa & b\cr c & ddd \end{array}$ ∖begin{array}{ll} aaa & b\cr c & ddd ∖end{array} array Used to create an array (matrix), where columns can be individually left-justified, centered, or right-justified. ‘l’ stands for left-justified, ‘c’ for centered, ‘r’ for right-justified, pipe character(s) ‘|’ can be used in the justification information to specify optional separating vertical line(s)
$\begin{array}{rr} aaa & b\cr c & ddd \end{array} $ ∖begin{array}{rr} aaa & b\cr c & ddd ∖end{array} both columns right-justified
$\begin{array}{c|c} aaa & b\cr c & ddd \end{array}$ ∖begin{array}{c|c} aaa & b\cr c & ddd ∖end{array} both columns centered, with separating line
$\begin{array}{lr} aaa & b\cr c & ddd \end{array}$ ∖begin{array}{lr} aaa & b\cr c & ddd ∖end{array} first column left-justified; second column right-justified
$\begin{array}{|lr} aaa & b\cr c & ddd \end{array}$ ∖begin{array}{|lr} aaa & b\cr c & ddd ∖end{array} Putting a pipe character ‘|’ at the beginning or end of the justification info encloses the entire structure
$\begin{Bmatrix} aaa & b\cr c & ddd \end{Bmatrix}$ ∖begin{Bmatrix} aaa & b\cr c & ddd ∖end{Bmatrix} Bmatrix Used to create a matrix (an array) with braces {,} as enclosing delimiters; columns are centered
$\begin{bmatrix} aaa & b\cr c & ddd \end{bmatrix}$ ∖begin{bmatrix} aaa & b\cr c & ddd ∖end{bmatrix} bmatrix Used to create a matrix (an array) with brackets [,] as enclosing delimiters; columns are centered
$\begin{eqnarray} y &=& (x-1)^2 \\ &=& (x-1)(x-1) \\ &=& x^2 - 2x + 1 \end{eqnarray}$ ∖begin{eqnarray} y &=& (x-1)^2 \\ &=& (x-1)(x-1) \\ &=& x^2 - 2x + 1 ∖end{eqnarray} eqnarray for ‘equation arrays’; aligns at one or more places; surround the character(s) to be aligned with ampersands; content between alignment characters (or between alignment characters and end-of-line) is left-justified
$\begin{eqnarray} (x-1)^2 &=& (x-1)(x-1) &=& x^2-2x + 1 \\ (x-1)^3 &=& (x-1)(x-1)(x-1) &=& (x-1)^2(x-1) \end{eqnarray}$ ∖begin{eqnarray} (x-1)^2 &=& (x-1)(x-1) &=& x^2-2x + 1 \\ (x-1)^3 &=& (x-1)(x-1)(x-1) &=& (x-1)^2(x-1) ∖end{eqnarray}
$\begin{gather} a = a \tag{$*$}\\ \text{if } a=b \text{ then } b=a \tag{$\dagger$}\\ \text{if } a=b \text{ and } b=c \text{ then } a=c\tag{3.1} \end{gather}$ ∖begin{gather} a = a \tag{$*$}\\ \text{if } a=b \text{ then } b=a \tag{$\dagger$}\\ \text{if } a=b \text{ and } b=c \text{ then } a=c\tag{3.1} ∖end{gather} gather to display any number of centered formulas (without any alignment); individual lines may be tagged using the \tag{} command
$\begin{matrix} aaa & b\cr c & ddd \end{matrix}$ ∖begin{matrix} aaa & b\cr c & ddd ∖end{matrix} matrix Used to create a matrix (an array) without any enclosing delimiters; columns are centered
$\begin{multline} \rm first\ line \\ \rm second\ line \\ \rm third\ line \\ \rm fourth\ line \end{multline}$ ∖begin{multline} \rm first\ line \\ \rm second\ line \\ \rm third\ line \\ \rm fourth\ line ∖end{multline} multline a multi-line environment; typically used for formulas/equations that don't fit on a single line the first (or only) line is displayed left-justified; the last line is displayed right-justified any intermediate line(s) are centered
$\begin{multline} \rm first\ line \\ \shoveleft\rm second\ line \\ \shoveright\rm third\ line \\ \rm fourth\ line \end{multline}$ ∖begin{multline} \rm first\ line \\ \shoveleft\rm second\ line \\ \shoveright\rm third\ line \\ \rm fourth\ line ∖end{multline} The justification of intermediate lines can be adjusted with \shoveleft and \shoveright
$\begin{pmatrix} aaa & b\cr c & ddd \end{pmatrix}$ ∖begin{pmatrix} aaa & b\cr c & ddd ∖end{pmatrix} pmatrix Used to create a matrix (an array) with parentheses (,) as enclosing delimiters; columns are centered
the matrix $\begin{smallmatrix} aaa & b\cr c & ddd \end{smallmatrix}$ is... the matrix \$∖begin{smallmatrix} aaa & b\cr c & ddd ∖end{smallmatrix}\$ is... smallmatrix Used to create a small matrix (an array); particularly suited for use in text; columns are centered
$$\left[ \begin{smallmatrix} aaa & b\cr c & ddd \end{smallmatrix} \right]$$ \$\$\left[ ∖begin{smallmatrix} aaa & b\cr c & ddd ∖end{smallmatrix} \right]\$\$ in display mode
$\left[ \begin{smallmatrix} aaa & b\cr c & ddd \end{smallmatrix} \right]$ \left[ ∖begin{smallmatrix} aaa & b\cr c & ddd \end{smallmatrix} ∖right] in inline mode
$\begin{split} \text{first line}\\ &\text{first aligned p.} &\text{second aligned p.} \\ &\text{more first al.}\qquad &\text{more second al.} \\ \text{no ampersands} \\ & &\text{aligned at 2nd pl.} \\ \text{no amps here} \end{split}$ ∖begin{split} \text{first line}\\ &\text{first aligned p.} &\text{second aligned p.} \\ &\text{more first al.}\qquad &\text{more second al.} \\ \text{no ampersands} \\ & &\text{aligned at 2nd pl.} \\ \text{no amps here} ∖end{split} split for single equations that are too long to fit on one line, and hence must be split into multiple lines; allows for (optional) alignment at one or more places, using ‘&’ to mark alignment points
$\prod_{\begin{subarray}{rl} i\lt 5 & j\gt 1 \\ k\ge2,\,k\ne 5 \quad & \ell\le 5,\,\ell\ne 2 \end{subarray}} x_{ijk\ell}$ \prod_{∖begin{subarray}{rl} i\lt 5 & j\gt 1 \\ k\ge2,\,k\ne 5 \quad & \ell\le 5,\,\ell\ne 2 ∖end{subarray}} x_{ijk\ell} subarray a more compact version of array; can be used for multi-subscripts and multi-superscripts on large operators; columns can be individually left-justified, centered, or right-justified
$\begin{Vmatrix} aaa & b\cr c & ddd \end{Vmatrix}$ ∖begin{Vmatrix} aaa & b\cr c & ddd ∖end{Vmatrix} Vmatrix Used to create a matrix (an array) with ∥,∥ as enclosing delimiters; columns are centered.
$\begin{vmatrix} aaa & b\cr c & ddd \end{vmatrix}$ ∖begin{vmatrix} aaa & b\cr c & ddd ∖end{vmatrix} vmatrix Used to create a matrix (an array) with |,| as enclosing delimiters; columns are centered.