Natural Numbers in LaTeX (\mathbb{N})

N\mathbb{N}
LaTeX command
\mathbb{N}
Package
Add to your preamble:\usepackage{amssymb}
Mode
Math mode only
Copy the Unicode character
ℕU+2115

Where it is used

Blackboard-bold N, the standard symbol for the set of natural numbers 1, 2, 3, and so on.

Whether \mathbb{N} includes 0 varies: logic and computer science usually start at 0, while number theory often starts at 1, so state your convention or write \mathbb{N}_0 or \mathbb{Z}_{\ge 0} and \mathbb{Z}_{>0}. The \mathbb font in the standard blackboard-bold font covers uppercase letters only, so \mathbb{1} or lowercase letters will not render as expected without another font package. Many authors define \newcommand{\N}{\mathbb{N}} for brevity. Sequences are often written (a_n)_{n \in \mathbb{N}}. Induction proofs typically begin with for all n \in \mathbb{N}.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

∑n∈N1n2=π26\sum_{n \in \mathbb{N}} \frac{1}{n^2} = \frac{\pi^2}{6}
\documentclass{article}
\usepackage{amssymb}
\begin{document}
Natural Numbers: $\mathbb{N}$

\[ \sum_{n \in \mathbb{N}} \frac{1}{n^2} = \frac{\pi^2}{6} \]
\end{document}

Related symbols

All نظرية المجموعات →

Frequently asked questions

How do I write Natural Numbers in LaTeX?
Type \mathbb{N} in math mode, for example $\sum_{n \in \mathbb{N}} \frac{1}{n^2} = \frac{\pi^2}{6}$. Load amssymb first with \usepackage{amssymb}.
Which package do I need for \mathbb{N}?
\mathbb{N} needs amssymb: add \usepackage{amssymb} to your preamble before the document starts.
Can I use \mathbb{N} in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\mathbb{N}$ in running text. If you only need the glyph in text, paste the Unicode character ℕ instead (with XeLaTeX or LuaLaTeX and a font that has it).
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث