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

By thurnherr

Number sets such as natural numbers (\mathbb{N}) or complex numbers (\mathbb{C}) 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 either of them:

\usepackage{amsfonts}

or

\usepackage{amssymb}.

Now, you have access to all the different sets through the command:

\mathbb{set}

Examples:

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

Positive real numbers can now be easily expressed :

\mathbb{R}_{\geq0} by typing \mathbb{R}_{\leq0}.

Tags: , , , , ,

6 Responses to “Number sets (prime, natural, integer, rational, real and complex) in Latex”

  1. Lasaro Says:

    In the last line, where “\leq0″ should be replaced by “\geq 0″

  2. Cesar Says:

    Thanks guy! That’s really help

  3. the mad hatter Says:

    Yep, this helped me ! Thanks!

  4. mathguy Says:

    Shouldn’t the integers be Z not I?

  5. Sean Says:

    Wow, awesome! Exactly what I needed: thanks!

Leave a Reply