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

Lesson Explainer: Dot Product in 2D Mathematics

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

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 explainer, we are only going to look at the dot product.

Suppose we have a vector 𝑢 that is 𝑢,𝑢 and a vector 𝑣 that is 𝑣,𝑣. Their dot product is 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.

Definition: Dot Product of Two Vectors

The dot product of two vectors 𝑢=𝑢,𝑢 and 𝑣=𝑣,𝑣 is given by multiplying the corresponding components of each vector and adding the resulting numbers: 𝑢𝑣=𝑢𝑣+𝑢𝑣.

This is demonstrated in example 1.

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

Given the vector 𝑣=(7,2) and the vector 𝑢=(3,6), find 𝑢𝑣.

Answer

Recall that the dot product of two vectors 𝑢=𝑢,𝑢 and 𝑣=𝑣,𝑣 is given by 𝑢𝑣=𝑢𝑣+𝑢𝑣.

Hence, we have 𝑢𝑣=(7,2)(3,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.

Let us see what happens when we carry out the dot product 𝑘𝑢𝑣, where 𝑘 is a nonzero real number and 𝑢=𝑢,𝑢 and 𝑣=𝑣,𝑣. The components of 𝑘𝑢 are then 𝑘𝑢,𝑘𝑢 and we find that 𝑘𝑢𝑣=𝑘𝑢𝑣+𝑘𝑢𝑣=𝑘𝑢𝑣+𝑢𝑣=𝑘𝑢𝑣.

Similarly, we find that 𝑢𝑘𝑣=𝑘𝑢𝑣 and 𝑘𝑢𝑘𝑣=𝑘𝑘𝑢𝑣.

As this is an important property, let us take note of it here.

Property: Scalar Multiplication and Dot Product

For real numbers 𝑘 and 𝑘, we have 𝑘𝑢𝑘𝑣=𝑘𝑘𝑢𝑣.

Additionally, we find from the definition that 𝑣𝑢=𝑣𝑢+𝑣𝑢, which, given that multiplication is commutative, leads to 𝑣𝑢=𝑢𝑣+𝑢𝑣=𝑢𝑣.

This proves the commutativity of the dot product.

Property: Commutativity of the Dot Product

The dot product is commutative: 𝑢𝑣=𝑣𝑢.

Let us now consider three vectors 𝑢=𝑢,𝑢, 𝑣=𝑣,𝑣, and 𝑤=𝑤,𝑤 and work out the dot product 𝑢𝑣+𝑤. We have 𝑣+𝑤=𝑣+𝑤,𝑣+𝑤; hence, 𝑢𝑣+𝑤=𝑢(𝑣+𝑤)+𝑢𝑣+𝑤=𝑢𝑣+𝑢𝑤+𝑢𝑣+𝑢𝑤=𝑢𝑣+𝑢𝑣+𝑢𝑤+𝑢𝑤.

We finally find that 𝑢𝑣+𝑤=𝑢𝑣+𝑢𝑤.

This equation shows that the dot product is distributive.

Property: Distributivity of the Dot Product

The dot product is distributive: 𝑢𝑣+𝑤=𝑢𝑣+𝑢𝑤.

Let us consider a useful property that the dot product has when we take the dot product of a vector with itself, which we will calculate in the following example.

Example 2: Calculating the Dot Product of a Vector with Itself

Given that 𝐴𝐵=(5,12), find 𝐴𝐵𝐴𝐵.

Answer

Recall that the dot product of two vectors 𝑢=𝑢,𝑢 and 𝑣=𝑣,𝑣 is given by 𝑢𝑣=𝑢𝑣+𝑢𝑣.

Since 𝑢=𝑣=(5,12), we have (5,12)(5,12)=55+1212=25+144=169.

To see how this result is significant, let us calculate the magnitude of the same 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 denoted by 𝐴𝐵, is calculated as follows: 𝐴𝐵=5+12=169=13.

If we compare the magnitude and the dot product, we find the following property.

Property: Dot Product and Magnitude

The magnitude of a vector is equal to the square root of its dot product with itself: 𝐴𝐵=𝐴𝐵𝐴𝐵.

The dot product of two vectors can be interpreted geometrically, as given in the following definition box.

Definition: Geometrical Definition of the Dot Product

The dot product of two vectors 𝑢 and 𝑣 equals the product of their magnitudes with the cosine of the angle between them: 𝑢𝑣=𝑢𝑣𝜃,cos where 𝜃 is the angle between 𝑢 and 𝑣.

The geometrical interpretation shows us that the “closer” the two vectors are, the larger the dot product, because the smaller the angle, the larger its cosine. Therefore, the maximum value of the dot product of two vectors of given magnitudes occurs when the two vectors have the same direction, that is, when the angle between them is zero.

The dot product of two collinear vectors having the same direction is 𝑢𝑣=𝑢𝑣0,cos which, since cos0=1, gives 𝑢𝑣=𝑢𝑣.

This is consistent with what we have found before for the dot product of a vector with itself.

When two vectors 𝑢 and 𝑣 are collinear but have opposite directions, the angle between them is 180, with a cosine of 1, so that their dot product is then given by 𝑢𝑣=𝑢𝑣.

On the other hand, when two vectors 𝑢 and 𝑣 are perpendicular, their dot product is zero since the cosine of the angle between them (90) is zero. It is an important property that can be used to check whether two vectors of given components are perpendicular.

Property: Dot Product of Two Perpendicular Vectors

The dot product of two perpendicular vectors is zero. Conversely, when the dot product of two vectors is zero, the two vectors are perpendicular.

Let us look at an example where we need to use this property.

Example 3: Finding the Dot Product of Two Vectors in a Square

Square 𝐴𝐵𝐶𝐷 has a side of 10 cm. What is 𝐴𝐵𝐵𝐶?

Answer

We can start answering this question by sketching square 𝐴𝐵𝐶𝐷 and vectors 𝐴𝐵 and 𝐵𝐶.

We see that 𝐴𝐵 and 𝐵𝐶 are perpendicular since two adjacent sides of a square are perpendicular. The angle between the two vectors is 90, and, as cos90=0, we have 𝐴𝐵𝐵𝐶=𝐴𝐵𝐵𝐶90=0.cos

The answer is 𝐴𝐵𝐵𝐶=0.

Let us look at another example where we need to use the property of perpendicular vectors.

Example 4: Finding the Missing Component of a Vector Given That It Is Perpendicular to Another

Given that 𝐴=(4,𝑘), 𝐵=(12,3), and 𝐴𝐵, determine the value of 𝑘.

Answer

𝐴 and 𝐵 are two perpendicular vectors; this means that their dot product is zero. Let us therefore calculate their dot product using their components: 𝐴𝐵=𝐴𝐵+𝐴𝐵, where 𝐴,𝐴 are the components of 𝐴 and 𝐵,𝐵 are those of 𝐵.

Substituting into our equations the actual components of 𝐴 and 𝐵, we get 𝐴𝐵=4(12)+𝑘(3)𝐴𝐵=483𝑘.

As 𝐴 and 𝐵 are perpendicular, their dot product is zero, which gives 483𝑘=03𝑘=48𝑘=16.

With our last example, we will see how to find a dot product using its geometric definition.

Example 5: Finding the Dot Product of Two Vectors in a Triangle

Given that 𝐴𝐵𝐶 is an isosceles triangle, where 𝐴𝐵=𝐴𝐶=6cm and 𝑚𝐴=120, determine 𝐶𝐴𝐵𝐶.

Answer

Let us first sketch triangle 𝐴𝐵𝐶 and vectors 𝐶𝐴 and 𝐵𝐶.

We are asked to find 𝐶𝐴𝐵𝐶. For this, we need to work out the angle between 𝐶𝐴 and 𝐵𝐶 and the magnitude of 𝐵𝐶.

To find the angle 𝜃 between the two vectors, we draw a vector 𝑢 equivalent to 𝐵𝐶 so that the initial points of 𝑢 and 𝐶𝐴 are coincident.

In isosceles triangle 𝐴𝐵𝐶, 𝑚𝐶=𝑚𝐵=1801202=30. The angle between 𝐶𝐵 and 𝑢 is 180; therefore, we have 𝜃=18030=150.

To find the magnitude of 𝐵𝐶, since we are given the lengths of 𝐴𝐵 and 𝐴𝐶, we simply consider that the magnitudes of the vectors are given here by their lengths in centimetres. Hence, we need to find length 𝐵𝐶. For this, we can use the sine rule in triangle 𝐴𝐵𝐶. It gives 630=𝐵𝐶120𝐵𝐶=612030𝐵𝐶=6𝐵𝐶=63.sinsinsinsincm

We can now find 𝐶𝐴𝐵𝐶 by writing that 𝐶𝐴𝐵𝐶=𝐶𝐴𝐵𝐶𝜃,cos where 𝜃 is the angle between 𝐶𝐴 and 𝐵𝐶. Substituting the magnitudes of 𝐶𝐴 and 𝐵𝐶 and the value of 𝜃 into our equation gives us 𝐶𝐴𝐵𝐶=663150.cos

With cos150=32, we find 𝐶𝐴𝐵𝐶=66332𝐶𝐴𝐵𝐶=54.

As a final note, let us see how to derive the law of cosines using the distributivity of the dot product and its geometrical definition. For any three points 𝐴, 𝐵, and 𝐶, we can write 𝐵𝐶=𝐵𝐶𝐵𝐶=𝐵𝐴+𝐴𝐶𝐵𝐴+𝐴𝐶.

Expanding the parentheses, we find that 𝐵𝐶=𝐵𝐴+𝐵𝐴𝐴𝐶+𝐴𝐶𝐵𝐴+𝐴𝐶.

Since 𝐵𝐴𝐴𝐶=𝐴𝐶𝐵𝐴, we have 𝐵𝐶=𝐵𝐴+𝐴𝐶+2𝐵𝐴𝐴𝐶.

Let 𝜃 be the angle between 𝐵𝐴 and 𝐴𝐶 as shown in the diagram above. We have 𝐵𝐶=𝐵𝐴+𝐴𝐶+2𝐵𝐴𝐴𝐶𝜃.cos

The angle between 𝐴𝐵 and 𝑢 is 180; therefore, we have 𝜃=180𝑚𝐵𝐴𝐶.

And, as coscos(180𝑥)=𝑥 for any 𝑥, we find 𝐵𝐶=𝐵𝐴+𝐴𝐶2𝐵𝐴𝐴𝐶𝐵𝐴𝐶,cos which corresponds to the law of cosines, 𝑎=𝑏+𝑐2𝑏𝑐𝐴,cos with 𝑎=𝐵𝐶, 𝑏=𝐴𝐶, 𝑐=𝐵𝐴, and 𝐴=𝐵𝐴𝐶.

Let us summarize what we have learned in this explainer.

Key Points

  • The dot product of two vectors 𝑢=𝑢,𝑢 and 𝑣=𝑣,𝑣 is given by multiplying the corresponding components of each vector and adding the resulting numbers: 𝑢𝑣=𝑢𝑣+𝑢𝑣.
  • We have 𝑘𝑢𝑘𝑣=𝑘𝑘𝑢𝑣.
  • The dot product is commutative: 𝑢𝑣=𝑣𝑢.
  • The dot product is distributive: 𝑢𝑣+𝑤=𝑢𝑣+𝑢𝑤.
  • The dot product of two vectors 𝑢 and 𝑣 equals the product of their magnitudes with the cosine of the angle between them: 𝑢𝑣=𝑢𝑣𝜃,cos where 𝜃 is the angle between 𝑢 and 𝑣.
  • The dot product of two perpendicular vectors is zero. Conversely, when the dot product of two vectors is zero, the two vectors are perpendicular.

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