How to write dot product (a ⋅ b) in LaTeX?

SymbolDot product
Type of symbolDot
Package (requirement)No
Latex command\cdot
Examplea \cdot b ⟶ a ⋅ b

In mathematics, a dot product is an algebraic equation commonly used in a vector. No package is required to write this in Latex.

Do not use simple dot

If you use \cdot, the default command of latex, it will be printed in the document, but some people use the . button on the keyboard, in which case the problem is shown below.

   \[ \vec{a} . \vec{b} \]
   \[ \textbf{A} . \textbf{B} \]
   \[ \vec{A} . \hat{B} \]

Output :

Use dot product in latex with keyboard dot button.

cdot command is best practice

As you can see in the example above, the output doesn’t look very professional for using the . button on the keyboard, so it would be best practice if you use the \cdot command.

   \[ \vec{a} \cdot \vec{b} = |\vec{a}||\vec{b}|\cos\theta \]
   \[ \textbf{A} \cdot \textbf{B}=|\textbf{A}||\textbf{B}|\cos\theta \]
   \[ \vec{A} \cdot \hat{B} = |A||B|\cos\theta \]
   \[ \frac{\textbf{a}\cdot\textbf{b}}{||\textbf{b}||}=||\textbf{a}||\cos\theta \]
   \[ \begin{bmatrix} a\\ b\\ c \end{bmatrix} \cdot \begin{bmatrix} x\\  y\\ z \end{bmatrix} \]

Output :

Use dot product i n latex using \cdot command.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top