# \mathbf

Used to typeset bold mathematical symbols, commonly for vectors, matrices, or emphasized variables.

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

## Metadata

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

## Syntax

### base

Argument specification: `m`

Used to typeset bold mathematical symbols, commonly for vectors, matrices, or emphasized variables.

## Common tasks

### How to write a bold vector

```latex
\mathbf{v}
```

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

### How to write a bold matrix

```latex
\mathbf{A}\mathbf{x}=\mathbf{b}
```

[Open in Playground](https://play.texform.dev/?input=%5Cmathbf%7BA%7D%5Cmathbf%7Bx%7D%3D%5Cmathbf%7Bb%7D)

### How to bold a multi-letter name

\mathbf makes Latin letters upright bold, not italic-bold Greek.

```latex
\mathbf{GL}(n)
```

[Open in Playground](https://play.texform.dev/?input=%5Cmathbf%7BGL%7D%28n%29)

## Examples

```latex
\mathbf x
```

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

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

## Equivalent forms

```latex
\mathbfup{#1}
```

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

## See also

- [\\Bbb](https://texform.dev/latex/commands/Bbb)
- [\\frak](https://texform.dev/latex/commands/frak)
- [\\mathbb](https://texform.dev/latex/commands/mathbb)
- [\\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 |
| --- | --- | --- | --- | --- |
| \mathbf{a} | Positive: baseline | Pass | Pass | Pass |
| \mathbf a | Positive: bare[0] | Pass | Pass | Pass |
