The amssymb package
Adds about 200 math symbols and the alphabets \mathbb and \mathfrak, for example \mathbb{R}, \leqslant, \nmid and \therefore.
Loading the package
\usepackage{amssymb}Plain LaTeX has no blackboard bold letters for number sets and only a few negated relations. amssymb gives names to the symbols of the AMS fonts: negated relations such as \nleq and \nsubseteq, slanted inequality signs, more arrows, \varnothing, \square and others.
The package loads amsfonts, which provides \mathbb and \mathfrak. It does not depend on amsmath; you can load either one without the other.
Main commands
\mathbb{R} | Blackboard bold capital letter, used for number sets. |
\mathfrak{g} | Fraktur letter. |
\leqslant, \geqslant | Inequality signs with a slanted lower bar. |
\nmid, \nleq, \nsubseteq | Negated relations: does not divide, not less than or equal, not a subset. |
\varnothing | Empty set as a slashed circle. |
\therefore, \because | Three dots for "therefore" and "because". |
\square, \blacksquare | Open and filled square, often used as an end-of-proof mark. |
Complete example
\documentclass{article}
\usepackage{amssymb}
\begin{document}
The number sets satisfy
$\mathbb{N} \subsetneq \mathbb{Z} \subsetneq \mathbb{Q} \subsetneq \mathbb{R}$.
For every $x \in \mathbb{R}$ with $x \geqslant 0$ there is a root $\sqrt{x}$.
Since $3 \nmid 10$, the set $\{k \in \mathbb{Z} : 3k = 10\}$ equals $\varnothing$.
Let $\mathfrak{g}$ be a Lie algebra. $\therefore$ $a \lesssim b$. \hfill $\blacksquare$
\end{document}Compiled with pdfLaTeX from TeX Live 2023.
Pitfalls
\mathbbhas capital letters only.\mathbb{a}and\mathbb{1}print other symbols of the font, without a warning.- Loaded after
newtxmath,amssymbstops because\Bbbkis already defined. Loadamssymbfirst. - Do not load it together with
unicode-math, which defines most of these symbols itself;amssymbthen reports commands that are already defined.
Related pages
- How-to Math fonts in LaTeX
- Package
amsmath - Error Command \vec already defined
- Error Undefined control sequence
- How-to Define your own commands in LaTeX