Lesson Video: Dot Product in 2D | Nagwa Lesson Video: Dot Product in 2D | Nagwa

Lesson Video: Dot Product in 2D Mathematics • Third Year of Secondary School

In this video, we will learn how to find the dot product of two vectors in 2D.

17:59

Video Transcript

Dot Product in Two Dimensions

In this video, weโ€™ll learn how to find the dot product between two vectors. Weโ€™ll see one way of interpreting this geometrically. And weโ€™ll see how we can use this to find various properties of our vectors, for example, the magnitude of two vectors, the angle between two vectors, and how to determine whether two vectors are perpendicular. First, weโ€™re going to need to discuss exactly what we mean by the dot product between two vectors. So letโ€™s start with a vector ๐ฎ equal to the vector ๐‘ฅ one, ๐‘ฆ one and a vector ๐ฏ equal to the vector ๐‘ฅ two, ๐‘ฆ two.

Now weโ€™ve already seen one way of multiplying a vector. For example, we know how to do scalar multiplication of a vector and a scalar. In this scenario, we would just multiply each component of our vector by our scalar. However, thatโ€™s the product between a vector and a scalar. The dot product is going to give us a method of multiplying two vectors together. We represent the dot product with a dot between our two vectors. This says the dot product between the vector ๐ฎ and the vector ๐ฏ. Now, to find the dot product between two vectors, we want to find the sum of the product of corresponding components of our two vectors. So for vectors ๐ฎ and ๐ฏ, the dot product between ๐ฎ and ๐ฏ will be ๐‘ฅ one times ๐‘ฅ two plus ๐‘ฆ one times ๐‘ฆ two. All we do is multiply the corresponding components and then add all of these together.

And thereโ€™s something thatโ€™s worth pointing out here. First, we can see we start with two vectors. However, the result of this is just going to be a number. Because we just end up with a number or a scalar, sometimes the dot product is called the scalar product. Next, we can see in our definition we need to multiply corresponding components together. So we can only take the dot product between two vectors if they have the same number of components, or in other words they need to have the same dimension. Another thing worth pointing out here is the position of the dot in the dot product. We write this in the middle and not at the base of our two vectors. Finally, itโ€™s worth pointing out we can in fact extend this definition to vectors with more dimensions.

If instead of the vectors ๐ฎ and ๐ฏ we have the vectors ๐ฎ star and ๐ฏ star, where the components of ๐ฎ star are ๐‘ข one, ๐‘ข two all the way up to ๐‘ข ๐‘› and the components of ๐ฏ star are ๐‘ฃ one, ๐‘ฃ two all the way up to ๐‘ฃ ๐‘›, then once again we can calculate the dot product of these two vectors in exactly the same way. We take the product of corresponding components and then add all of these together. ๐ฎ star dot ๐ฏ star is equal to ๐‘ข one ๐‘ฃ one plus ๐‘ข two ๐‘ฃ two all the way up to adding ๐‘ข ๐‘› ๐‘ฃ ๐‘›. And, of course, this only makes sense if ๐ฎ star and ๐ฏ star have the same dimension. However, in this video, weโ€™re going to focus on the case of two dimensions. Letโ€™s now see an example of how we would calculate the dot product of two vectors.

Given the vector ๐ฏ is seven, two and the vector ๐ฎ is three, six, find the dot product between ๐ฎ and ๐ฏ.

In this question, weโ€™re given two vectors, and we can see that both of these vectors are in two dimensions. This is because each vector has two components. Weโ€™re asked to find the dot product between these two vectors. So letโ€™s start by recalling how we calculate the dot product between two vectors in two dimensions. We recall if ๐ฎ is the vector ๐‘ฅ one, ๐‘ฆ one and ๐ฏ is the vector ๐‘ฅ two, ๐‘ฆ two, then to calculate the dot product between ๐ฎ and ๐ฏ, we want to add together the products of the corresponding components. In other words, ๐ฎ dot ๐ฏ is equal to ๐‘ฅ one times ๐‘ฅ two plus ๐‘ฆ one times ๐‘ฆ two.

