- Practice
- About 18 min
- 5 practice questions
Geometry with dot and cross products: distance from a point to a line, altitudes and areas
Find the perpendicular distance from a point to a line, the foot of the perpendicular, the altitude of a triangle and the area of a quadrilateral using the dot and cross products.
If something looks wrong, please tell us.
Geometry problems about distances and areas look different from the products of vectors, but the two fit together. The cross product gives areas and the sine of an angle; the dot product gives projections and the foot of a perpendicular. This lesson collects four standard uses and works one example of each.
The four results
| Task | Formula |
|---|---|
| Distance from P to the line through A with direction b | |AP × b| / |b| |
| Foot of the perpendicular from P | F = A + t b, with t = (AP · b)/|b|² |
| Altitude from A to BC of a triangle | 2 × area / |BC|, where area = ½ |AB × AC| |
| Area of a quadrilateral with diagonals d₁ and d₂ | ½ |d₁ × d₂| |
The distance formula holds because |AP × b| = |AP||b| sin θ, so |AP × b|/|b| = |AP| sin θ, which is the length of the part of AP perpendicular to the line. The foot formula holds because t b is the vector projection of AP on b. The quadrilateral formula holds for any plane quadrilateral, because the diagonals cut it into four triangles.
Distance to a line = |AP × b|/|b|. Foot: A + t b with t = (AP · b)/|b|². Quadrilateral = ½|d₁ × d₂|. Check every foot by testing that PF · b = 0.
Worked example 1: distance and foot
Find the distance of P(−2, 0, −1) from the line through A(1, 0, 2) with direction b = i + 2j + 2k, and the foot of the perpendicular. Here AP = (−3, 0, −3) and |b| = 3. The cross product AP × b = (0·2 − (−3)·2, (−3)·1 − (−3)·2, (−3)·2 − 0·1) = (6, 3, −6), with magnitude √(36 + 9 + 36) = 9. The distance is 9/3 = 3. For the foot, AP · b = −3 − 6 = −9, so t = −9/9 = −1 and F = A − b = (0, −2, 0). Check: PF = (2, −2, 1), PF · b = 2 − 4 + 2 = 0 and |PF| = √9 = 3.
Worked example 2: altitude and area of a triangle
The triangle has vertices A(1, 1, 1), B(−2, 0, 5) and C(−2, 4, 5). Then AB = (−3, −1, 4) and AC = (−3, 3, 4), and AB × AC = ((−1)(4) − 4·3, 4·(−3) − (−3)·4, (−3)·3 − (−1)(−3)) = (−16, 0, −12), with magnitude 20. So the area is 10. Since BC = (0, 4, 0) has length 4, the altitude from A is 2 × 10 / 4 = 5. To find its foot D on BC, take BA · BC = (3, 1, −4) · (0, 4, 0) = 4 and |BC|² = 16, so t = 1/4 and D = B + ¼ BC = (−2, 1, 5). Check: AD = (−3, 0, 4) has length 5 and AD · BC = 0.
Worked example 3: a quadrilateral
Find the area of the quadrilateral ABCD with A(0, 0, 0), B(4, 1, 0), C(5, 5, 0) and D(1, 4, 0). The diagonals are AC = (5, 5, 0) and BD = (−3, 3, 0). Their cross product is (0, 0, 5·3 − 5·(−3)) = (0, 0, 30), so the area is ½ × 30 = 15. As a check, the shoelace formula gives ½ |0·1 − 4·0 + 4·5 − 5·1 + 5·4 − 1·5 + 1·0 − 0·4| = ½ × 30 = 15.
Traps
- Forgetting to divide by |b|: |AP × b| alone is the area of a parallelogram, not a distance.
- Using A to P in one formula and P to A in another. The sign of t depends on this, and a sign error moves the foot to the wrong side.
- Forgetting the ½ in the area of a triangle or a quadrilateral.
- Not checking PF · b = 0 when you have found a foot.
Key takeaways. The cross product divided by a length gives a distance. The dot product divided by a length squared gives the position of the foot along the line. For areas, use half of the cross product of two sides (triangle) or of two diagonals (quadrilateral).
Check your understanding
-
1. What is the distance of P(−1, 1, −1) from the line through A(1, 1, 1) with direction i + 2j + 2k?
- 6
- 3
- √8
- 2
Show answer
Answer: D. AP = (−2, 0, −2) and AP × b = (0·2 − (−2)·2, (−2)·1 − (−2)·2, (−2)·2 − 0) = (4, 2, −4), with magnitude 6. Dividing by |b| = 3 gives 2.
-
2. What is the distance of P(−1, −1, 0) from the line r = λ(i + 2j + 2k)?
- 3
- 1
- √2
- 2
Show answer
Answer: B. AP = (−1, −1, 0) and AP × b = (−1·2 − 0·2, 0·1 − (−1)·2, −1·2 − (−1)·1) = (−2, 2, −1), with magnitude 3. Dividing by |b| = 3 gives 1. The value 3 forgets to divide.
-
3. The diagonals of a plane quadrilateral are 6i and 4j + 3k. What is its area?
- 30
- 12
- 15
- 7.5
Show answer
Answer: C. d₁ × d₂ = (0, −18, 24), with magnitude 30. The area is half of that, 15. The value 30 forgets the ½.
-
4. A triangle has area 12, and its base BC has length 6. What is the altitude from A to BC?
- 4
- 2
- 8
- 72
Show answer
Answer: A. Area = ½ × base × height, so the height is 2 × 12 / 6 = 4.
-
5. What is the area of the triangle with vertices A(1, 0, 0), B(0, 2, 0) and C(0, 0, 2)?
- 2√6
- 3
- √6
- 6
Show answer
Answer: C. AB = (−1, 2, 0) and AC = (−1, 0, 2), so AB × AC = (4, 2, 2), with magnitude √24 = 2√6. The area is half of this, √6.
Sign in to keep track of the lessons you finish.