Martin's Stuff

MathJax Guide

MathJax Guide

3. Math symbols and math fonts

3.1. Classes of math symbols

The symbols in a math formula fall into different classes that correspond more or less to the part of speech each symbol would have if the formula were expressed in words. Certain spacing and positioning cues are traditionally used for the different symbol classes to increase the readability of formulas.

Class number Mnemonic Description (part of speech) Examples
0Ordsimple/ordinary ("noun")\(A\:0\:\Phi\:\infty\)
1Opprefix operator\(\sum \prod \int\)
2Binbinary operator (conjunction)\(+ \cup \wedge\)
3Relrelation/comparison (verb)\(=\:<\:\subset\)
4Openleft/opening delimiter\((\:[\:\{\:\langle\)
5Closeright/closing delimiter\()\:]\:\}\:\rangle\)

Note 1. The distinction in \(\TeX\) between class 0 and an additional class 7 has to do only with font selection issues and is immaterial here.

Note 2. Symbols of class Bin, notably the minus sign \(-\), are automatically coerced to class 0 (no space) if they do not have a suitable left operand.

The spacing for a few symbols follows tradition instead of the general rule: although \(/\) is (semantically speaking) of class 2, we write \(k/2\) with no space around the slash rather than \(k\;/\;2\). And compare p|q \(p|q\) (no space) with p\mid q \(p\mid q\) (class-3 spacing).

3.2. Some symbols intentionally omitted here

The following math symbols are intentionally omitted from this discussion because they are superseded by equivalent symbols.

\Box,see \square \(\square\)
\Diamond,see \lozenge \(\lozenge\)
\leadsto,see \rightsquigarrow \(\rightsquigarrow\)
\Join,see \bowtie \(\bowtie\)
\lhd,see \vartriangleleft \(\vartriangleleft\)
\unlhd,see \trianglelefteq \(\trianglelefteq\)
\rhd,see \vartriangleright \(\vartriangleright\)
\unrhd,see \trianglerighteq \(\trianglerighteq\)

3.3. Latin letters and Arabic numerals

The Latin letters are simple symbols, class 0. The default font for them in math formulas is italic.

\[A\:B\:C\:D\:E\:F\:G\:H\:I\:J\:K\:L\:M\:N\:O\:P\:Q\:R\:S\:T\:U\:V\:W\:X\:Y\:Z\] \[a\:b\:c\:d\:e\:f\:g\:h\:i\:j\:k\:l\:m\:n\:o\:p\:q\:r\:s\:t\:u\:v\:w\:x\:y\:z\]

When adding an accent to an i or j in math, dotless variants can be obtained with \imath and \jmath:

\imath _ \jmath _ \hat{\jmath}

Arabic numerals 0-9 are also of class 0. Their default font is upright/roman.


3.4. Greek letters

Like the Latin letters, the Greek letters are simple symbols, class 0. For obscure historical reasons, the default font for lowercase Greek letters in math formulas is italic while the default font for capital Greek letters is upright/roman. (In other fields such as physics and chemistry, however, the typographical traditions are somewhat different.) The capital Greek letters not present in this list are the letters that have the same appearance as some Latin letter: A for Alpha, B for Beta, and so on. In the list of lowercase letters there is no omicron because it would be identical in appearance to Latin o. In practice, the Greek letters that have Latin look-alikes are seldom used in math formulas, to avoid confusion.

\Gamma \alpha \xi \digamma \Delta \beta \pi \varepsilon \Lambda \gamma \rho \varkappa \Phi \delta \sigma \varphi \Pi \epsilon \tau \varpi \Psi \zeta \upsilon \varrho \Sigma \eta \phi \varsigma \Theta \theta \chi \vartheta \Upsilon \iota \psi \Xi \kappa \omega \Omega \lambda _ \mu _ \nu

3.5. Other alphabetic symbols

These are also class 0.

\aleph \complement \hslash \circledS \Im \beth \ell \mho \Bbbk \Re \daleth \eth \partial \Finv \gimel \hbar \wp \Game

3.6. Miscellaneous simple symbols

These symbols are also of class 0 (ordinary) which means they do not have any built-in spacing.

