Blackboard Bold in LaTeX: \mathbb{R}, Number Sets, Lowercase and Digits
Blackboard bold (also called double-struck) is the lettering with a doubled vertical stroke: ℕ, ℤ, ℚ, ℝ, ℂ. In LaTeX you get it with \mathbb{R} after loading amssymb, in math mode only, and for uppercase letters only. This page covers the command, a copy-paste table of all 26 letters with their Unicode code points, the packages that add lowercase letters and digits, the Unicode-engine route, and the errors people hit.
Every example here was compiled on TeX Live 2025. If you only need the real numbers symbol and its meaning, the shorter post on the real numbers symbol ℝ covers that one letter; this guide is the general how-to.
What Blackboard Bold Is Used For
Blackboard bold marks a letter as a fixed, named object rather than a variable. The classic uses:
- Number systems: ℕ natural numbers, ℤ integers, ℚ rationals, ℝ reals, ℂ complex numbers, ℍ quaternions.
- Probability: 𝔼 for expectation, ℙ for a probability measure, and the indicator function 𝟙A.
- Algebra and geometry: 𝔽q for a finite field, 𝕂 for an arbitrary field, ℙn for projective space, 𝔸n for affine space, 𝕊n for the sphere, 𝕋 for the torus, 𝔻 for the unit disc.
The name is literal. Bold type is hard to write with chalk, so lecturers doubled one stroke of the letter instead, and the chalkboard form made its way back into print. Printed books traditionally used bold (R) for the same sets; see the comparison below before you decide which to use.
The Command: \mathbb with amssymb
\mathbb is defined by the amsfonts package. amssymb loads amsfonts and adds the AMS symbol commands, so most documents load amssymb and get both. Either package is enough for \mathbb; both compiled identically in our tests. The command only works in math mode, so wrap it in $...$, \( ... \) or a display environment.
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb} % loads amsfonts, which defines \mathbb
\begin{document}
The number sets: $\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q}
\subset \mathbb{R} \subset \mathbb{C}$.
A function $f\colon \mathbb{R}^n \to \mathbb{R}$, the finite field
$\mathbb{F}_q$, projective space $\mathbb{P}^n(\mathbb{C})$ and a
Hilbert space $\mathbb{H}$.
\[
\forall \varepsilon > 0\; \exists N \in \mathbb{N} :
n > N \implies |x_n - x| < \varepsilon .
\]
\end{document}Note the braces: \mathbb{R}^n puts the exponent outside the blackboard bold letter. \mathbb{R^n} compiles, but the n is then looked up in the blackboard bold font, where that slot holds the \ltimes symbol ⋉; see common mistakes.
Two errors and what they mean
| Error in the log | Cause | Fix |
|---|---|---|
LaTeX Error: \mathbb allowed only in math mode. | You wrote \mathbb{R} in running text. | Wrap it: $\mathbb{R}$. |
Undefined control sequence. pointing at \mathbb | Neither amssymb nor amsfonts is loaded. | Add \usepackage{amssymb} to the preamble. |
Shortcuts: \R, \N, \Z are not predefined
Typing \mathbb{R} fifty times is tedious, and many papers define one-letter macros. None of them exist until you define them: \R on its own is an undefined control sequence. Put these in the preamble:
\usepackage{amssymb}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\Prob}{\mathbb{P}} % \P is already taken
% then in the text:
$f\colon \R^n \to \R$, \quad $\E[X] = \sum_{k \in \N} k\,\Prob(X = k)$A few single letters are already LaTeX commands and \newcommand will refuse them with "Command ... already defined": \P is the pilcrow ¶, \S the section sign §, \L and \O are Ł and Ø, and \H is the double-acute accent. Use \Prob, \Sph, \Hil or similar for those, or \renewcommand if you are sure you never need the original. \N, \Z, \Q, \R, \C, \E and \F are free in a plain article, though a class or package you load later might define them.
Every Blackboard Bold Letter with Its Unicode Code Point
All 26 uppercase letters work with \mathbb. The Unicode characters are useful for copy-pasting into plain text, Markdown, or a Unicode-engine LaTeX document (see below). Seven letters, ℂ ℍ ℕ ℙ ℚ ℝ ℤ, were encoded early in the Letterlike Symbols block (U+2100 to U+214F); the other nineteen live in Mathematical Alphanumeric Symbols at U+1D538 to U+1D550, which skips the seven slots already taken.
| LaTeX | Symbol | Unicode | Common meaning |
|---|---|---|---|
\mathbb{A} | 𝔸 | U+1D538 | Affine space, adeles |
\mathbb{B} | 𝔹 | U+1D539 | Boolean domain, closed ball |
\mathbb{C} | ℂ | U+2102 | Complex numbers |
\mathbb{D} | 𝔻 | U+1D53B | Unit disc |
\mathbb{E} | 𝔼 | U+1D53C | Expectation |
\mathbb{F} | 𝔽 | U+1D53D | Field, finite field 𝔽q |
\mathbb{G} | 𝔾 | U+1D53E | Algebraic group |
\mathbb{H} | ℍ | U+210D | Quaternions, upper half-plane |
\mathbb{I} | 𝕀 | U+1D540 | Unit interval, identity |
\mathbb{J} | 𝕁 | U+1D541 | |
\mathbb{K} | 𝕂 | U+1D542 | Arbitrary field |
\mathbb{L} | 𝕃 | U+1D543 | |
\mathbb{M} | 𝕄 | U+1D544 | |
\mathbb{N} | ℕ | U+2115 | Natural numbers |
\mathbb{O} | 𝕆 | U+1D546 | Octonions |
\mathbb{P} | ℙ | U+2119 | Probability, projective space, primes |
\mathbb{Q} | ℚ | U+211A | Rational numbers |
\mathbb{R} | ℝ | U+211D | Real numbers |
\mathbb{S} | 𝕊 | U+1D54A | Sphere 𝕊n |
\mathbb{T} | 𝕋 | U+1D54B | Torus, unit circle |
\mathbb{U} | 𝕌 | U+1D54C | |
\mathbb{V} | 𝕍 | U+1D54D | Vector space, variety |
\mathbb{W} | 𝕎 | U+1D54E | Whole numbers (some texts) |
\mathbb{X} | 𝕏 | U+1D54F | |
\mathbb{Y} | 𝕐 | U+1D550 | |
\mathbb{Z} | ℤ | U+2124 | Integers |
Lowercase letters run from 𝕒 (U+1D552) to 𝕫 (U+1D56B) in alphabetical order, so 𝕜 is U+1D55C and 𝕣 is U+1D563. The digits 𝟘 to 𝟡 are U+1D7D8 to U+1D7E1, so the indicator one 𝟙 is U+1D7D9. None of these lowercase or digit characters come from \mathbb with amssymb; the next section shows how to get them.
Lowercase Letters and Digits: dsfont, bbm and bbold
The AMS font behind \mathbb holds only A to Z. The one lowercase letter amssymb offers is \Bbbk for 𝕜. For a double-struck 1 or a lowercase letter you need another package. We compiled all three; here is what each actually provides.
| Package | Command | Uppercase | Lowercase | Digits | Notes |
|---|---|---|---|---|---|
amssymb | \mathbb | Yes | Only \Bbbk | No | The standard. Type 1 fonts. |
dsfont | \mathds | Yes | No | Only 1 | Made for 𝟙. Type 1 fonts; [sans] option for a sans-serif design. |
bbm | \mathbbm | Yes | Yes | Only 1 and 2 | Bitmap (Type 3) fonts on TeX Live 2025, so it looks rough when zoomed. |
bbold | \mathbb | Yes | Yes | Yes, 0 to 9 | Lighter, sans-serif design. Replaces \mathbb for the whole document. |
dsfont: the usual choice for 𝟙
\usepackage{amssymb}
\usepackage{dsfont} % or \usepackage[sans]{dsfont}
$\mathds{1}_A(x)$, \quad $\mathds{R}$, $\mathds{N}$, \quad compare $\mathbb{R}$\mathds{1} is the standard way to typeset an indicator function. The dsfont letters are a slightly different design from the AMS ones, so most authors keep \mathbb for sets and use \mathds only for the 1. In our compile, \mathds{r}, \mathds{0} and \mathds{2} each printed nothing and left a "Missing character" warning in the log: the font has no such glyphs.
bbm: upper and lowercase
\usepackage{bbm}
$\mathbbm{1}_A$, \quad $\mathbbm{r}$, $\mathbbm{abc}$, \quad $\mathbbm{R}$,
\quad sans $\mathbbmss{1}$, \quad typewriter $\mathbbmtt{1}$bbm gives both cases and three designs (serif, sans, typewriter). Two caveats from our test: only the digits 1 and 2 exist (0 and 3 to 9 printed nothing and warned), and TeX Live ships bbm as Metafont bitmaps, so pdfLaTeX embedded it as a Type 3 font. That is fine on paper but blurry on screen and a problem for some publishers' PDF checks.
bbold: full alphabet and digits, but it takes over \mathbb
\usepackage{amssymb}
\usepackage{bbold} % \mathbb is now bbold's, in either load order
$\mathbb{R}$, $\mathbb{r}$, $\mathbb{1}$, $\mathbb{abcdefghijklmnopqrstuvwxyz}$,
$\mathbb{0123456789}$bbold is the only one of the three with every letter in both cases and all ten digits, as Type 1 fonts. The price is the design, which is a geometric sans-serif, much lighter than the AMS letters, and the fact that it replaces \mathbb. Load order does not rescue the AMS letters: amsfonts only defines \mathbb when nothing else has, so with bbold loaded anywhere in the preamble every \mathbb in the document uses the bbold font. If you want both designs, give the AMS alphabet a second name before loading bbold, or use the bbold font under its own name without the package:
% Option 1: keep the AMS letters as \mathbbams, use bbold's \mathbb
\usepackage{amssymb}
\DeclareSymbolFontAlphabet{\mathbbams}{AMSb}
\usepackage{bbold}
$\mathbbams{R}$ \quad $\mathbb{r}\mathbb{1}$
% Option 2: keep \mathbb as the AMS letters, add bbold as \mathbbold
\usepackage{amssymb}
\DeclareMathAlphabet{\mathbbold}{U}{bbold}{m}{n}
$\mathbb{R}$ \quad $\mathbbold{r}\mathbbold{1}$Both options compiled, with both fonts embedded side by side.
XeLaTeX and LuaLaTeX: unicode-math and \symbb
With XeLaTeX or LuaLaTeX, unicode-math replaces the whole math font setup with one OpenType math font, and blackboard bold becomes an ordinary part of that font: upper, lower and digits, all in one design.
\documentclass{article}
\usepackage{unicode-math} % XeLaTeX or LuaLaTeX; default font is Latin Modern Math
% \setmathfont{STIXTwoMath-Regular.otf} % or another OpenType math font
\begin{document}
Command: $\symbb{R}$, $\symbb{N}$, $\symbb{Z}$, $\symbb{Q}$, $\symbb{C}$
Typed directly: $ℝ$, $ℕ$, $𝔼$, $𝟙$, $𝕜$
Lowercase and digits: $\symbb{r}$, $\symbb{1}$, $\symbb{0123456789}$
\end{document}Three things we checked while compiling this on both engines:
\symbb{r}and\symbb{1}work with the default Latin Modern Math. We queried the font directly and it has glyphs for the full double-struck range: capitals, 𝕒 to 𝕫 and 𝟘 to 𝟡.- Typing ℝ, 𝟙 or 𝕜 straight into the source is equivalent to the command, which is where the Unicode table above comes in handy.
\setmathfont{STIXTwoMath-Regular.otf}(the file name) worked on both engines. The family name,\setmathfont{STIX Two Math}, worked on LuaLaTeX but not on XeLaTeX on our server, because XeLaTeX finds fonts by name through the operating system and TeX Live's fonts were not registered there. If you get a "font not found" error, switch to the file name.
Blackboard Bold vs \mathbf vs \boldsymbol
\usepackage{amsmath,amssymb}
\usepackage{bm}
Vectors and matrices in bold: $\mathbf{v} \in \mathbb{R}^3$, $\mathbf{A}\mathbf{x} = \mathbf{b}$.
Bold Greek and bold italic: $\boldsymbol{\alpha}$, $\boldsymbol{v}$, $\bm{\mu}$.
Sets, two conventions: $\mathbb{R}$, $\mathbb{Z}$ \quad or \quad $\mathbf{R}$, $\mathbf{Z}$.\mathbf{v}is upright bold Roman. It is the usual notation for vectors and matrices, and it does nothing useful to Greek letters or to symbols.\boldsymbol(from amsmath) and\bm(from the bm package) produce bold italic and bold symbols, so\boldsymbol{\alpha}is the bold vector 𝜶.\mathbbis a different alphabet, not a weight. It marks a specific named set or operator, and putting a variable in it is a mistake.
Both conventions are common today: some journals and textbooks still ask for \mathbf{R}, many others expect \mathbb{R}. Whatever you choose, do not mix them, and never use bold for both vectors and sets in the same paper. A \newcommand{\R}{...} in the preamble makes the switch a one-line change if a journal asks for the other style.
Complete Example
A preamble that covers the usual needs: amssymb for the sets, dsfont for the indicator, and shortcuts, compiled with pdfLaTeX on TeX Live 2025.
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb} % \mathbb{...}: uppercase blackboard bold
\usepackage{dsfont} % \mathds{1}: double-struck indicator 1
% Shortcuts: none of these exist until you define them
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\Prob}{\mathbb{P}}
\newcommand{\ind}{\mathds{1}}
\begin{document}
Let $f\colon \R^n \to \R$ be continuous and let $A \subseteq \R^n$ be measurable.
The indicator function of $A$ is
\[
\ind_A(x) =
\begin{cases}
1 & \text{if } x \in A, \\
0 & \text{if } x \notin A,
\end{cases}
\qquad \text{so that} \qquad
\Prob(X \in A) = \E\bigl[\ind_A(X)\bigr].
\]
The chain of number systems is $\N \subset \Z \subset \Q \subset \R \subset \C$,
and for a prime power $q$ the finite field $\mathbb{F}_q$ has $q$ elements.
\end{document}Common Mistakes
These all come from the same fact: the amssymb blackboard bold font has glyphs only in the A to Z slots, and every other slot holds an unrelated AMS symbol. LaTeX does not warn you; it simply prints whatever sits in that slot. Each of these compiled without a single error in our test, which is exactly why they are easy to miss.
| You wrote | You get | Write instead |
|---|---|---|
$\mathbb{1}$ | ⊮ (the \nVdash relation, which lives in the "1" slot) | \mathds{1} with dsfont, or \mathbbm{1} with bbm |
$\mathbb{r}$ | ∖ (\smallsetminus) | \mathbbm{r} with bbm, or bbold |
$\mathbb{k}$ | ℸ (\daleth) | \Bbbk from amssymb |
$\mathbb{R^n}$ | ℝ with ⋉ (\ltimes) as the exponent | \mathbb{R}^n |
\mathbb{R} in text | Error: \mathbb allowed only in math mode | $\mathbb{R}$ |
\mathbb{R} without a package | Error: Undefined control sequence | \usepackage{amssymb} |
$\mathbb{RR}$ | ℝℝ, two letters | One letter per symbol: \mathbb{R}; the braces take a whole string, not a code |
Frequently Asked Questions
How do you write blackboard bold in LaTeX?
Load amssymb (or just amsfonts) in the preamble and use \mathbb{...} inside math mode: $\mathbb{R}$ prints ℝ, $\mathbb{N}$ prints ℕ, $\mathbb{Z}$ prints ℤ. It works for the 26 uppercase letters only. Outside math mode LaTeX stops with "\mathbb allowed only in math mode", and without the package it reports "Undefined control sequence".
Why does \mathbb{1} not work?
The AMS blackboard bold font has only uppercase letters, and \mathbb{1} picks the symbol that sits in the digit-one slot of that font, which is the \nVdash relation ⊮. For a double-struck 1, load dsfont and write \mathds{1}, load bbm and write \mathbbm{1}, or load bbold, whose \mathbb{1} is a real digit. With XeLaTeX or LuaLaTeX and unicode-math, \symbb{1} or the typed character 𝟙 works too.
Is there a lowercase blackboard bold in LaTeX?
Not in amssymb: \mathbb{r} prints the \smallsetminus symbol, and the only lowercase letter it provides is \Bbbk for 𝕜. For lowercase, use \mathbbm{r} from the bbm package or load bbold, which replaces \mathbb with a full upper and lowercase alphabet in a lighter design. On XeLaTeX or LuaLaTeX, unicode-math gives \symbb{r} with Latin Modern Math or STIX Two Math, both of which include the lowercase glyphs.
Should I use \mathbb{R} or \mathbf{R} for the real numbers?
Both are correct and both are in use. Blackboard bold started as the chalkboard way of writing bold, and many authors and journals now treat ℝ as the standard notation for number sets, while some printed styles still prefer bold R. Pick one and be consistent, and keep \mathbf and \boldsymbol for vectors and matrices, where bold has a different meaning.
Next Steps
Blackboard bold rarely appears alone; these guides cover what sits around it:
- The Real Numbers Symbol ℝ – What ℝ means, where it came from and how to type it everywhere, not just in LaTeX
- Greek Letters & Math Symbols – The set-theory operators (∈, ⊂, ∀, ∃) that go with number sets
- Brackets in LaTeX – Set-builder notation such as { x ∈ ℝ | x > 0 } with properly sized braces
- Matrices in LaTeX – Writing A ∈ ℝm×n and the matrix environments
- Bold, Italics and Underline – The text and math bold commands in one place
- Math Functions – Function notation f: ℝ → ℝ, operators and norms
Free LaTeX Tools
- LaTeX Preview – Paste any example above and see the PDF without installing TeX
- LaTeX Symbols Reference – Blackboard bold, Greek letters, arrows and relations with copy-paste commands
- LaTeX Templates – Article and thesis templates with amsmath and amssymb already loaded
Related Articles
Squiggly Line Symbol (~): Tilde Meaning and How to Type It on Any Device
Diameter Symbol (⌀): Meaning, ⌀ vs Ø, and How to Type It on Windows, Mac, Word, LaTeX
Trademark Symbol ™, Registered ® and Copyright ©: How to Type Them
Greater Than or Equal To (≥) and Less Than or Equal To (≤) Symbols: How to Type Them
Write math with the right symbols the first time
Octree is an AI-powered LaTeX editor with TeX Live, XeLaTeX and LuaLaTeX already set up: paste any example above, ask for the indicator function or a number-set shortcut, and see the compiled PDF as you type.
Try Octree Free →