How to write with the mathbb in LaTeX?

# How to write with the mathbb 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 the simplest and easiest way to write with the mathbb command in LaTeX.

Maybe you have heard or read about special commands for different fonts to use in LaTeX, today you will learn how to use it in your document

## Blackboard Bold

This font is usually used in mathematics to represent the set of real numbers R, denoted by white spaces between each line composing the letters, usually just uppercase letters are used with this font. Some people called it Double-Struck.

## Mathbb Command in LaTeX

For some reason LaTeX does not have the ability to write with this font by default, therefore we will need to use external packages. Remember to load the packages in the preamble of your document.

There are two main packages that you can use, the amssymb packages or the amsfonts package. Both of them work great for our purpose. To write this symbol or sign, you use the command \mathbb{}, inside the brackets {} goes the argument you will want to write with the font.

For example

\documentclass{article}
\usepackage{amssymb} %we added the package to the document
\begin{document}
The set of real numbers is denoted by $\mathbb{R}$ %the command is used here
\end{document}


Output for \mathbb command

It is important to notice that the new command is used inside the math mode, so pay attention where you place this command or LaTeX will hit you with an error message. Another example could be

\documentclass{article}
\usepackage{amsfonts} %we added the package to the document
1) Other set of numbers can be $\mathbb{N}$ or $\mathbb{Q}$.\\
\vspace{5pt}
2) $\backslash$mathbb\{\} does not work with\\
Greek letters $\mathbb{\alpha}$ is the same as $\alpha$
\end{document}


One key aspect regarding the command is that it only works with letters, it does not work with greek letters or symbols or numbers. So better do your little research if you’re going to write with this font or command in other languages.

I hope this tutorial was helpful, and as always keep writing in LaTeX

All the images were created in LaTeX by the author.