How to write a real number symbol in LaTeX?

# How to write a real number symbol in LaTeX?

This post may contain affiliate links that allow us to earn a commission at no expense to you. Learn more

This article aims to show you a simple way to create a real number symbol in LaTeX.

Sooner or later you have seen the real number symbol somewhere, and today you will learn how to insert this symbol in your LaTeX document.Â

## LaTeX Real Number

As you know real numbers are the set of rational and irrational numbers that belong to the natural numbers, usually denoted by writing a capital blackboard R.Â  And you can include it in many ways in your LaTeX document.

## Mathbf

It begins with the basic built-in command that doesnâ€™t require a package, \mathbf{} it takes one value as argument

$$\mathbf{R}$$ %basic code


## Amssymb

Now we can achieve a similar but more elegant result with the amssymb package, using the command \mathbb{R} that takes one value. For example

\documentclass{article}
\usepackage{amssymb}
\begin{document}
$\mathbb{R}$ is the set of real numbers
\end{document}


This is based on the double bars from writing the set on the blackboards back in the old days.

## Amsfonts

Another package to define the set, can be created using the amsfont package, it contains different fonts according to the American Mathematical Society. The command is \mathbb{R} just as before. For example

\documentclass{article}
\usepackage{amsfonts}
\begin{document}
$\mathbb{R}$ is the set of real numbers
\end{document}


## Amsmath

Maybe if you are working with complex variables you may want to use the Re(z) symbol to define the real numbers in complex analysis, for the amsmath package is called, the command is \operatorname{Re}(z). For example

\documentclass{article}
\usepackage{amsfonts}
\usepackage{amsmath}
\begin{document}
$\operatorname{Re}(z)$ is the set of the real numbers in $\mathbb{Z}$
\end{document}


Basically the \mathbb{R} command is not limited to one latex package and there could be others that do the same, and the same goes to other symbols, but these packages are the most populars ones out there.

I hope you find this tutorial helpful and donâ€™t forget to comment if you have any questions.