\# \clubsuit \lozenge \square \& \diagdown \measuredangle \surd \angle \diagup \nabla \top \backprime \diamondsuit \natural \triangle \bigstar \emptyset \neg \triangledown \blacklozenge \exists \nexists \varnothing \blacksquare \flat \prime \blacktriangle \forall \sharp \blacktriangledown \heartsuit \spadesuit \bot \infty \sphericalangle

Note 1. A common mistake in the use of the symbols \(\square\) and \(\#\) is to try to make them serve as binary operators or relation symbols without using a properly defined math symbol command. If you merely use the existing commands \square or \# the inter-symbol spacing will be incorrect because those commands produce a class-0 symbol.

Note 2. Synonyms: \(\neg\) \lnot

3.7. Binary operator symbols

* \cdot \doublebarwedge \smallsetminus + \centerdot \gtrdot \sqcap - \circ \intercal \sqcup \amalg \circledast \leftthreetimes \star \ast \circledcirc \lessdot \times \barwedge \circleddash \ltimes \triangleleft \bigcirc \cup \mp \triangleright \bigtriangledown \Cup \odot \uplus \bigtriangleup \curlyvee \ominus \vee \boxdot \curlywedge \oplus \veebar \boxminus \dagger \oslash \wedge \boxplus \ddagger \otimes \wr \boxtimes \diamond \pm \bullet \div \rightthreetimes \cap \divideontimes \rtimes \Cap \dotplus \setminus

Synonyms: \(\land\) \land, \(\lor\) \lor, \(\doublecup\) \doublecup, \(\doublecap\) \doublecap

3.8. Relation symbols: \(<\:=\:>\:\succ\:\sim\) and variants

< \eqslantless \leqq \ngtr \sim = \equiv \leqslant \nleq \simeq > \fallingdotseq \lessapprox \nleqq \succ \approx \geq \lesseqgtr \nleqslant \succapprox \approxeq \geqq \lesseqqgtr \nless \succcurlyeq \asymp \geqslant \lessgtr \nprec \succeq \backsim \gg \lesssim \npreceq \succnapprox \backsimeq \ggg \ll \nsim \succneqq \bumpeq \gnapprox \lll \nsucc \succnsim \Bumpeq \gneq \lnapprox \nsucceq \succsim \circeq \gneqq \lneq \prec \thickapprox \cong \gnsim \lneqq \precapprox \thicksim \curlyeqprec \gtrapprox \lnsim \preccurlyeq \triangleq \curlyeqsucc \gtreqless \lvertneqq \preceq \doteq \gtreqqless \ncong \precnapprox \doteqdot \gtrless \neq \precneqq \eqcirc \gtrsim \ngeq \precnsim \eqsim \gvertneqq \ngeqq \precsim \eqslantgtr \leq \ngeqslant \risingdotseq

Synonyms: \(\ne\) \ne, \(\le\) \le, \(\ge\) \ge, \(\Doteq\) \Doteq, \(\llless\) \llless, \(\gggtr\) \gggtr

3.9. Relation symbols: arrows

See also Section 4.

\circlearrowleft \Lleftarrow \nwarrow \circlearrowright \longleftarrow \rightarrow \curvearrowleft \Longleftarrow \Rightarrow \curvearrowright \longleftrightarrow \rightarrowtail \downdownarrows \Longleftrightarrow \rightharpoondown \downharpoonleft \longmapsto \rightharpoonup \downharpoonright \longrightarrow \rightleftarrows \hookleftarrow \Longrightarrow \rightleftharpoons \hookrightarrow \looparrowleft \rightrightarrows \leftarrow \looparrowright \rightsquigarrow \Leftarrow \Lsh \Rrightarrow \leftarrowtail \mapsto \Rsh \leftharpoondown \multimap \searrow \leftharpoonup \nLeftarrow \swarrow \leftleftarrows \nLeftrightarrow \twoheadleftarrow \leftrightarrow \nRightarrow \twoheadrightarrow \Leftrightarrow \nearrow \upharpoonleft \leftrightarrows \nleftarrow \upharpoonright \leftrightharpoons \nleftrightarrow \upuparrows \leftrightsquigarrow \nrightarrow

Synonyms: \(\gets\) \gets, \(\to\) \to, \(\restriction\) \restriction

3.10. Relation symbols: miscellaneous

\backepsilon \nsubseteqq \smallsmile \therefore \because \nsupseteq \smile \trianglelefteq \between \nsupseteqq \sqsubset \trianglerighteq \blacktriangleleft \ntriangleleft \sqsubseteq \varpropto \blacktriangleright \ntrianglelefteq \sqsupset \varsubsetneq \bowtie \ntriangleright \sqsupseteq \varsubsetneqq \dashv \ntrianglerighteq \subset \varsupsetneq \frown \nvdash \Subset \varsupsetneqq \in \nVdash \subseteq \vartriangle \mid \nvDash \subseteqq \vartriangleleft \models \nVDash \subsetneq \vartriangleright \ni \parallel \subsetneqq \vdash \nmid \perp \supset \Vdash \notin \pitchfork \Supset \vDash \nparallel \propto \supseteq \Vvdash \nshortmid \shortmid \supseteqq \nshortparallel \shortparallel \supsetneq \nsubseteq \smallfrown \supsetneqq

Synonyms: \(\owns\) \owns

3.11. Cumulative (variable-size) operators

\int \bigodot \biguplus \prod \oint \bigoplus \bigvee \smallint \bigcap \bigotimes \bigwedge \sum \bigcup \bigsqcup \coprod

3.12. Punctuation

. _ ; _ ? _ \dotsm / _ \colon _ \dotsb _ \dotso | _ : _ \dotsc _ \ddots , _ ! _ \dotsi _ \vdots

Note 1. The : by itself produces a colon with class-3 (relation) spacing. The command \colon produces special spacing for use in constructions such as f\colon A\to B \(f\colon A\to B\).

Note 2. Although the commands \cdots and \ldots are frequently used, we recommend the more semantically oriented commands \dotsb \dotsc \dotsi \dotsm \dotso for most purposes (see 4.6).

3.13. Pairing delimiters (extensible)

( ) _ \lVert \rVert _ \lgroup \rgroup [ ] _ \langle \rangle _ \lmoustache \rmoustache \lbrace \rbrace _ \lceil \rceil \lvert \rvert _ \lfloor \rfloor

3.14. Nonpairing extensible symbols

\vert _ \arrowvert _ \backslash \Vert _ \Arrowvert _ \bracevert

Note 1. Using \vert, |, \Vert, or \| for paired delimiters is not recommended (see 6.2).

Synonyms: \(\|\) \|

3.14. Nonpairing extensible symbols

\uparrow _ \downarrow _ \updownarrow \Uparrow _ \Downarrow _ \Updownarrow

3.16. Accents

\acute{x} \bar{x} \vec{x} \widetilde{xxx} \grave{x} \breve{x} \dot{x} \widehat{xxx} \ddot{x} \check{x} \ddot{x} \tilde{x} \hat{x} \dddot{x}

3.17. Named operators

These operators are represented by a multiletter abbreviation.

\arccos \det \liminf \sinh \arcsin \dim \limsup \sup \arctan \exp \ln \tan \arg \gcd \log \tanh \cos \hom \max \varinjlim \cosh \inf \min \varprojlim \cot \injlim \Pr \varliminf \coth \ker \projlim \varlimsup \csc \lg \sec \deg \lim \sin

To define additional named operators outside the above list, use the \DeclareMathOperator command; for example, after


one could write

\rank(x) \esssup(y,z)

The star form \DeclareMathOperator* creates an operator that takes limits in a displayed formula like sup or max.

When predefining such a named operator is problematic (e.g., when using one in the title or abstract of an article), there is an alternative form that can be used directly:


3.18. Math font switches

default \mathrm \mathbf \mathsf \mathit \mathcal \mathbb \mathfrak \mathscr \mathtt
\(X\) \(\mathrm X\) \(\mathbf X\) \(\mathsf X\) \(\mathit X\) \(\mathcal X\) \(\mathbb X\) \(\mathfrak X\) \(\mathscr X\) \(\mathtt X\)
\(x\) \(\mathrm x\) \(\mathbf x\) \(\mathsf x\) \(\mathit x\) \(\mathcal x\) \(\mathbb x\) \(\mathfrak x\) \(\mathscr x\) \(\mathtt x\)
\(0\) \(\mathrm 0\) \(\mathbf 0\) \(\mathsf 0\) \(\mathit 0\) \(\mathcal 0\) \(\mathbb 0\) \(\mathfrak 0\) \(\mathscr 0\) \(\mathtt 0\)

A common desire is to get a bold version of a particular math symbol. For those symbols where \mathbf is not applicable, the \boldsymbol or \pmb commands can be used

A_\infty + \pi A_0
\sim \mathbf{A}_{\boldsymbol{\infty}} 
\boldsymbol{+} \boldsymbol{\pi} 
\pmb{+}\pmb{\pi} \pmb{A}_{\pmb{0}}
\[ A_\infty + \pi A_0 \sim \mathbf{A}_{\boldsymbol{\infty}} \boldsymbol{+} \boldsymbol{\pi} \mathbf{A}_{\boldsymbol{0}} \sim\pmb{A}_{\pmb{\infty}} \pmb{+}\pmb{\pi} \pmb{A}_{\pmb{0}} \]

3.18.1. Calligraphic letters

\[\mathcal{A\:B\:C\:D\:E\:F\:G\:H\:I\:J\:K\:L\:M\:N\:O\:P\:Q\:R\:S\:T\:U\:V\:W\:X\:Y\:Z}\] \[\mathcal{a\:b\:c\:d\:e\:f\:g\:h\:i\:j\:k\:l\:m\:n\:o\:p\:q\:r\:s\:t\:u\:v\:w\:x\:y\:z\quad 0\:1\:2\:3\:4\:5\:6\:7\:8\:9}\]

3.18.2. Blackboard Bold letters

\[\mathbb{A\:B\:C\:D\:E\:F\:G\:H\:I\:J\:K\:L\:M\:N\:O\:P\:Q\:R\:S\:T\:U\:V\:W\:X\:Y\:Z}\] \[\mathbb{a\:b\:c\:d\:e\:f\:g\:h\:i\:j\:k\:l\:m\:n\:o\:p\:q\:r\:s\:t\:u\:v\:w\:x\:y\:z\quad 0\:1\:2\:3\:4\:5\:6\:7\:8\:9}\]

3.18.3. Fraktur letters

\[\mathfrak{A\:B\:C\:D\:E\:F\:G\:H\:I\:J\:K\:L\:M\:N\:O\:P\:Q\:R\:S\:T\:U\:V\:W\:X\:Y\:Z}\] \[\mathfrak{a\:b\:c\:d\:e\:f\:g\:h\:i\:j\:k\:l\:m\:n\:o\:p\:q\:r\:s\:t\:u\:v\:w\:x\:y\:z\quad 0\:1\:2\:3\:4\:5\:6\:7\:8\:9}\]

3.18.4. Script letters

\[\mathscr{A\:B\:C\:D\:E\:F\:G\:H\:I\:J\:K\:L\:M\:N\:O\:P\:Q\:R\:S\:T\:U\:V\:W\:X\:Y\:Z}\] \[\mathscr{a\:b\:c\:d\:e\:f\:g\:h\:i\:j\:k\:l\:m\:n\:o\:p\:q\:r\:s\:t\:u\:v\:w\:x\:y\:z\quad 0\:1\:2\:3\:4\:5\:6\:7\:8\:9}\]

3.18.5. Typewriter letters

\[\mathtt{A\:B\:C\:D\:E\:F\:G\:H\:I\:J\:K\:L\:M\:N\:O\:P\:Q\:R\:S\:T\:U\:V\:W\:X\:Y\:Z}\] \[\mathtt{a\:b\:c\:d\:e\:f\:g\:h\:i\:j\:k\:l\:m\:n\:o\:p\:q\:r\:s\:t\:u\:v\:w\:x\:y\:z\quad 0\:1\:2\:3\:4\:5\:6\:7\:8\:9}\]

3.18.6. Sans serif letters

\[\mathsf{A\:B\:C\:D\:E\:F\:G\:H\:I\:J\:K\:L\:M\:N\:O\:P\:Q\:R\:S\:T\:U\:V\:W\:X\:Y\:Z}\] \[\mathsf{a\:b\:c\:d\:e\:f\:g\:h\:i\:j\:k\:l\:m\:n\:o\:p\:q\:r\:s\:t\:u\:v\:w\:x\:y\:z\quad 0\:1\:2\:3\:4\:5\:6\:7\:8\:9}\]

Copyright © 2011-2014 by Martin Keefe.