# Unable to typeset vectors using physics package

I'm trying to typeset the equation for the dot product like this (using the physics package).

$$\va{A} \dot \va{B} = abs{A}abs{B}\cos{\theta}$$


However, LaTeX keeps throwing this:

./AP Physics Notes.tex:29: Missing } inserted. [$$\va{A} \dot \va] ./AP Physics Notes.tex:29: Missing } inserted. [$$ \va{A} \dot \va]
./AP Physics Notes.tex:29: Extra }, or forgotten \$. [$$\va{A} \dot \va] ./AP Physics Notes.tex:29: Extra }, or forgotten . [$$ \va{A} \dot \va]


Not sure what I'm doing wrong...any help would be appreciated! Thanks so much.

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Sep 21 '14 at 23:22
• Don't use $$....$$ please. Try $....$ around it – user31729 Sep 21 '14 at 23:23
• Use \cdot not \dot! – user31729 Sep 21 '14 at 23:33

\dot is a command requiring a parameter, to set a dot above some character, to indicate the time derivative. The multiplication dot can be obtained using \cdot!

Another error were the missing \ (but without complaining) just before abs.

Please don't use the outdated $$....$$ syntax -- use $....$ instead.

\documentclass{book}

\usepackage{physics}
\begin{document}
\LARGE
$\va{A} \cdot \va{B} = \abs{A}\cdot \abs{B}\cdot \cos{\theta}$

\end{document}


• You can't use the same symbol with two distinct meanings. The problem of the two bars too near to each other can be solved by \, between them – egreg Sep 21 '14 at 23:42
• @egreg: Well, I personally prefer a \circ as indicator for the dot product. On the other hand: \cdot operates in the vector space for the vectors and on the rhs on the field of real numbers ... physicists are sometimes a little bit lazy ;-) – user31729 Sep 21 '14 at 23:46
• Also $$...$$ is deprecated, not outdated. Just to be a picky mathematician. ;-) – egreg Sep 21 '14 at 23:48
• @egreg: I already wrote that in a comment and in the post ;-) And the norm bars (:-P) are not too narrow for my impression, but I always write a dot between multiplied quantities, as students sometimes get confused otherwise ;-) – user31729 Sep 21 '14 at 23:48