the distance between the points P(x₁, y₁, z₁) and Q(x₂, y₂, z₂)
x1
the x-coordinate of P
y1
the y-coordinate of P
z1
the z-coordinate of P
x2
the x-coordinate of Q
y2
the y-coordinate of Q
z2
the z-coordinate of Q
The distance between two points in space is the square root of the sum of the squares of the differences of their three coordinates.
Why it works
Go from P to Q in two moves: first across the floor (the x and y differences), which is √((x₂ − x₁)² + (y₂ − y₁)²) long by the flat distance formula, then straight up by z₂ − z₁. The two moves are at right angles, so by Pythagoras their squares add once more.
When to use it
Lengths of segments in space, the diagonal of a box, and testing whether points lie on one line or make a given triangle.
How to use it
Take away the coordinates of P from those of Q, one pair at a time.
Square the three differences and add them.
Take the square root.
To remember: The flat distance formula with one more square under the root.
Other forms
Special cased=x2+y2+z2When P is the origin, and Q is (x, y, z).
Worked examples
Story
A drone rises from (0, 0, 0) to (6, 2, 3), in metres. How far is it from where it started?
62+22+32=49
49=7
Answer: 7
Picture
Find the length of the long diagonal of a box 3 cm by 4 cm by 12 cm.
9+16+144=13
Answer: 13
Direct
Find the distance between (1, −3, 4) and (−4, 1, 2).
(−4−1)2+(1+3)2+(2−4)2=45
45=35
Answer: 6.708203932499369
Reverse
The point (3, 4, z), with z positive, is 13 units from the origin. Find z.
Try it first, then show the working
32+42+122=13
Answer: 12
Exam
Show that (−2, 3, 5), (1, 2, 3) and (7, 0, −1) lie on one line.
Try it first, then show the working
AB = √14, BC = √56 = 2√14 and AC = √126 = 3√14.
14+214=314
AB + BC = AC, so the three points lie on one line.
Answer: AB + BC = AC, so they are collinear
Common mistake: Forgetting the z term, or squaring before taking away (x₂² − x₁² is not (x₂ − x₁)²).
the point that divides AB in the ratio m1 : m2 (AP : PB = m1 : m2)
m1
the first part of the ratio (the share next to A)
m2
the second part of the ratio (the share next to B)
x1
the x-coordinate of A
y1
the y-coordinate of A
z1
the z-coordinate of A
x2
the x-coordinate of B
y2
the y-coordinate of B
z2
the z-coordinate of B
The point that splits AB in the ratio m1 : m2 is found one coordinate at a time, with the same weighted average as on a flat page, now for z as well.
Why it works
Drop perpendiculars from A, P and B onto a coordinate plane: their feet divide the shadow of AB in the same ratio, so the flat section formula gives the x and y. Doing the same on another plane gives z.
When to use it
Finding the point a given fraction of the way along a segment in space, the midpoint, and the ratio in which a plane or a point divides a segment.
How to use it
Weight each end by the part of the ratio on the far side: m1 goes with B, m2 with A.
Do this for x, for y and for z, dividing each by m1 + m2.
To remember: Cross the ratio over: m1 with the far end.
Other forms
Special caseP=(2x1+x2,2y1+y2,2z1+z2)When m1 = m2: the midpoint.
Worked examples
Story
A cable runs straight from the top of a pole at (0, 0, 12) to a peg at (9, 12, 0), in metres. A bead sits one third of the way along from the top. Where is it?
One third of the way along means the ratio 1 : 2.
x=31×9+2×0=3
y=31×12+2×0=4
z=31×0+2×12=8
Answer: (3, 4, 8)
Picture
Find the midpoint of the join of (2, −1, 4) and (4, 3, −2).
x=22+4=3
y=2−1+3=1
z=24−2=1
Answer: (3, 1, 1)
Direct
Find the point that divides the join of (1, −2, 3) and (3, 4, −5) in the ratio 2 : 3.
x=2+32×3+3×1=59
y=52×4+3×(−2)=52
z=52×(−5)+3×3=−51
Answer: (9/5, 2/5, −1/5)
Reverse
In what ratio does the yz-plane divide the join of (−2, 4, 7) and (3, −5, 8)?
Try it first, then show the working
On the yz-plane x = 0. With the ratio k : 1, (3k − 2) ÷ (k + 1) = 0, and so k = 2/3.
The ratio is 2 : 3. Check: x = (2 × 3 + 3 × (−2)) ÷ 5 = 0.
52×3+3×(−2)=0
Answer: 2 : 3
Exam
Using the section formula, show that A(2, −3, 4), B(−1, 2, 1) and C(0, 1/3, 2) lie on one line.
Try it first, then show the working
Let C divide AB in the ratio k : 1. The x-coordinate gives (−k + 2) ÷ (k + 1) = 0, so k = 2.
y=32×2−3=31
z=32×1+4=2
The y and z of C agree as well, so C is on AB: the points are collinear.
Answer: C divides AB in the ratio 2 : 1, so they are collinear
Common mistake: Pairing m1 with A's coordinates; m1 multiplies B's, since the point is closer to the end with the smaller share.
Class 11
Centroid of a triangle in space
G=(3x1+x2+x3,3y1+y2+y3,3z1+z2+z3)
What each letter means
G
the centroid: where the three medians of the triangle meet
x1
the x-coordinate of the first corner
y1
the y-coordinate of the first corner
z1
the z-coordinate of the first corner
x2
the x-coordinate of the second corner
y2
the y-coordinate of the second corner
z2
the z-coordinate of the second corner
x3
the x-coordinate of the third corner
y3
the y-coordinate of the third corner
z3
the z-coordinate of the third corner
The centroid of a triangle is the average of its three corners, taken one coordinate at a time.
Why it works
The centroid lies on the median from the first corner A, two thirds of the way from A to the midpoint M of the opposite side. The section formula with the ratio 2 : 1 from A to M gives ((x₁ + x₂ + x₃) ÷ 3, …), and the same for y and z.
When to use it
Finding the balance point of a triangle in space, and finding a missing corner when the centroid is known.
How to use it
Add the three x-coordinates and divide by 3.
Do the same for y and for z.
To remember: The centroid is the average corner.
Other forms
To remember itThe centroid is two thirds of the way from each corner to the midpoint of the opposite side.
Worked examples
Story
Three drones hover at (2, 4, 6), (4, 0, 9) and (6, 2, 3), in metres. A camera is set at the centroid of their triangle. Where is it?
x=32+4+6=4
y=34+0+2=2
z=36+9+3=6
Answer: (4, 2, 6)
Picture
For A(0, 0, 0), B(6, 0, 0) and C(0, 6, 6), show that the centroid G is two thirds of the way from A to M, the midpoint of BC.
G = (2, 2, 2), and M, the midpoint of BC, is (3, 3, 3).
32×3=2
Each coordinate of G is two thirds of the way from A to M.
Answer: G = (2, 2, 2), two thirds of the way from A to M = (3, 3, 3)
Direct
Find the centroid of the triangle with corners (3, −5, 7), (−1, 7, −6) and (1, 1, 2).
x=33−1+1=1
y=3−5+7+1=1
z=37−6+2=1
Answer: (1, 1, 1)
Reverse
A triangle has centroid (1, 1, 1) and two corners (3, −5, 7) and (−1, 7, −6). Find the third corner.
Try it first, then show the working
For each coordinate, take three times the centroid and subtract the two known corners.
x3=3−3+1=1
y3=3+5−7=1
z3=3−7+6=2
Answer: (1, 1, 2)
Exam
The origin is the centroid of the triangle with corners (2a, 2, 6), (−4, 3b, −10) and (8, 14, 2c). Find a, b and c.
Try it first, then show the working
Each coordinate of the centroid is 0: 2a − 4 + 8 = 0, 2 + 3b + 14 = 0 and 6 − 10 + 2c = 0.
Solving each: a = −2, b = −16/3 and c = 2.
Answer: a = −2, b = −16/3, c = 2
Common mistake: Dividing by 2 as for a midpoint; three corners means dividing by 3.
Class 12
Direction cosines from direction ratios
l=a2+b2+c2a
What each letter means
l
the direction cosine along the x-axis: the cosine of the angle the line makes with it
a
the direction ratio along x
b
the direction ratio along y
c
the direction ratio along z
A line with direction ratios a, b, c makes angles with the axes whose cosines are a, b and c each divided by √(a² + b² + c²).
Why it works
The vector aî + bĵ + ck̂ points along the line. Dividing it by its length gives the unit vector along the line, and the components of a unit vector are the cosines of its angles with the axes.
When to use it
Describing the direction of a line in space, its angles with the axes, and the angle between two lines.
How to use it
Find the direction ratios (for a line through two points, the differences of their coordinates).
Divide each by √(a² + b² + c²): that gives l, m and n.
To remember: Divide the ratios by their length.
Other forms
Special casel=31When the line makes equal angles with the three axes (a = b = c).
To remember itThe three direction cosines always satisfy l² + m² + n² = 1.
Worked examples
Story
A drone climbs along 3î + 4ĵ + 12k̂. Find the cosine of the angle its path makes with the vertical (the z-axis).
Put the upward ratio first: 12, with 3 and 4.
144+9+1612=1312
Answer: 0.9230769230769231
Picture
Find l for the line through (1, 2, 3) and (3, 4, 4).
The direction ratios are the differences 3 − 1, 4 − 2 and 4 − 3: that is 2, 2 and 1.
4+4+12=32
Answer: 0.6666666666666666
Direct
A line has direction ratios 2, −1, −2. Find its direction cosine l.
4+1+42=32
In the same way, m = −1/3 and n = −2/3.
Answer: 0.6666666666666666
Reverse
A line with direction ratios a, 2, 6 (a positive) has l = 3/7. Find a.
Try it first, then show the working
9+4+363=73
Answer: 3
Exam
A line makes angles of 90°, 135° and 45° with the x, y and z axes. Find its direction cosines.
Try it first, then show the working
They are cos 90°, cos 135° and cos 45°: 0, −1/√2 and 1/√2. Check that their squares add up to 1:
0+21+21=1
Answer: 0, −1/√2, 1/√2
Common mistake: Forgetting to divide by the root; then l² + m² + n² is not 1.
The cosine of the angle between two lines is the dot product of their direction ratios divided by the product of their lengths, taken without its sign.
Why it works
The direction ratios are vectors along the two lines, and for vectors cos θ = (a · b) ÷ (|a| |b|). A line has no arrow, so the bars pick the acute angle between the lines.
When to use it
The angle between two lines in space, and testing whether lines are perpendicular (the top is 0) or parallel (the ratios are in proportion).
How to use it
Read the direction ratios of each line (the numbers under x, y, z in the Cartesian form).
Work out a₁a₂ + b₁b₂ + c₁c₂ and drop its sign.
Divide by the two lengths, then take cos⁻¹ if the angle is wanted.
To remember: Dot the ratios, divide by their lengths.
Other forms
Special casea1a2+b1b2+c1c2=0When the lines are perpendicular (cos θ = 0).
To remember itParallel lines have ratios in proportion: a₁/a₂ = b₁/b₂ = c₁/c₂.
Worked examples
Story
Two cables run along 3î + 4ĵ and 4î − 3ĵ + 5k̂. What is the angle between them?
550∣12−12+0∣=0
cos θ = 0, so the cables are at right angles.
Answer: 0
Picture
Find the angle between the x-axis (direction ratios 1, 0, 0) and the line with direction ratios 1, 1, 0.
1×21=22
So the angle is 45°.
Answer: 0.7071067811865476
Direct
Find cos θ for lines with direction ratios 1, 2, 2 and 2, −1, 2.
3×3∣2−2+4∣=94
Answer: 0.4444444444444444
Reverse
For which k are the lines with direction ratios 1, k, 2 and 2, 1, −2 perpendicular?
Try it first, then show the working
Perpendicular lines need a₁a₂ + b₁b₂ + c₁c₂ = 0: 2 + k − 4 = 0, and therefore k = 2. Check:
1×2+2×1+2×(−2)=0
Answer: k = 2
Exam
Find the angle between the lines (x − 2)/2 = (y − 1)/5 = (z + 3)/(−3) and (x + 2)/(−1) = (y − 4)/8 = (z − 5)/4.
Try it first, then show the working
The direction ratios are 2, 5, −3 and −1, 8, 4, with lengths √38 and 9.
38×9∣−2+40−12∣=93826
So θ = cos⁻¹(26 ÷ (9√38)).
Answer: θ = cos⁻¹(26/(9√38))
Common mistake: Using the points on the lines instead of their direction ratios.