[Tex/LaTex] Unable to typeset vectors using physics package

math-modephysicstypographyvector

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.

Best Answer

\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}

enter image description here

Related Question