In the question, weโ€™re told that ๐ฎ is the vector three, six. So weโ€™ll set ๐‘ฅ one equal to three and ๐‘ฆ one equal to six. And weโ€™re also told that ๐ฏ is the vector seven, two. So weโ€™ll set ๐‘ฅ two equal to seven and ๐‘ฆ two equal to two. This means weโ€™re now ready to calculate the dot product between ๐ฎ and ๐ฏ. We need to find the product of all the corresponding components and then add these together. In this case, thatโ€™s three times seven plus six times two. And this gives us 21 plus 12, which we can evaluate is equal to 33. Therefore, we were able to show the dot product between ๐ฎ and ๐ฏ is 33.

However, there is one more question we can ask. What if instead we were asked to calculate the dot product between ๐ฏ and ๐ฎ? To calculate the dot product between ๐ฏ and ๐ฎ, we would set up our dot product in exactly the same way. However, the roles of ๐ฎ and ๐ฏ would be switched around. Now, to calculate this dot product, we want to multiply the corresponding components and add the results. This gives us seven times three plus two times six. But now we can notice something interesting. We know that multiplication is commutative, so we couldโ€™ve written these in the opposite order. And then, we would get exactly the same statement as the dot product between ๐ฎ and ๐ฏ. And because multiplication is always commutative, we can always do this.

So for these two specific vectors, the dot product between ๐ฏ and ๐ฎ is equal to 33. However, more importantly, for any two vectors ๐ฎ and ๐ฏ, the dot product between ๐ฎ and ๐ฏ is going to be equal to the dot product between ๐ฏ and ๐ฎ. And of course, itโ€™s worth pointing out the same statement holds in higher dimensions.

Letโ€™s see an example of how we can use the dot product to calculate the magnitude of a vector.

๐€ dot ๐€ is equal to blank.

In this question, weโ€™re given a vector ๐€ and weโ€™re asked to find an expression for the dot product between the vector ๐€ and itself. Thereโ€™s a few different ways of doing this. Letโ€™s start with vector ๐€ being a two-dimensional vector. So letโ€™s let ๐€ be the vector with horizontal component ๐‘Ž one and vertical component ๐‘Ž two. We want to find an expression for the dot products of ๐€ with itself. Now, remember, to find a dot product between two vectors, we need to multiply the corresponding components and then add all of the results. So in this case, we multiply the first components together. Thatโ€™s ๐‘Ž one times ๐‘Ž one. And then we need to add the second components multiplied together. Thatโ€™s ๐‘Ž two times ๐‘Ž two. And of course we can simplify this to give us ๐‘Ž one squared plus ๐‘Ž two squared.

Now, we could leave our answer like this for the two-dimensional case. However, this is actually equal to a very useful result. We need to notice that this appears in the modulus of ๐€. Recall that the modulus of a vector is the sums of the squares of its component and then we take the square root of this value. In this case, the modulus of ๐€ is the square root of ๐‘Ž one squared plus ๐‘Ž two squared. And this is of course the square root of the expression we have for the dot product between ๐€ and itself.

So if we were to square the modulus of ๐€, then we would see something interesting. The modulus of ๐€ squared is ๐‘Ž one squared plus ๐‘Ž two squared, the sums of the squares of its components. Therefore, weโ€™ve shown, in the two-dimensional case, the dot product between ๐€ and itself is equal to the modulus of ๐€ squared. And in fact, we can show exactly the same result is true for vectors in any number of dimensions. If we let ๐€ be the ๐‘›-dimensional vector ๐‘Ž one, ๐‘Ž two all the way up to ๐‘Ž ๐‘›, then we can calculate the dot product between the vector ๐€ and itself in exactly the same way. We multiply the corresponding components and add the results. This is ๐‘Ž one times ๐‘Ž one plus ๐‘Ž two times ๐‘Ž two, and we add all the way up to ๐‘Ž ๐‘› times ๐‘Ž ๐‘›.

We can simplify each term in exactly the same way we did before. And in exactly the same way, the sums of the squares of the components will be the modulus of ๐€ squared. Therefore, we were able to show the dot product between a vector ๐€ and itself is equal to the modulus of ๐€ squared.

Letโ€™s now see how we can use this result to help us prove a very useful formula to do with the dot product. We want to use the dot product to help us find the angle between two vectors. So letโ€™s consider the following two vectors: vector ๐ฎ and vector ๐ฏ. And remember, whatโ€™s important about vectors is their magnitude and direction, so we can draw both of our vectors starting at the origin. We want to find the value of ๐œƒ, which is the angle between our two vectors. And letโ€™s also say that ๐ฎ is the vector ๐‘ฅ one, ๐‘ฆ one and ๐ฏ is the vector ๐‘ฅ two, ๐‘ฆ two.

