# Formulas and Properties of Dot Product of Vectors

The scalar product of vectors, also called the dot product, can be calculated using two main formulas. The first formula uses the magnitudes of the vectors and the angle between them. The second formula uses the components of the vectors.

In this article, we will learn the two main formulas that can be used to calculate the scalar product of vectors. In addition, we will learn some important properties of the scalar product.

##### PHYSICS

Relevant for

Learning about the formulas and properties of the dot product of vectors.

See formulas

##### PHYSICS

Relevant for

Learning about the formulas and properties of the dot product of vectors.

See formulas

## Dot product using magnitudes and angle between vectors

The scalar product of two vectors $latex \vec{A}$ and $latex \vec{B}$ is denoted by $latex \vec{A} \cdot \vec{B}$. The result of the dot product is a scalar quantity.

If we know the magnitudes of the vectors and the angle between their directions, we can apply the following formula to find their scalar product:

$$\vec{A}\cdot \vec{B}=AB\cos(\theta)$$

where, $latex A$ and $latex B$ are the magnitudes of $latex \vec{A}$ and $latex \vec{B}$ respectively, and $latex \theta$ is the angle between the vectors.

To understand this formula, we can draw the vectors $latex \vec{A}$ and $latex \vec{B}$ with their tails at the same place:

The angle $latex \theta$ represents the angle between their directions and can range from 0° to 180°. The following figure shows the projection of the vector $latex \vec{B}$ in the direction of $latex \vec{A}$:

The projection shown is the component of $latex \vec{B}$ in the direction of $latex \vec{A}$ and is equal to $latex B \cos(\theta)$.

This means that the scalar product $latex \vec{A}$ is equal to the magnitude of $latex \vec{A}$ multiplied by the component of $latex \vec{B}$ in the direction of $latex \vec{A}$.

Alternatively, we can also define $latex \vec{A}$ as the magnitude of $latex \vec{B}$ multiplied by the component of $latex \vec{A}$ in the direction of $latex \vec{B}$.

## Dot product of vectors using their components

The dot product of two vectors $latex \vec{A} \cdot \vec{B}$ can be calculated with the following formula if we know the $latex x,~y,~z$ components of the vectors:

$$\vec{A}\cdot \vec{B}=A_{x}B_{x}+A_{y}B_{y}+A_{z}B_{z}$$

To proof this formula, we can consider the dot product of the unit vectors $latex \hat{i},~\hat{j},~\hat{k}$.

Since all unit vectors have a magnitude of 1 and are perpendicular to each other, we have:

$latex \hat{i}\cdot \hat{i}=\hat{j}\cdot \hat{j}=\hat{k}\cdot \hat{k}=(1)(1)\cos 0^{\circ}=1$

$latex \hat{i}\cdot \hat{j}=\hat{i}\cdot \hat{k}=\hat{j}\cdot \hat{k}=(1)(1)\cos 90^{\circ}=0$

Now, we write the vectors in terms of their components, expand the product and apply the results of the multiplications of the unit vectors to simplify:

$$\vec{A}\cdot \vec{B}=(A_{x}\hat{i}+A_{y}\hat{j}+A_{z}\hat{k})\cdot (B_{x}\hat{i}+B_{y}\hat{j}+B_{z}\hat{k})$$

$$=A_{x}\hat{i}\cdot B_{x}\hat{i}+A_{x}\hat{i}\cdot B_{y}\hat{j}+A_{x}\hat{i}\cdot B_{z}\hat{k})$$

$$+A_{y}\hat{j}\cdot B_{x}\hat{i}+A_{y}\hat{j}\cdot B_{y}\hat{j}+A_{y}\hat{j}\cdot B_{z}\hat{k})$$

$$+A_{z}\hat{k}\cdot B_{x}\hat{i}+A_{z}\hat{k}\cdot B_{y}\hat{j}+A_{z}\hat{k}\cdot B_{z}\hat{k})$$

$$=A_{x}B_{x}\hat{i}\cdot\hat{i} +A_{x}B_{y}\hat{i}\cdot\hat{j}+A_{x}B_{z}\hat{i}\cdot\hat{k})$$

$$+A_{y}B_{x}\hat{j}\cdot\hat{i}+A_{y}B_{y}\hat{j}\cdot\hat{j}+A_{y}B_{z}\hat{j}\cdot\hat{k})$$

$$+A_{z}B_{x}\hat{k}\cdot\hat{i}+A_{z}B_{y}\hat{k}\cdot\hat{j}+A_{z}B_{z}\hat{k}\cdot\hat{k})$$

Using the results of the dot products of the unit vectors seen above, six of these nine terms are zero and we have:

$$\vec{A}\cdot \vec{B}=A_{x}B_{x}+A_{y}B_{y}+A_{z}B_{z}$$

## Properties of the dot product of vectors

The dot product of vectors has several important properties. The following are some of them:

### Commutative property

The dot product is commutative, which means that the order of the vectors does not affect the result. Then, we have:

$$\vec{A}\cdot \vec{B} = \vec{B} \cdot \vec{A}$$

### Distributive property

The dot product can be distributed among the terms of the vector sum:

$$\vec{A} \cdot (\vec{B} + \vec{C}) = \vec{A} \cdot \vec{B} + \vec{A} \cdot \vec{C}$$

### Multiplication by a scalar

It is possible to multiply a vector by a scalar before or after performing the dot product, and the result will be the same.

$$(k\vec{A}) \cdot \vec{B} = k(\vec{A} \cdot \vec{B}) = \vec{A} \cdot (k\vec{B})$$

### Orthogonal vectors

If two vectors are orthogonal (perpendicular) to each other, their dot product is zero. Alternatively, if their dot product is zero, the vectors are orthogonal or one of them is a null vector.

$latex \vec{A} \cdot \vec{B} = 0$

if $latex \vec{A}$ is orthogonal to $latex \vec{B}$

### Parallel vectors

If $latex \vec{A}$ and $latex \vec{B}$ are parallel, the angle $latex \theta$ is equal to 0, and we have $latex \cos(\theta)=1$. Then:

$latex \vec{A} \vec{B}=|\vec{A}||\vec{B}|$

### Dot product of a vector by itself

The dot product of a vector by itself is equal to the square of its magnitude. This follows from the previous property:

$latex \vec{A} \cdot \vec{A} =|\vec{A}|^2$

### Dot product of unit vectors

The dot product of a unit vector by itself is equal to 1 (the magnitude of these vectors is 1):

$latex \hat{i}\cdot \hat{i}=\hat{j}\cdot \hat{j}=\hat{k}\cdot \hat{k}=1$

The dot product of orthogonal unit vectors is equal to 0:

$latex \hat{i}\cdot \hat{j}=\hat{i}\cdot \hat{k}=\hat{j}\cdot \hat{k}=0$

### Relationship to the angle between the vectors

The dot product can be used to find the cosine of the angle between two vectors, which is useful for determining the angle itself:

$$\cos(\theta) = \frac{\vec{A} \cdot \vec{B}}{|\vec{A}||\vec{B}|}$$