Lesson Explainer: Dot Product in 3D Mathematics

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

The dot product, also called a scalar product because it yields a scalar quantity, not a vector, is one way of multiplying vectors together.

You are probably already familiar with finding the dot product in the plane (2D). You may have learned that the dot product of ⃑𝐴 and ⃑𝐡 is defined as ⃑𝐴⋅⃑𝐡=β€–β€–βƒ‘π΄β€–β€–Γ—β€–β€–βƒ‘π΅β€–β€–Γ—πœƒcos, where πœƒ is the angle between the two vectors ⃑𝐴 and ⃑𝐡.

With a little bit of geometry, one can show that it can be calculated from the components of both vectors: ⃑𝐴⋅⃑𝐡=𝐴𝐡+π΄π΅ο—ο—ο˜ο˜, where 𝐴 and 𝐡 are the π‘₯-components of ⃑𝐴 and ⃑𝐡, and 𝐴 and 𝐡 are their 𝑦-components.

Let us consider two vectors ⃑𝐴 and ⃑𝐡 that make angles πœƒοŠ§ and πœƒοŠ¨ with the positive direction of the π‘₯-axis respectively.

The angle between them is then πœƒ=πœƒβˆ’πœƒοŠ¨οŠ§. Given that 𝐴=β€–β€–βƒ‘π΄β€–β€–πœƒ,𝐴=β€–β€–βƒ‘π΄β€–β€–πœƒ,𝐡=β€–β€–βƒ‘π΅β€–β€–πœƒ,𝐡=β€–β€–βƒ‘π΅β€–β€–πœƒ,ο—οŠ§ο˜οŠ§ο—οŠ¨ο˜οŠ¨cossincossin we find that 𝐴𝐡+𝐴𝐡=β€–β€–βƒ‘π΄β€–β€–β‹…β€–β€–βƒ‘π΅β€–β€–πœƒπœƒ+β€–β€–βƒ‘π΄β€–β€–β‹…β€–β€–βƒ‘π΅β€–β€–πœƒπœƒ=‖‖⃑𝐴‖‖⋅‖‖⃑𝐡‖‖(πœƒπœƒ+πœƒπœƒ).ο—ο—ο˜ο˜οŠ§οŠ¨οŠ§οŠ¨οŠ§οŠ¨οŠ§οŠ¨coscossinsincoscossinsin

Using the subtraction trigonometric identity coscoscossinsin(π›Όβˆ’π›½)=𝛼𝛽+𝛼𝛽, we find, by replacing 𝛼 with πœƒοŠ¨ and 𝛽 with πœƒοŠ§, that coscoscossinsincoscossinsin(πœƒβˆ’πœƒ)=πœƒπœƒ+πœƒπœƒ=πœƒπœƒ+πœƒπœƒ.

As πœƒ=πœƒβˆ’πœƒοŠ¨οŠ§, we have 𝐴𝐡+𝐴𝐡=β€–β€–βƒ‘π΄β€–β€–β‹…β€–β€–βƒ‘π΅β€–β€–πœƒ=⃑𝐴⋅⃑𝐡.ο—ο—ο˜ο˜cos

Moving on to 3D vectors, the definition of the dot product is unchanged.

Definition: Dot Product of Two 3D Vectors

⃑𝐴⋅⃑𝐡=β€–β€–βƒ‘π΄β€–β€–β‹…β€–β€–βƒ‘π΅β€–β€–β‹…πœƒ,cos where πœƒ is the angle between ⃑𝐴 and ⃑𝐡.

Let us look at our first example and apply the definition of the dot product.

Example 1: Finding the Dot Product of Two Vectors given the Norm of One of Them, the Components of the Other, and the Angle between Them

Suppose ⃑𝐴=(βˆ’1,2,7), ‖‖⃑𝐡‖‖=13, and the angle between the two vectors is 135∘. Find ⃑𝐴⋅⃑𝐡 to the nearest hundredth.

Answer

We know that ⃑𝐴⋅⃑𝐡=β€–β€–βƒ‘π΄β€–β€–β‹…β€–β€–βƒ‘π΅β€–β€–πœƒcos. We already know ‖‖⃑𝐡‖‖ and the angle πœƒ. We, therefore, need to find ‖‖⃑𝐴‖‖ using the components of ⃑𝐴: ‖‖⃑𝐴‖‖=𝐴+𝐴+𝐴=√(βˆ’1)+2+7=√54.οŠ¨ο—οŠ¨ο˜οŠ¨ο™οŠ¨οŠ¨οŠ¨

Now, substituting this value into our equation for ⃑𝐴⋅⃑𝐡, we find ⃑𝐴⋅⃑𝐡=√54β‹…13β‹…135β‰ƒβˆ’67.55.cos∘

How To: Calculating a Dot Product Using the Vector’s Components