And before we continue, itโ€™s worth pointing out that the exact same reasoning weโ€™re going to use will work in higher dimensions. However, itโ€™s easier to visualize this in two dimensions. To help us find the value of ๐œƒ, weโ€™re going to use what we know about the dot product and some trigonometry. First, we construct the following triangle by constructing the vector ๐ฏ minus ๐ฎ. And we know we can find an expression for this vector by subtracting ๐ฎ from ๐ฏ component-wise. Itโ€™s the vector ๐‘ฅ two minus ๐‘ฅ one, ๐‘ฆ two minus ๐‘ฆ one.

At this point, thereโ€™s two things we can do to this diagram. Letโ€™s first try applying the laws of cosines to this diagram. Remember, we can find the lengths of these vectors by taking the modulus of them. And our angle ๐œƒ is opposite the side with length modulus of ๐ฏ minus ๐ฎ. Therefore, applying the laws of cosines to this triangle, we get the modulus of ๐ฏ minus ๐ฎ all squared is equal to the modulus of ๐ฎ squared plus the modulus of ๐ฏ squared minus two times the modulus of ๐ฎ times the modulus of ๐ฏ multiplied by the cos of ๐œƒ.

Now, if we knew the vectors ๐ฎ and ๐ฏ, we could find the angle between them by using this formula. However, we can actually simplify this formula by using what we know about dot products. Remember, a vector dot producted with itself is equal to its magnitude squared. Therefore, the magnitude of ๐ฏ minus ๐ฎ all squared is actually equal to the vector ๐ฏ minus ๐ฎ dot producted with the vector ๐ฏ minus ๐ฎ. And we know an expression component-wise for the vector ๐ฏ minus ๐ฎ. So we can write these two vectors out in full and actually calculate the dot product. We need to multiply the first components together and then add on the product of the second components. This simplifies to give us ๐‘ฅ two minus ๐‘ฅ one all squared plus ๐‘ฆ two minus ๐‘ฆ one all squared.

Letโ€™s now distribute the squares over both of our parentheses. Distributing and rearranging, we get ๐‘ฅ two squared plus ๐‘ฅ one squared minus two ๐‘ฅ one ๐‘ฅ two plus ๐‘ฆ two squared plus ๐‘ฆ one squared minus two ๐‘ฆ one ๐‘ฆ two. And at first, it might not seem like weโ€™re simplifying at all. However, we can now simplify this expression. First, we notice ๐‘ฅ one squared plus ๐‘ฆ one squared is the modulus of ๐ฎ squared. Similarly, ๐‘ฅ two squared plus ๐‘ฆ two squared is the modulus of ๐ฏ squared. And for our last two terms, weโ€™re going to start by taking out the shared factor of negative two. And this gives us an extra term of negative two times ๐‘ฅ one ๐‘ฅ two plus ๐‘ฆ one ๐‘ฆ two.

But we know how to simplify ๐‘ฅ one times ๐‘ฅ two plus ๐‘ฆ one times ๐‘ฆ two by using our dot product. Inside of our parentheses is exactly the dot product between the vectors ๐ฎ and ๐ฏ. So letโ€™s think about exactly what weโ€™ve shown. We found two different expressions for the modulus of ๐ฏ minus ๐ฎ all squared. Therefore, these two expressions have to be equal. So letโ€™s set both of these two expressions equal to each other. We can immediately see some ways of simplifying. For example, we can subtract the modulus of ๐ฎ squared and the modulus of ๐ฏ squared from both sides of the equation. This leaves us with negative two times the modulus of ๐ฎ multiplied by the modulus of ๐ฏ times the cos of ๐œƒ is equal to negative two times the dot product between ๐ฎ and ๐ฏ.

Of course, we can simplify this further. We can divide through by negative two. And remember, when we initially set up this problem, we wanted to find the angle between vectors ๐ฎ and ๐ฏ. So in particular, it wouldnโ€™t be very useful if either ๐ฎ or ๐ฏ was the zero vector because then we couldnโ€™t find the angle between these vectors anyway. It wouldnโ€™t make sense. So in this context, it makes sense that the modulus of ๐ฎ and the modulus of ๐ฏ is not zero. So weโ€™ll divide through by this, and this gives us a really useful result. If ๐œƒ is the angle between the vectors ๐ฎ and ๐ฏ, then the cos of ๐œƒ will be equal to the dot product between ๐ฎ and ๐ฏ divided by the magnitude of ๐ฎ times the magnitude of ๐ฏ. And of course, we can solve for ๐œƒ by taking the inverse cosine of both sides of this equation.

And there is something interesting worth pointing out about our value of ๐œƒ. Our value of ๐œƒ is going to be between zero and 180 degrees inclusive. And this makes sense if we looked at our diagram. Of course, in any diagram, thereโ€™s two possible values for ๐œƒ. We could have the internal angle between our two vectors, or we could have the external angle between these two vectors. Both are solutions to this equation; however, weโ€™re interested in the internal angle.

Letโ€™s see an example of how we could use this to find the angle between two vectors.

Given the vectors ๐ฎ four, one and ๐ฏ two, five, find their dot product and the angle between them to one decimal place.

In this question, weโ€™re given two two-dimensional vectors ๐ฎ and ๐ฏ, and weโ€™re asked to determine two things. First, we need to find the dot product between these two vectors. Then, we need to find the angle between these two vectors, and we need to give our answer to one decimal place. To do this, letโ€™s start by recalling how we calculate the dot product between two vectors. We recall if ๐ฎ is the vector ๐‘ฅ one, ๐‘ฆ one and ๐ฏ is the vector ๐‘ฅ two, ๐‘ฆ two, then the dot product between ๐ฎ and ๐ฏ is the sum of the products of their corresponding components. So ๐ฎ dot ๐ฏ is ๐‘ฅ one times ๐‘ฅ two plus ๐‘ฆ one times ๐‘ฆ two.

We want to use this to find the dot product between the vector four, one and the vector two, five. We need to multiply the corresponding components together and then add these. Thatโ€™s four times two plus one times five. And of course, this simplifies to give us eight plus five, which is equal to 13. The next part of this question wants us to determine the angle between these two vectors. So letโ€™s start by recalling how we do this. We recall if ๐œƒ is the angle between the vectors ๐ฎ and ๐ฏ, then the cos of ๐œƒ will be equal to the dot product of ๐ฎ and ๐ฏ divided by the modulus of ๐ฎ times the modulus of ๐ฏ.

Weโ€™ve already found the dot product between these two vectors, so letโ€™s find the modulus of each vector. Remember, to find the modulus of a vector, we need to sum the squares of the components and take the square root of this value. The modulus of ๐ฎ is the square root of four squared plus one squared, which we can calculate is equal to the square root of 17. Similarly, the modulus of ๐ฏ will be the square root of two squared plus five squared, which we can calculate is the square root of 29. Now we can substitute these values into our formula. Doing this gives us the cos of ๐œƒ is equal to 13 divided by the square root of 17 times the square root of 29.

Finally, we can find our value of ๐œƒ by taking the inverse cosine of both sides of the equation. This gives us ๐œƒ is equal to the inverse cos of 13 divided by root 17 times root 29, which to one decimal place is 54.2 degrees, which is our final answer. Itโ€™s also worth pointing out it can be useful to check our answer by sketching both of these vectors on a diagram. If we were to do this, we would get a sketch which looks like this. The horizontal component of ๐ฎ is four, and the vertical component is one. And the horizontal component of ๐ฏ is two, and the vertical component is five. And we draw both vectors starting from the origin, giving us that ๐œƒ is the angle between them. We could then also find the value of ๐œƒ by using trigonometry. Either way, we showed the dot product between these two vectors was 13 and the angle between them to one decimal place was 54.2 degrees.

Letโ€™s now see an example where the angle between our vectors is obtuse.

Find the angle between the vectors ๐ฎ three, negative two and ๐ฏ negative five, negative three. Give your answer to one decimal place.

We want to find the angle between two vectors. So letโ€™s start by sketching the situation. Our vector ๐ฎ has horizontal component three and vertical component negative two. And our vector ๐ฏ has horizontal component negative five and vertical component negative three. We want to find the angle between these two vectors. This will be the angle ๐œƒ, and we know a formula to do this. We recall if ๐œƒ is the angle between two vectors ๐ฎ and ๐ฏ, then the cos of ๐œƒ will be equal to the dot product of ๐ฎ and ๐ฏ divided by the modulus of ๐ฎ times the modulus of ๐ฏ.

So to find our value of ๐œƒ, we need to find the dot product of our two vectors and both of their magnitudes. Letโ€™s start with the dot product. Remember, to find the dot product of two vectors, we multiply their corresponding components and add the result. This gives us three times negative five plus negative two times negative three, which we can calculate is equal to negative nine. Letโ€™s now find the modulus of our vectors ๐ฎ and ๐ฏ. Letโ€™s start with the modulus of ๐ฎ. We need to take the square root of the squares of the sum of our components. The modulus of ๐ฎ is the square root of three squared plus negative two all squared, which we can calculate is the square root of 13.

We can do the same to find the modulus of ๐ฏ. Itโ€™s the square root of negative five squared plus negative three squared, which is the square root of 34. Now we can substitute these values into our formula and take the inverse cosine to find our value of ๐œƒ. This gives us that ๐œƒ will be the inverse cos of negative nine divided by the square root of 13 times the square root of 34, which to one decimal place is our final answer of 115.3 degrees.

Letโ€™s now see one last example of how this angle formula can be used.

Given that ๐€ is the vector negative four, ๐‘˜ and ๐ is the vector negative 12, negative three and ๐€ is perpendicular to ๐, determine the value of ๐‘˜.

In this question, weโ€™re given two vectors and weโ€™re told that ๐€ is perpendicular to ๐. We need to use this to determine our value of ๐‘˜. To answer this question, letโ€™s first recall if ๐€ and ๐ are perpendicular, then the angle between them must be equal to 90 degrees. And this is useful because we also know a formula involving the angle between two vectors. We recall if ๐œƒ is the angle between two vectors ๐€ and ๐, then the cos of ๐œƒ will be equal to the dot product of ๐€ and ๐ divided by the magnitude of ๐€ times the magnitude of ๐. And in our question, our vectors are perpendicular, so the angle between them, ๐œƒ, should be equal to 90 degrees.

So we can ask the question, what happens if we substitute the value of 90 degrees into this formula? Well, the cos of 90 degrees is equal to zero. Therefore, the dot product of ๐€ and ๐ divided by the magnitude of ๐€ times the magnitude of ๐ should be equal to zero. And we can see the only way this will happen will be if the dot product between ๐€ and ๐ is zero. This gives us a really useful result about two vectors. If ๐ฎ and ๐ฏ are perpendicular, then their dot product must be equal to zero. We can now use this to answer our question. ๐€ and ๐ are perpendicular, so their dot product is equal to zero. So we can find an equation for ๐€ by solving the dot product of these two vectors is equal to zero.

Remember, to find the dot product of two vectors, we multiply the corresponding components and add the results. So the dot product of ๐€ and ๐ is negative four times negative 12 plus ๐‘˜ times negative three, which we can simplify. Negative four times negative 12 is 48, and ๐‘˜ times negative three is negative three ๐‘˜. And remember, this is equal to zero because ๐€ and ๐ are perpendicular. Now we can just rearrange this equation for ๐‘˜. We add three ๐‘˜ to both sides of our equation and divide through by three, giving us if the vectors ๐€ and ๐ are perpendicular, then our value of ๐‘˜ must be equal to 16.

Now letโ€™s go over the key points of this video. First, we saw if ๐ฎ is a vector with components ๐‘ข one, ๐‘ข two up to ๐‘ข ๐‘› and ๐ฏ is the vector with components ๐‘ฃ one, ๐‘ฃ two up to ๐‘ฃ ๐‘›, then we can calculate the dot product between ๐ฎ and ๐ฏ by multiplying the corresponding components and then adding all of these together. We also saw this only makes sense if they have the same number of components. In other words, our vectors must be of the same dimension. We also saw that the result we get from the dot product of two vectors is a scalar. So this is sometimes called the scalar product.

Next, we saw a few useful results involving the dot product, the most important of which is if ๐œƒ is the angle between ๐ฎ and ๐ฏ, then the cos of ๐œƒ will be equal to the dot product of ๐ฎ and ๐ฏ divided by the modulus of ๐ฎ times the modulus of ๐ฏ. And this gives us a useful result. If ๐ฎ and ๐ฏ are perpendicular vectors, the angle between them should be 90 degrees. And the cos of 90 is zero, so the only way this can happen is if the dot product between ๐ฎ and ๐ฏ is zero.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

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