The real number symbol ℝ is one of the most common notations in mathematics. In LaTeX, this symbol is written with the command \mathbb{R}
.
Depending on which package you load, the design of the ℝ symbol can change slightly.
Using mathbb Command
The command mathbb is used for the real number symbol. It works with different font packages, each producing a slightly different look. The table below shows the available options.
amsfonts | \mathbb{R} → |
amssymb | \mathbb{R} → |
txfonts | \mathbb{R} → |
pxfonts | \mathbb{R} → |
The output is the same for amsfonts
and amssymb
, while txfonts
and pxfonts
give slightly different styles.
\documentclass{article}
\usepackage{amsfonts}
\begin{document}
\[ a,b\in\mathbb{R} \]
\end{document}
Output
Real Space (Rn, R2)
The notation \mathbb{R}
can be combined with a superscript to show real vector spaces. This is common in linear algebra, physics, and engineering.
\documentclass{article}
\usepackage{amsfonts}
\begin{document}
\[ \mathbb{R}^n \]
\[ \mathbb{R}^2 \]
\end{document}
Real Part of a Complex Number
A complex number has two components: a real part and an imaginary part. The real part is written with ℜ or Re in LaTeX.
\documentclass{article}
\usepackage{amsfonts}
\begin{document}
\[ z=a+ib \]
\[ \Re(z) = a \]
\end{document}
Output
There are several ways to typeset the real part depending on which package you use.
With the physics package
This version prints Re(z)
instead of the default ℜ symbol.
\documentclass{article}
\usepackage{physics}
\begin{document}
\[ z = a+ib \]
\[ \Re(z) = a \]
\end{document}
Output
With the amsmath package
Using \operatorname
creates an upright operator-style notation.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[ z = a+ib \]
\[ \operatorname{Re}(z) = a \]
\end{document}
Output
With the amsfonts package
The \mathfrak
command can be used to produce a gothic-style symbol.
\documentclass{article}
\usepackage{amsfonts}
\begin{document}
\[ z = a+ib \]
\[ \mathfrak{R}(z) = a \]
\[ \mathfrak{Re}(z) = a \]
\end{document}
Output
Best Practice
For writing the set of real numbers, \mathbb{R}
with the amsfonts
or amssymb
package is the standard and recommended option.
For real vector spaces, simply add a superscript like \mathbb{R}^n
.
When denoting the real part of a complex number, using \Re
from the physics package or \operatorname{Re}
from amsmath.