The dot product of 3D vectors is calculated using the components of the vectors in a similar way as in 2D, namely, ⃑𝐴⋅⃑𝐡=𝐴𝐡+𝐴𝐡+𝐴𝐡,ο—ο—ο˜ο˜ο™ο™ where the subscripts π‘₯, 𝑦, and 𝑧 denote the components along the π‘₯-, 𝑦-, and 𝑧-axes.

Let us apply this method with the next example.

Example 2: Finding the Dot Product of Two Vectors given Their Components

Given that ⃑𝐴=(βˆ’6,βˆ’3,5) and ⃑𝐡=(7,βˆ’4,βˆ’1), determine ⃑𝐴⋅⃑𝐡.

Answer

We calculate here the dot product using ⃑𝐴⋅⃑𝐡=𝐴𝐡+𝐴𝐡+𝐴𝐡,ο—ο—ο˜ο˜ο™ο™ where the subscripts π‘₯, 𝑦, and 𝑧 denote the components along the π‘₯-, 𝑦-, and 𝑧-axes. We thus have ⃑𝐴⋅⃑𝐡=(βˆ’6)β‹…7+(βˆ’3)β‹…(βˆ’4)+5β‹…(βˆ’1)=βˆ’42+12+(βˆ’5)=βˆ’35.

Now that we know how the dot product is defined and how to calculate it using the vectors’ components, let us look at the properties of the dot product.

As the dot product is the product of the magnitudes of the vectors multiplied by the cosine of the angle between them, it is zero when the cosine of the angle between both vectors is zero. This happens when the angle between them is 90∘ or βˆ’90∘ (or 270∘), that is, when they are perpendicular.

Property: Dot Product of Two Perpendicular Vectors

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

To recall what angles have a cosine of zero, you can visualize the unit circle, remembering that the cosine is the π‘₯-coordinate of point P associated with the angle πœƒ.

We are going to use this property in the next two examples.

Example 3: Finding Missing Components of Orthogonal Vectors

For what value of π‘˜ are vectors ⃑𝐴=(7,βˆ’7π‘˜,βˆ’6) and ⃑𝐡=(7,βˆ’3,π‘˜) perpendicular?

Answer

If two vectors are perpendicular, then the angle between them is 90∘ or βˆ’90∘ (or 270∘). In both cases, the cosine of the angle between them is zero. Therefore, the dot product between the two vectors is zero. In this question, it means that ⃑𝐴⋅⃑𝐡=0; that is, 𝐴𝐡+𝐴𝐡+𝐴𝐡=0.ο—ο—ο˜ο˜ο™ο™

Hence, we have 7β‹…7+(βˆ’7π‘˜)β‹…(βˆ’3)+(βˆ’6)β‹…π‘˜=049+21π‘˜βˆ’6π‘˜=0π‘˜=βˆ’4915.

Example 4: Identifying Perpendicular and Parallel Vectors

Which of the following is true of the vectors ⃑𝐴=(βˆ’3,7,βˆ’8) and ⃑𝐡=(βˆ’6,βˆ’1,βˆ’1)?

  1. They are parallel.
  2. They are perpendicular.
  3. They are neither parallel nor perpendicular.

Answer

If ⃑𝐴 and ⃑𝐡 are parallel, then there is a number π‘˜ such that ⃑𝐴=π‘˜βƒ‘π΅. We would have βˆ’3=βˆ’6π‘˜7=βˆ’π‘˜βˆ’8=βˆ’π‘˜.

There is clearly no value of π‘˜ that verifies the three equations since we get three different solutions for each of them ο€Ό12,βˆ’7,8and. Therefore, ⃑𝐴 and ⃑𝐡 are not parallel.

If ⃑𝐴 and ⃑𝐡 are perpendicular, then their dot product is zero. Let us work out their dot product: ⃑𝐴⋅⃑𝐡=𝐴𝐡+𝐴𝐡+𝐴𝐡=(βˆ’3)β‹…(βˆ’6)+7β‹…(βˆ’1)+(βˆ’8)β‹…(βˆ’1)=18+(βˆ’7)+8=19.ο—ο—ο˜ο˜ο™ο™

Their dot product is not zero; therefore, ⃑𝐴 and ⃑𝐡 are not perpendicular.

The correct answer is that ⃑𝐴 and ⃑𝐡 are neither parallel nor perpendicular.

Other properties of the dot product arise from the fact that the cosine of the angle between the two vectors is one of its factors. For instance, given that the cosine function is even with a period of 360∘, this means that it does not matter if we take the angle from ⃑𝐴 to ⃑𝐡 or from ⃑𝐡 to ⃑𝐴 because coscoscosπœƒ=(βˆ’πœƒ)=(360βˆ’πœƒ).

Therefore, the dot product is commutative: ⃑𝐴⋅⃑𝐡=⃑𝐡⋅⃑𝐴.

Also, the dot product of two collinear vectors is plus or minus the product of their magnitudes. Indeed, let us consider, first, two collinear vectors ⃑𝐴 and ⃑𝐡, with the angle between them being zero: ⃑𝐴⋅⃑𝐡=‖‖⃑𝐴‖‖⋅‖‖⃑𝐡‖‖⋅0=‖‖⃑𝐴‖‖⋅‖‖⃑𝐡‖‖,cos since cos0=1.

