This article aims to show you a simple way to create a dot symbol in LaTeX.
In physics and mathematics most of the time when you are working with vectors you will need to calculate the dot product of two vectors. That’s why today you will learn how to write the dot product in LaTeX
Table of Contents
Dot Product
Let’s begin with two vectors A and B, the dot product is defined as the multiplication of two given vectors that results in a positive real number also known as scalar. That means that you get a number rather than a vector.Â
The dot product of A and B is represent with a dot symbol between both vectors, for example
Dot Operator Symbol in LaTeX
To write the dot operator symbol, you will need the math mode and one simple command, the \cdot command, and as you can see it does not need arguments. Since the command is already in LaTeX, you don’t need any extra package for it.Â
Let’s say we have to vectors U and V, the dot product will be
\documentclass{article}
\begin{document}
$$\vec{U} \cdot \vec{V}$$
\end{document}
One variation that you could need, is the vectors with bold font and with the arrow mark, once again without packages.
\documentclass{article}
\begin{document}
$$\vec{\mathbf{U}} \cdot \vec{\mathbf{V}}$$
\end{document}
Dot product Angle/Vector/Matrix form
Now the dot product between two vectors can have 3 main representations, each one can be used depending on the context, and they can be inserted in LaTeX. Below you will have examples for each one of them.
The first form (Angle Form) involves the angle theta between the vectors, therefore you will need the \theta command and the symbol for the norm of the vector, all of them must be inside the math mode. For example, given R and B the dot product in angle form would be,
\begin{document}
$$\vec{R} \cdot \vec{B} = \Vert\vec{R}\Vert \Vert\vec{B}\Vert \cos(\theta)$$
\end{document}
Gives the output
The second form (Vector Form) is more used when you know each component of two vectors with the same size, it is pretty common in physics to multiply two vectors using this form. Requires the math mode.
\documentclass{article}
\begin{document}
$$\vec{a}=(x_{1}\hat{i}+y_{1}\hat{i}+z_{1}\hat{i})$$
$$\vec{b}=(x_{2}\hat{i}+y_{2}\hat{i}+z_{2}\hat{i})$$
\vspace{2pt}
$$\vec{a}\cdot\vec{b}=x_{1}x_{2}+y_{1}y_{2}+z_{1}z_{2}$$
\end{document}
Gives the output
The third and last form (Matrix Form) is more common in linear algebra, when you are working with vectors. You will need to use the pmatrix (math mode required) environment, and \\ and & for the rows and columns, let’s see it in an example
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Given $\vec{R}$ and $\vec{B}$, the dot product is defined as
$$\vec{R}\cdot\vec{B}=\begin{pmatrix} x_{1} & y_{1} & z_{1}
\end{pmatrix}
\begin{pmatrix} x_{2}\\ y_{2}\\ z_{2} \end{pmatrix}$$
\end{document}
We use & to determine the position of each new column, and \\ for the position of each row or line. The only thing to take notice of is the need of the amsmath package for the pmatrix environment, but usually this package does not have any trouble with compatibility with other packages. The code above gives the output
Triple Vector product
Given three vectors A, B and C you can perform what it is called, the triple vector product. It involves the dot product operation and the vector product operation.Â
The triple vector product is defined as
\begin{document}
$\vec{A}\cdot(\vec{B}\times\vec{C}\,)$
\end{document}
The result of the triple product vector is a scalar number, but in this case, it represents the area of a geometrical figure.
Now you know how to insert the dot symbols used for the dot product in your LaTeX documents, and some forms you may encounter in textbooks. Maybe you already notice it but it is just the normal multiplication sign
I hope this tutorial was helpful in guiding you in LaTeX, and as always keep writing in LaTeX
Further Reading
LaTex Tutorial on Symbols
- How To Create A Cross Product Symbol In LaTeX
- How to create a hat symbol in LaTeX?
- How to create a prime symbol in LaTeX?
- How to create an absolute value symbol in LaTeX?
- How to create an approximate symbol in LaTeX?
- How to create an intersection symbol in LaTeX?
- How to create the empty set symbol in LaTeX?
- How to write a degree symbol in LaTeX?
- How to Write a Greater Than Symbol in LaTeX?
- How to write a norm symbol in LaTeX?
- How to write A Plus-Minus Symbol in LaTeX
- How to write a proportional to symbol in LaTeX?
- How to write a real number symbol in LaTeX?
- How to write a tilde symbol in LaTeX?
- How to write a union symbol in LaTeX?
- How to write a vector in LaTeX?
- How to write an infinity symbol in LaTeX?
- How to write bold text in LaTeX?
- How To Write Dots Symbols In LaTeX?
- How to write the arrow symbols in LaTeX
- How to write the Degree celsius symbol in LaTeX?
- How to write the equal or not equal symbol in LaTeX?
- How to write the Euro symbol in LaTeX?
- How to write the floor symbol in LaTeX?
- How to write the gradient operator symbol in LaTeX
- How To Write The Greater Than Or Equal To Symbol In LaTeX?
- How to write the integer number symbol in LaTeX?
- How to write the less than symbol in LaTeX?
- How to write the Natural numbers symbol in LaTeX?
- How to write the parallel symbol in LaTeX?
- How to write the percent symbol in LaTeX?
- How to write the square root symbol in LaTeX?
- How To Write The Symbol For A Subset In LaTeX?
- How to write the symbol for therefore in LaTeX?
- How to write with the mathbb in LaTeX?