✖

Scalar product

The scalar product (dot product) is defined between two vectors and captures the relationship between their magnitudes and the angle between them.

Scalar product

We define the scalar product between two vectors. We write it like an ordinary product, with a centred dot: u→⋅v→. The result of a scalar product is a real number, not a vector. Given two vectors u→=(u1,u2) and v→=(v1,v2), their scalar product is

u→⋅v→=u1v1+u2v2

If at least one of the vectors u→ and v→ is the zero vector, we define their product as

u→⋅v→=0

What is the geometric meaning of the scalar product? For the scalar product of two vectors we also have

u→⋅v→=|u→|⋅|v→|⋅cos⁡α,

where α is the angle between the vectors. This formula gives us an easy way to find the angle between two vectors. If we make cosine the subject, we get

cos⁡α=u→⋅v→|u→|⋅|v→|=u1v1+u2v2u12+u22⋅v12+v22

This formula holds in the plane. In space we have to add one more dimension. Now we can draw the geometric meaning of the scalar product.

Scalar product

If we take the scalar product of the vectors u→ and v→ and divide the result by the length of u→, we get the length of the line segment AD, which is the magnitude of the projection of v→ onto the direction of u→.

Testing for a right angle

We can use the scalar product to test whether the angle between two vectors is 90°. When is the scalar product equal to zero? Look at the formula…

u→⋅v→=|u→|⋅|v→|⋅cos⁡α

… and we see that the product |u→|⋅|v→| is clearly always non-zero (we do not define the angle between zero vectors, so we are dealing only with non-zero vectors). The magnitudes of the vectors are always positive, and so is their product. The only factor that can bring the whole expression down to zero is the cosine. When is the cosine zero? When the angle is 90° (or 270°, though then the right angle is on the other side). So two vectors form a right angle if and only if their scalar product is zero.

For example, take these three vectors: u→1=(−2,4),u→2=(2,1),u→3=(1,4). Which of them are perpendicular to each other? We work out the scalar product of each pair in turn:

u→1⋅u→2=−2⋅2+4⋅1=0u→1⋅u→3=−2⋅1+4⋅4=14u→2⋅u→3=2⋅1+1⋅4=6

According to the scalar product, there is a right angle only between the vectors u→1 and u→2. You can look at a picture of these vectors:

Right angle between vectors

Let’s also work out the angle between the vectors u→1 and u→3. We simply substitute into the formula:

cos⁡α=−2⋅1+4⋅4(−2)2+42⋅12+42=−2+1620⋅17=14340≈1418.439

If we take the inverse cosine, we get the angle. The result is an angle of approximately 40°.

Chapters: Vectors, Operations with vectors, Scalar product, Vector product