How to write letters in bold in the math mode?

Using the bm package. The \mathbf command can only be used for non-italic symbols, instead the amsmath package defines the \boldsymbol command that can be used with every literal symbol or math operator. The bm package redefines the \boldsymbol command providing the \bm command and is independent from amsmath. So you can use:

\documentclass{article}
\usepackage{amsmath}
\usepackage{bm}
\begin{document}
\[ \boldsymbol{g} \qquad \bm{g} \]
\end{document}

Use \mathbf{g} for bold in math mode.

Tags:

Bold

Math Mode