I'm new to TeX and tried to enter an equation using \mathbb. I received a prompt
LaTeX Error: \mathbb allowed only in math mode.
See the LaTeX manual or LaTeX Companion for explanation.
I thought I would try here for an explanation.
You enter math mode by typing a dollar sign $, and you leave math mode by typing another dollar sign $. You should take a look at Chapter 3 of The Not So Short Introduction to LaTeX
I guess that an even better way to enter math mode is to use \( and \), as discussed in this answer.
TeX knows several modes, two of them are math mode and display math mode. Typesetting of ordinary text such as words nor numbers is different compared to mathematical formulas or a mathematical identifier such as x, which should look different from the text x (it does differ here in this editor only vaguely)
In order to let TeX know which mode should be used, there are indicators to enter math mode:
$ and closed with $$$...$$ in plain TeX or with \[...\] in LaTeX\begin{math}...\end{math} in LaTeXLaTeX enter the math mode automatically, such as equation, align, alignedat, gather etc. Several characters/symbols being connected to math content require entering the math mode, such as \mathbb{R} etc.
\mathbbtypesets capital letters as "black-board bold" symbols, such as the symbol ℝ which usually denotes the set of real numbers (and which is produced by\mathbb{R}in math mode). – Niel de Beaudrap Apr 14 '11 at 06:48