# \mathbb

Used for double-struck symbols such as standard number sets like ℝ, ℤ, or ℚ.

https://texform.dev/latex/commands/mathbb

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Fonts and styles](https://texform.dev/latex/topics/fonts-styles) |
| Packages | base, bboldx |
| Allowed mode | math |
| Tags | presentation |
| Commonality | high |
| Kind | prefix |

## Syntax

### base

Argument specification: `m`

Used for double-struck symbols such as standard number sets like ℝ, ℤ, or ℚ.

### bboldx

Argument specification: `m`

Used for blackboard-bold symbols such as standard number sets or other distinguished mathematical alphabets, with the bboldx package selecting among its available blackboard-bold font variants.

## Common tasks

### How to write the real numbers

```latex
\mathbb{R}
```

[Open in Playground](https://play.texform.dev/?input=%5Cmathbb%7BR%7D)

### How to write a set of integers or complexes

```latex
\mathbb{Z}\subset\mathbb{Q}\subset\mathbb{R}\subset\mathbb{C}
```

[Open in Playground](https://play.texform.dev/?input=%5Cmathbb%7BZ%7D%5Csubset%5Cmathbb%7BQ%7D%5Csubset%5Cmathbb%7BR%7D%5Csubset%5Cmathbb%7BC%7D)

### How to write an n-dimensional space

Standard blackboard bold is for uppercase letters.

```latex
\mathbb{R}^n
```

[Open in Playground](https://play.texform.dev/?input=%5Cmathbb%7BR%7D%5En)

## Examples

```latex
\mathbb x
```

[Open in Playground](https://play.texform.dev/?input=%5Cmathbb+x)

```latex
\mathbb{R}
```

[Open in Playground](https://play.texform.dev/?input=%5Cmathbb%7BR%7D)

## Package variants

| Package | Argument specification | Allowed mode | Description |
| --- | --- | --- | --- |
| base | m | math | Used for double-struck symbols such as standard number sets like ℝ, ℤ, or ℚ. |
| bboldx | m | math | Used for blackboard-bold symbols such as standard number sets or other distinguished mathematical alphabets, with the bboldx package selecting among its available blackboard-bold font variants. |

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| base | full | full | none |
| bboldx | full | full | full |

## Usage frequency

10.31% of formulas in the measured corpus contain this entry, rank 5 of 263 entries with frequency data.

## In TeXForm

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

## Equivalent forms

```latex
\Bbb{#1}
```

exact. MathJax maps both commands to the same MathFont variant.

```latex
\symbb{#1}
```

exact. MathJax's unicode-math-style alias uses the same variant.

## See also

- [\\Bbb](https://texform.dev/latex/commands/Bbb)
- [\\frak](https://texform.dev/latex/commands/frak)
- [\\mathbf](https://texform.dev/latex/commands/mathbf)
- [\\mathbfbb](https://texform.dev/latex/commands/mathbfbb)
- [\\mathbfcal](https://texform.dev/latex/commands/mathbfcal)
- [\\mathbffrak](https://texform.dev/latex/commands/mathbffrak)
- [\\mathbfit](https://texform.dev/latex/commands/mathbfit)
- [\\mathbfscr](https://texform.dev/latex/commands/mathbfscr)
- [\\mathbfsf](https://texform.dev/latex/commands/mathbfsf)
- [\\mathbfsfit](https://texform.dev/latex/commands/mathbfsfit)
- [\\mathbfsfup](https://texform.dev/latex/commands/mathbfsfup)
- [\\mathbfup](https://texform.dev/latex/commands/mathbfup)
- [\\mathcal](https://texform.dev/latex/commands/mathcal)
- [\\mathfrak](https://texform.dev/latex/commands/mathfrak)
- [\\mathit](https://texform.dev/latex/commands/mathit)
- [\\mathnormal](https://texform.dev/latex/commands/mathnormal)
- [\\mathrm](https://texform.dev/latex/commands/mathrm)
- [\\mathscr](https://texform.dev/latex/commands/mathscr)
- [\\mathsf](https://texform.dev/latex/commands/mathsf)
- [\\mathsfit](https://texform.dev/latex/commands/mathsfit)
- [\\mathsfup](https://texform.dev/latex/commands/mathsfup)
- [\\mathtt](https://texform.dev/latex/commands/mathtt)
- [\\mathup](https://texform.dev/latex/commands/mathup)
- [\\symbb](https://texform.dev/latex/commands/symbb)
- [\\symbf](https://texform.dev/latex/commands/symbf)
- [\\symbfcal](https://texform.dev/latex/commands/symbfcal)
- [\\symbffrak](https://texform.dev/latex/commands/symbffrak)
- [\\symbfit](https://texform.dev/latex/commands/symbfit)
- [\\symbfscr](https://texform.dev/latex/commands/symbfscr)
- [\\symbfsf](https://texform.dev/latex/commands/symbfsf)
- [\\symbfsfit](https://texform.dev/latex/commands/symbfsfit)
- [\\symbfsfup](https://texform.dev/latex/commands/symbfsfup)
- [\\symbfup](https://texform.dev/latex/commands/symbfup)
- [\\symcal](https://texform.dev/latex/commands/symcal)
- [\\symfrak](https://texform.dev/latex/commands/symfrak)
- [\\symit](https://texform.dev/latex/commands/symit)
- [\\symnormal](https://texform.dev/latex/commands/symnormal)
- [\\symrm](https://texform.dev/latex/commands/symrm)
- [\\symscr](https://texform.dev/latex/commands/symscr)
- [\\symsf](https://texform.dev/latex/commands/symsf)
- [\\symsfit](https://texform.dev/latex/commands/symsfit)
- [\\symsfup](https://texform.dev/latex/commands/symsfup)
- [\\symtt](https://texform.dev/latex/commands/symtt)
- [\\symup](https://texform.dev/latex/commands/symup)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \mathbb{a} | Positive: baseline | Pass | Pass | Fail |
| \mathbb a | Positive: bare[0] | Pass | Pass | Fail |

### bboldx

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \mathbb{a} | Positive: baseline | Pass | Pass | Pass |
| \mathbb a | Positive: bare[0] | Pass | Pass | Pass |
