Pulsars
0 %
Log inSign up

Orthogonality and applications of the scalar product

Calculating angles and lengths

Finding an angle using the dot product

By combining the two dot product formulas (using the angle and using the coordinates), we can calculate the cosine of an angle between two vectors, even without a protractor:

cos(theta) = u.v / (||u|| * ||v||)

Example

Let u(1; 0) and v(1; 1). We calculate u·v = 1·1 + 0·1 = 1. We calculate the magnitudes: ||u|| = √(1² + 0²) = 1, and ||v|| = √(1² + 1²) = √2.

cos(theta) = 1 / (1 * sqrt(2)) = 1/sqrt(2)

We recognise this value: theta = 45 degrees.

Al-Kashi’s theorem (law of cosines)

In a triangle ABC, letting a = BC, b = AC and c = AB, the dot product allows us to prove the following relationship, which generalises the Pythagorean theorem to all triangles:

a² = b² + c² - 2bc cos(A)

When angle A is 90 degrees, cos(A) = 0, and we obtain exactly the Pythagorean theorem: a² = b² + c².

Example

In a triangle ABC, we are given AB = 5, AC = 7, and angle A = 60 degrees. We calculate BC:

BC² = 5² + 7² - 2 × 5 × 7 × cos(60) = 25 + 49 - 70 × 0.5 = 74 - 35 = 39

BC = √39, which is approximately 6.24.

Summary table of uses of the dot product

Purpose Formula to use
Check orthogonality u·v = 0?
Calculate a length (norm)
Calculate the angle between two vectors cos(theta) = u·v / (
Calculate a side in any triangle Al-Kashi’s theorem

Common pitfall

In Al-Kashi’s formula, the angle used must be the one between the two sides b and c (i.e. angle A, opposite the side a we are looking for). Choosing the wrong vertex for the angle will give a completely incorrect result.