# Explainer: Dot Product

In this explainer, we will learn how to use the dot product to find the magnitude of a vector.

There are three ways to multiply vectors. Firstly, you can perform a scalar multiplication in which you multiply each component of the vector by a real number, for example, . Here, we would multiply each component in vector by the number three. Secondly, we can multiply a vector by another vector; here, there are two different methods, the dot product and the cross product. In this lesson, we are only going to look at the dot product, with some nice applications, along with a few examples.

Suppose we have a vector that is and a vector that is , and we have been asked to find the dot product of these vectors. This would then be written as . Notice here that the dot is central to the two vectors, not at the base of each. Now, to calculate the dot product, we need to write out the two vectors in component form, multiply the corresponding components of each vector, and add the resulting numbers: This is demonstrated in example 1.

### Example 1: Finding the Dot Product of Two-Dimensional Vectors

Given the vector and the vector , find .

We have Notice in this example that we have written “,” which is another way of writing “.” We use the first notation to avoid any possible confusion with the vector cross product, which, as the name suggests, uses a cross instead of a dot. Notice, too, that the dot product produces an answer that is a numerical value, or a scalar. It is worth noting here that the dot product is also called the scalar product for this reason.

In summary, the dot product of two vectors is the sum of the products of the corresponding components. In example 1, we found the product of the -components and then added the product of the -components, as the vectors and were both in the form .

In example 1, we were looking at finding the dot product of vectors in the form , which are two-dimensional vectors. We can also find the dot product for three, four, or even -dimensional vectors, provided both vectors have the same dimension. The process for finding the dot product for higher-dimensional vectors is very similar. First, we multiply the first components of each vector, then add the product of the second components, and then continue this process until we reach the th component of each of the vectors.

Given the vectors and , we can calculate as follows: Again, for a numerical example, the answer that we would get for the dot product of two higher-dimensional vectors would be a scalar.

Before looking at some applications of the dot product, let us recall how to calculate the magnitude of a vector. This is demonstrated in example 2.

### Example 2: Finding the Magnitude of a Vector

Find the magnitude of the vector .

First, we draw a sketch of the vector.

We can work out its magnitude by finding its length using the Pythagorean theorem. So, the magnitude of , usually notated , is calculated as follows:

At this point, it is worth noting a particular application of the dot product. If we were to find the dot product we would get If we compare the magnitude and the dot product, we can see that

Now, let us continue with our study of the dot product. Another useful application of the dot product is the ability to work out the angle between two vectors. These could be two-dimensional or indeed -dimensional vectors. An application of the dot product is that the dot product between the two unit vectors in the direction of and is equal to the cosine of the angle between them:

Rearranging to make the subject, we see that

Let us have a look at this concept more closely in examples 3 and 5.

### Example 3: Finding the Angle between Two Vectors

Given the vectors and , find their dot product and the angle between them to one decimal place.

Initially, it can be helpful to sketch the situation.

In order to answer the first part, we need to find the dot product between the two vectors.

To find the angle between the two vectors, we also need to find the magnitude of each vector:

Now, we substitute into our rearranged formula to find the value of :

We have, therefore, found that the angle between our two vectors highlighted in the diagram is .

### Example 4: Finding the Angle between Two Vectors That Are Not in the First Quadrant

Find the angle between the vectors and . Give your answer to one decimal place.

Again, let us start by drawing a sketch.

We then need to calculate the dot product of the two vectors:

Now, calculate the magnitude of each vector:

Finally, substitute into the formula to find :

### Example 5: Finding the Angle between Two Vectors That Are Not in the First Quadrant

Find the angle between the vectors and . If necessary, give your answer to one decimal place.

For this question, we have one vector in the position of the positive -axis. We then need to calculate the dot product of the two vectors:

Now, calculate the magnitude of each vector:

Finally, substitute into the formula to find :

### Key Points

We have established that the dot product of two vectors and is calculated in the following way by multiplying all the corresponding components: which gives a result that is a number, called a scalar. Also, we have used the fact that the dot product of the unit vectors, in the direction of and , and , is equal to the cosine of the angle between them:

This can be used to find the angle between two vectors.