Natural numbers are positive numbers starting from 1 to ∞, represented by the ℕ symbol.
LaTeX does not have a built-in command for this symbol, so an external package is required. There are four LaTeX packages available, each using the same command to display ℕ.
The \mathbb{N}
command requires the capital letter ℕ as its argument.
Package | Command and output |
---|---|
amsfonts | \mathbb{N} → ℕ |
amssymb | \mathbb{N} → ℕ |
txfonts | \mathbb{N} → |
pxfonts | \mathbb{N} → |
In LaTeX, this can be written using the \mathbb{N}
command from the amsfonts
package. The following example shows how to properly format natural numbers in set notation.
\documentclass{article}
\usepackage{amsfonts}
\begin{document}
\[ \mathbb{N}=\{1,2,3,\ldots,\infty\} \]
\end{document}
Output :
This notation clearly defines natural numbers as an infinite set of positive integers.