When I try to use the expression

$\textbf{a \cdot (a \times b)}$

It returns

! Missing $ inserted.<inserted text>$ Identiteten $ \textbf{a \cdot (a \times b)}

and lots of warnings like this:

! Extra }, or forgotten $.\textdef@ ...th {#1}\let \f@size 
#2\selectfont #3}}        Identiteten $ \textbf{a \cdot (a \times b)}

What is wrong with my code?


2 Answers 2


You're using the wrong markup: surround each variable by \mathbf:

$\mathbf{a} \cdot (\mathbf{a} \times \mathbf{b})$

Better yet, define a macro for your vectors:




$\vect{a} \cdot (\vect{a} \times \vect{b})$


The result will be the same, but you have semantic markup, which is better and you'll know why when you'll need to modify how vectors are printed or to extend the definition for covering also Greek letters.


\textbf{} is meant for text mode only, i.e. non-math characters and symbols. To use a bold font (if really needed) \mathbf{} is to be used, for bold symbols like the \times \bm{} from bm package can be applied or the \boldmath command.

\usepackage{bm}  % bold math 
\item Normal weight

$a \cdot (a \times b)$

\item Bold

$\mathbf{a \cdot (a \times b)}$

\item Bold symbols

$\mathbf{a \cdot (a \bm{\times} b)}$


enter image description here

If a and b are vectors, the dot product here is of course zero ;-)

  • Do you mind just adding one with bm at the outer level and no be inside, just for comparison. So the OP can see that bm actually gives bold italic
    – daleif
    Sep 14, 2015 at 17:50
  • @daleif: No go ahead, although I wanted to restrict the \bm for the \times in this example, but... go ahead
    – user31729
    Sep 14, 2015 at 17:52
  • Restricted to a tablet, so I cannot make the image
    – daleif
    Sep 14, 2015 at 17:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .