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, 3𝑣. 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 u that is 𝑥,𝑦 and a vector v that is 𝑥,𝑦, and we have been asked to find the dot product of these vectors. This would then be written as uv. 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: uv=𝑥𝑥+𝑦𝑦. This is demonstrated in example 1.

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

Given the vector v=7,2 and the vector u=3,6, find uv.

Answer

We have uv=7,23,6=73+26=21+12=33. Notice in this example that we have written “73,” which is another way of writing “7×3.” 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 u and v 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 u=𝑢,𝑢,,𝑢 and v=𝑣,𝑣,,𝑣, we can calculate uv 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 𝐴𝐵=5,12.

Answer

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: 5+12=169=13.

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 55+1212=5+12. 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 u and v is equal to the cosine of the angle between them: cos𝜃=||||.uvuv

Rearranging to make 𝜃 the subject, we see that 𝜃=||||.cosuvuv

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 u=4,1 and v=2,5, find their dot product and the angle between them to one decimal place.

Answer

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. uv=24+51=13.

To find the angle between the two vectors, we also need to find the magnitude of each vector: ||=4+1=17,||=2+5=29.uv

Now, we substitute into our rearranged formula to find the value of 𝜃: 𝜃=131729=13493=54.2(1).coscosd.p.

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

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

Find the angle between the vectors u=3,2 and v=5,3. Give your answer to one decimal place.

Answer

Again, let us start by drawing a sketch.

We then need to calculate the dot product of the two vectors: uv=35+23=9.

Now, calculate the magnitude of each vector: ||=(5)+(3)=34,||=3+(2)=13.uv

Finally, substitute into the formula to find 𝜃: 𝜃=93413=9442=115.3(1).coscosd.p.

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

Find the angle between the vectors u=1,0 and v=12,12. If necessary, give your answer to one decimal place.

Answer

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: uv=112+012=12.

Now, calculate the magnitude of each vector: ||=(1)+(0)=1,||=12+12=1.uv

Finally, substitute into the formula to find 𝜃: 𝜃=1=𝑐𝑜𝑠12=135(1).cosd.p.

Key Points

We have established that the dot product of two vectors u=𝑢,𝑢,,𝑢 and v=𝑣,𝑣,,𝑣 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 u and v, uu|| and vv||, is equal to the cosine of the angle between them: cos𝜃=||||.uvuv

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

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.