Congruence and Similarity
Two figures are congruent when they have the same shape and the same size, and similar when they have the same shape but possibly different sizes. Similar triangles are one of the most practical ideas in geometry: they measure heights from shadows, they scale maps, and they are exactly how a camera, or a 3D game, turns the world into a picture.
Congruence
Figures are congruent () if one can be moved onto the other by a rigid motion: a translation, rotation or reflection (Translations, Reflections and Rotations). Then all matching sides and all matching angles are equal, a fact often abbreviated CPCTC: corresponding parts of congruent triangles are congruent.
You do not need to check all six parts of two triangles. Any of these is enough:
| Test | What must match |
|---|---|
| SSS | all three sides |
| SAS | two sides and the angle between them |
| ASA | two angles and the side between them |
| AAS | two angles and a side not between them |
| HL | in right triangles: hypotenuse and one leg |
Two combinations do not work: AAA (same angles, any size: that is similarity) and SSA (two sides and a non-included angle), which can fit two different triangles. HL is the exception to SSA, because the given angle is 90°.
With coordinates, SSS is easy to test. Using squared side lengths keeps everything in exact integers:
def sides2(tri):
(ax, ay), (bx, by), (cx, cy) = tri
d2 = lambda px, py, qx, qy: (px - qx) ** 2 + (py - qy) ** 2
return sorted([d2(ax, ay, bx, by), d2(bx, by, cx, cy), d2(ax, ay, cx, cy)])
T1 = [(0, 0), (4, 0), (1, 3)]
T2 = [(5, 5), (5, 9), (2, 6)] # T1 moved and turned
T3 = [(0, 0), (8, 0), (2, 6)] # T1 enlarged
print("T1:", sides2(T1), " T2:", sides2(T2), " T3:", sides2(T3))
print("T1 ≅ T2 (SSS)?", sides2(T1) == sides2(T2))
ratios = [b / a for a, b in zip(sides2(T1), sides2(T3))]
print("squared-length ratios T3/T1:", ratios, "→ scale factor", ratios[0] ** 0.5)T1: [10, 16, 18] T2: [10, 16, 18] T3: [40, 64, 72]
T1 ≅ T2 (SSS)? True
squared-length ratios T3/T1: [4.0, 4.0, 4.0] → scale factor 2.0
Why SSA fails
Fix angle , side next to it, and side opposite it. The side of length 6 can swing to meet the base line in two places, giving two different triangles. The law of sines finds both:
import math
A, b, a = 30, 10, 6
sinB = b * math.sin(math.radians(A)) / a
for B in [math.degrees(math.asin(sinB)), 180 - math.degrees(math.asin(sinB))]:
C = 180 - A - B
c = a * math.sin(math.radians(C)) / math.sin(math.radians(A))
print(f"B = {B:6.2f}° C = {C:6.2f}° c = {c:.3f}")B = 56.44° C = 93.56° c = 11.977
B = 123.56° C = 26.44° c = 5.344
Same two sides, same angle, yet the third sides are 11.98 and 5.34: SSA does not pin the triangle down.
Similarity
Similar figures () have equal angles and proportional sides. The ratio of matching lengths is the scale factor . Tests for triangles:
| Test | Condition |
|---|---|
| AA | two angles equal (the third then matches automatically) |
| SSS | all three side ratios equal |
| SAS | two side ratios equal and the angle between them equal |
If the scale factor is , then perimeters scale by , areas by and volumes by .
Side-splitter theorem. A line parallel to one side of a triangle cuts the other two sides in the same ratio. If with on and on , then triangles and are similar (AA, using corresponding angles), and .
Similar triangles in perspective
A pinhole camera, your eye, and the projection in every 3D game all work by similar triangles. A point at height and distance in front of the camera lands on the image plane at distance (the focal length) at height
because the triangle (camera, point, its foot on the axis) is similar to the triangle (camera, image point, image centre). Twice as far away means half as tall on screen:
f = 800 # focal length in pixels
height = 1.8 # a 1.8 m tall person
for z in [5, 10, 20, 40]:
print(f"at {z:2} m: {f * height / z:6.1f} px tall")
# The same rule in reverse: estimate distance from apparent size
seen = 48
print("a person 48 px tall is about", f * height / seen, "m away")at 5 m: 288.0 px tall
at 10 m: 144.0 px tall
at 20 m: 72.0 px tall
at 40 m: 36.0 px tall
a person 48 px tall is about 30.0 m away
Dividing by is the perspective divide that GPUs do after the projection matrix. The full story is in Perspective Rendering and Projection. Computer-vision code runs the formula backwards to estimate distances from known object sizes.
Exercises
Exercise 1: Name the test
Which congruence test applies? (a) Two triangles share two side lengths and the angle between them. (b) They share two angles and a side that is not between them. (c) They share all three angles.
Answer
(a) SAS, (b) AAS, (c) none: equal angles only prove similarity.
Solution
SAS needs the angle to be between the two sides, as in (a). In (b) the side is not between the angles, which is AAS. In (c) AAA fixes the shape but not the size, so the triangles are similar but maybe not congruent.
Exercise 2: A tree's shadow
A 1.8 m tall person casts a 2.4 m shadow. At the same moment, a tree casts a 16 m shadow. How tall is the tree?
Answer
12 m
Solution
The sun's rays are parallel, so the two right triangles have equal angles (AA) and are similar:
Exercise 3: Area of a scaled triangle
Two similar triangles have matching sides 4 cm and 6 cm. The smaller one has area . What is the area of the larger?
Answer
Solution
Exercise 4: Side splitter
In , is on and is on with . If , and , find .
Answer
Solution
Exercise 5: Shrinking on screen
With px, how tall on screen is a 2.5 m door at 20 m? At what distance would it be 25 px tall?
Answer
100 px; at 80 m.
Solution
f, h = 800, 2.5
print(f * h / 20, f * h / 25)100.0 80.0
Test yourself
Which of these is NOT a valid congruence test for triangles?
- SAS
- ASA
- SSA
- SSS
Two similar solids have a scale factor of 3. Their volumes are in what ratio?
- 1 : 3
- 1 : 27
- 1 : 9
- 1 : 6
In a pinhole camera model, an object moves from 10 m to 30 m away. Its image height…
- is divided by 3
- is multiplied by 3
- is divided by 9
- does not change