Site icon texblog

Number sets (prime, natural, integer, rational, real and complex) in LaTeX

Number sets such as natural numbers () or complex numbers () are not provided by default by LaTeX. It doesn’t mean that LaTeX doesn’t know those sets, or more importantly their symbols…

There are two packages which provide the same set of symbols. You can choose to load either of them:

\usepackage{amsfonts} 
% or 
\usepackage{amssymb}

Now, you have access to the different set symbols through this command in math mode:

$\mathbb{set}$

Examples:

for prime numbers using \mathbb{P},
for whole numbers using \mathbb{W},
for natural numbers using \mathbb{N},
for integers using \mathbb{Z},
for irrational numbers using \mathbb{I},
for rational numbers using \mathbb{Q},
for real numbers using \mathbb{R} and
for complex numbers using \mathbb{C}.

for quaternions using \mathbb{H},
for octonions using \mathbb{O} and
for sedenions using \mathbb{S}

Positive and non-negative real numbers, and , can now be typeset using:

$\mathbb{R}_{>0}$ 
$\mathbb{R}_{\geq 0}$
Exit mobile version