Dot product and Cross product in LaTeX

In this tutorial, I will show you how to write Dot product and Cross product in LaTeX. The dot product is represented by a center dot symbol between two vectors and a cross symbol between two vectors represents the cross product.

To get a middle dot (center dot) symbol in LaTeX you can use the \cdot command and for cross product you can use the \times command.

CommandOutput
\vec{a}\cdot \vec{b}\vec{a} \cdot \vec{b}
\vec{a}\times \vec{b}\vec{a} \times \vec{b}
\documentclass{article}
\begin{document}

  $$ \vec{a} \cdot \vec{b} $$
  $$ \vec{a} \times \vec{b} $$
  $$ \textbf{a} \cdot \textbf{b} $$
  $$ \vec{a} \cdot \vec{b}=\left | \vec{a} \right |\left | \vec{b} \right |\cos\theta $$

\end{document}

Output:

 $$ \vec{a} \cdot \vec{b} $$ $$ \vec{a} \times \vec{b} $$ $$ \textbf{a} \cdot \textbf{b} $$ $$ \vec{a} \cdot \vec{b}=\left | \vec{a} \right |\left | \vec{b} \right |\cos\theta $$

Bold center dot symbol for dot product

If you want a bold center dot symbol for the dot product you can use the \bullet command.

\documentclass{article}
\begin{document}

  $$ \vec{a} \bullet \vec{b} $$
  $$ \textbf{a} \bullet \textbf{b} $$
  $$ \vec{a} \bullet \vec{b}=\left | \vec{a} \right |\left | \vec{b} \right |\cos\theta $$

\end{document}

Output:

 $$ \vec{a} \bullet \vec{b} $$ $$ \textbf{a} \bullet \textbf{b} $$ $$ \vec{a} \bullet \vec{b}=\left | \vec{a} \right |\left | \vec{b} \right |\cos\theta $$

Leave a Reply

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