Let us now consider two collinear vectors ⃑𝐴 and ⃑𝐡, with the angle between them being 180∘ (i.e., the two vectors point to opposite directions): ⃑𝐴⋅⃑𝐡=‖‖⃑𝐴‖‖⋅‖‖⃑𝐡‖‖⋅180=βˆ’β€–β€–βƒ‘π΄β€–β€–β‹…β€–β€–βƒ‘π΅β€–β€–,cos∘ since cos180=βˆ’1∘.

It follows that the dot product of a vector with itself gives the square of its magnitude. This can be easily checked with the way we calculate the dot product: ⃑𝐴⋅⃑𝐡=𝐴𝐡+𝐴𝐡+𝐴𝐡,ο—ο—ο˜ο˜ο™ο™ so ⃑𝐴⋅⃑𝐴=𝐴𝐴+𝐴𝐴+𝐴𝐴=𝐴+𝐴+𝐴.ο—ο—ο˜ο˜ο™ο™οŠ¨ο—οŠ¨ο˜οŠ¨ο™

Since ‖‖⃑𝐴‖‖=𝐴+𝐴+π΄οŠ¨ο—οŠ¨ο˜οŠ¨ο™, we find that ⃑𝐴⋅⃑𝐴=‖‖⃑𝐴‖‖.

Like multiplication, the dot product is distributive: (⃑𝐴+⃑𝐡)⋅⃑𝐢=⃑𝐴⋅⃑𝐢+⃑𝐴⋅⃑𝐢.

In addition, we have (π‘˜βƒ‘π΄)⋅⃑𝐡=⃑𝐴⋅(π‘˜βƒ‘π΅)=π‘˜ο€Ίβƒ‘π΄β‹…βƒ‘π΅ο†.

Let us use these properties to answer the following question.

Example 5: Using the Distributivity of the Dot Product

If ⃑𝐴 and ⃑𝐡 are two perpendicular unit vectors, find (3βƒ‘π΄βˆ’βƒ‘π΅)β‹…(βˆ’2⃑𝐴+⃑𝐡).

Answer

There are two pieces of information in the phrase β€œβƒ‘π΄ and ⃑𝐡 are two perpendicular unit vectors.” The first one is that the vectors are perpendicular, which means that their dot product is zero. The second one is that they are unit vectors, which means that they have magnitudes of 1. Now, using the distributive property of the dot product, we find that (3βƒ‘π΄βˆ’βƒ‘π΅)β‹…(βˆ’2⃑𝐴+⃑𝐡)=βˆ’6⃑𝐴⋅⃑𝐴+3⃑𝐴⋅⃑𝐡+2βƒ‘π΅β‹…βƒ‘π΄βˆ’βƒ‘π΅β‹…βƒ‘π΅.

As the vectors are perpendicular, the terms 3⃑𝐴⋅⃑𝐡 and 2⃑𝐡⋅⃑𝐴 are zero.

Also, we know that ⃑𝐴⋅⃑𝐴=‖‖⃑𝐴‖‖=1 since ⃑𝐴 is a unit vector. The same applies to ⃑𝐡. Hence, we find that (3βƒ‘π΄βˆ’βƒ‘π΅)β‹…(βˆ’2⃑𝐴+⃑𝐡)=βˆ’6βˆ’1=βˆ’7.

Key Points

  • The dot product of vectors ⃑𝐴 and ⃑𝐡 is defined as ⃑𝐴⋅⃑𝐡=β€–β€–βƒ‘π΄β€–β€–Γ—β€–β€–βƒ‘π΅β€–β€–Γ—πœƒ,cos where πœƒ is the angle between the two vectors ⃑𝐴 and ⃑𝐡.
  • The dot product of 3D vectors can be calculated using the vectors’ components: ⃑𝐴⋅⃑𝐡=𝐴𝐡+𝐴𝐡+𝐴𝐡.ο—ο—ο˜ο˜ο™ο™
  • The dot product has the following properties:
    • ⃑𝐴⋅⃑𝐡=⃑𝐡⋅⃑𝐴 (commutativity),
    • ⃑𝐴⋅⃑𝐴=β€–β€–βƒ‘π΄β€–β€–οŠ¨,
    • ⃑𝐴⋅⃑𝐡=0 if and only if ⃑𝐴 and ⃑𝐡 are perpendicular,
    • (⃑𝐴+⃑𝐡)⋅⃑𝐢=⃑𝐴⋅⃑𝐢+⃑𝐴⋅⃑𝐢 (distributivity),
    • (π‘˜βƒ‘π΄)⋅⃑𝐡=⃑𝐴⋅(π‘˜βƒ‘π΅)=π‘˜ο€Ίβƒ‘π΄β‹…βƒ‘π΅ο†, where π‘˜ is a real number.

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