How to Find the Scalar Product of Two Vectors (3D)

The scalar product or dot product is one of the most important mathematical operations related to vectors, most of all because it shows whether two vectors are perpendicular (90° between them) to each other or not. When two vectors are perpendicular, they are said to be orthogonal. The rule looks like this:

Rule

Scalar Product and Orthogonality

Orthogonal vectors are vectors that are perpendicular to each other:

a b a b = 0

You have an equivalence arrow between the expressions. This means that if one of them is true, the other one is also true.

There are two formulas for finding the dot product (scalar product). One is for when you have two vectors on coordinate form, and the other is used when you know the length of the vectors and the angle between them.

Formula

Scalar Product for Vector Coordinates

u v = (x1,y1,z1) (x2,y2,z2) = x1x2 + y1y2 + z1z2

u v = (x1,y1,z1) (x2,y2,z2) = x1x2 + y1y2 + z1z2

Formula

Scalar Product when the Angle Is Given

u v = |u| |v| cos α,α = (u,v)

Example 1

Decide whether the vectors (4, 5, 3) and (2, 3,1) are orthogonal.

(4, 5, 3) (2, 3,1) = 4 2 + 5 3 + 3 (1) = 8 + 15 3 = 4 0.

(4, 5, 3) (2, 3,1) = 4 2 + 5 3 + 3 (1) = 8 + 15 3 = 4 0.

Because the dot product is not equal to 0, you know that the vectors are not orthogonal.

Example 2

Find the dot product of the vectors u and v with lengths |u| = 3 and |v| = 5, when the angle between them is (u,v) = 90°.

u v = |u| |v| cos 90° = 3 5 0 = 0

As the dot product is 0, you know that u and v are perpendicular, which is in line with the assumption that the angle between them is 90°.

Example 3

Two vectors spanning an angle inside a three-dimensional coordinate system

Find t such that (2, 5, 2) and (2t, 9,1) are orthogonal.

For two vectors to be orthogonal, their dot product has to be 0.

(2, 5, 2) (2t, 9,1) = 0 4t + 45 2 = 0 t = 43 4

When t = 43 4 , the vectors are orthogonal. In that case, the vector is

(2t, 9,1) = (43 2 , 9,1) .

Rule

The Angle Between Two Vectors

The angle α between two vectors u and v is

cos α = u v |u| |v|,α [0°, 180°] .

Example 4

Find the angle between u = (3, 3, 3) and v = (2, 1, 6).

You start by calculating the length of the two vectors:

|u| = 32 + 32 + 32 = 27 |v| = 22 + 12 + 62 = 41

Next, you find the dot product:

u v = (3, 3, 3) (2, 1, 6) = 3 2 + 3 1 + 3 6 = 27

u v = (3, 3, 3) (2, 1, 6) = 3 2 + 3 1 + 3 6 = 27

Then you insert the numbers into the formula in order to find the cosine of the angle:

cos α = u v |u| |v| = 27 27 41 = 27 41

Finally, you can use this to find the angle, which is

α = cos 127 41 35.76°.

Example 5

Let u = a + b and v = 2a b, where a and b are two relatively unknown vectors. All you know is that |a| = 2, |b| = 3, and that the angle between a and b is 60°. What is the angle between u and v?

Like in Example 4, you start by finding the lengths of the two vectors. This time, you also have to use some rules when you are cleaning up dot products and parentheses, and especially that

a a = a2 = |a|2.

Recall that cos 60° = 1 2. You get that

|u|2 = (a + b) (a + b) = a2 + 2a b + b2 = |a|2 + 2 |a| |b| cos 60° + |b|2 = 22 + 2 2 3 1 2 + 32 = 4 + 6 + 9 = 19, |v|2 = (2a b) (2a b) = 4a2 4a b + b2 = 4 |a|2 4 |a| |b| cos 60° + |b|2 = 4 22 4 2 3 1 2 + 32 = 16 12 + 9 = 13.

Next, you find the dot product in the same way:

u v = (a + b) (2a b) = 2a2 + 2a b b a b2 = 2 |a|2 + |a| |b| cos 60° |b|2 = 2 22 + 2 3 1 2 32 = 8 + 3 9 = 2.

You insert these values into the formula to find the cosine of the angle:

cos α = u v |u| |v| = 2 19 13 = 2 247.

That finally gets you the angle, which is

α = cos 1 ( 2 247) 82.51°.

Want to know more?Sign UpIt's free!