Euclid's Elements starts from five axioms and builds all of plane geometry with compass and straightedge. Two thousand years later, the axioms still work. The fifth one (the parallel postulate) is the only one anyone argues about.
The five axioms
Euclid's postulates define what you can do on a flat plane:
A straight line can be drawn between any two points.
A straight line can be extended indefinitely.
A circle can be drawn with any center and radius.
All right angles are equal.
Parallel postulate: Given a line and a point not on it, exactly one line through the point is parallel to the given line.
The first four feel obvious. The fifth is the interesting one: it's equivalent to saying the angles of a triangle sum to 180 degrees. Drop it, and you get non-Euclidean geometry (Chapter 5).
Compass and straightedge constructions
The only tools: an unmarked ruler (straightedge) and a compass. No measuring. You can construct midpoints, perpendiculars, angle bisectors, and regular polygons. Some things you cannot construct: trisecting an arbitrary angle, doubling a cube, squaring a circle. Those impossibilities took two millennia to prove.
Scheme
; Midpoint construction; Given two points, the midpoint is their average.; Compass-and-straightedge achieves this by intersecting; two circles of equal radius.
(define (midpoint x1 y1 x2 y2)
(list (/ (+ x1 x2) 2)
(/ (+ y1 y2) 2)))
(display "Midpoint of (0,0) and (6,4): ")
(display (midpoint 0064))
(newline)
; Distance between two points (Pythagorean theorem)
(define (distance x1 y1 x2 y2)
(sqrt (+ (* (- x2 x1) (- x2 x1))
(* (- y2 y1) (- y2 y1)))))
(display "Distance from (0,0) to (3,4): ")
(display (distance 0034))
(newline)
; Perpendicular bisector passes through the midpoint; and is perpendicular to the segment.
(display "Midpoint of (1,1) and (5,3): ")
(display (midpoint 1153))
Python
importmathdef midpoint(x1, y1, x2, y2):
return ((x1 + x2) / 2, (y1 + y2) / 2)
def distance(x1, y1, x2, y2):
returnmath.sqrt((x2 - x1)**2 + (y2 - y1)**2)
print(f"Midpoint of (0,0) and (6,4): {midpoint(0, 0, 6, 4)}")
print(f"Distance from (0,0) to (3,4): {distance(0, 0, 3, 4)}")
print(f"Midpoint of (1,1) and (5,3): {midpoint(1, 1, 5, 3)}")
Congruence and similarity
Congruent triangles have the same shape and size. Tests: SSS (three sides), SAS (two sides and included angle), ASA (two angles and included side). Similar triangles have the same shape but possibly different size. Test: AA (two angles match). Similar triangles give you proportional sides, which is the engine behind trigonometry.
Scheme
; Triangle similarity: if two angles match,; the triangles are similar and sides are proportional.; Triangle 1: sides 3, 4, 5 (right triangle); Triangle 2: sides 6, 8, 10 (scaled by 2)
(define (similar? a1 b1 c1 a2 b2 c2)
; Check if ratios of sorted sides are equal
(let ((s1 (sort (list a1 b1 c1) <))
(s2 (sort (list a2 b2 c2) <)))
(let ((r1 (/ (cadr s1) (car s1)))
(r2 (/ (cadr s2) (car s2)))
(r3 (/ (caddr s1) (car s1)))
(r4 (/ (caddr s2) (car s2))))
(and (= r1 r2) (= r3 r4)))))
(display "3-4-5 similar to 6-8-10? ")
(display (similar? 3456810))
(newline)
(display "3-4-5 similar to 5-12-13? ")
(display (similar? 34551213))
The Pythagorean theorem
In a right triangle with legs a, b and hypotenuse c: a² + b² = c². The diagram shows it literally: the area of the square on the hypotenuse equals the sum of the areas of the squares on the legs.
Scheme
; Pythagorean theorem: a^2 + b^2 = c^2
(define (hypotenuse a b)
(sqrt (+ (* a a) (* b b))))
(display "3-4-? triangle: c = ")
(display (hypotenuse 34))
(newline)
(display "5-12-? triangle: c = ")
(display (hypotenuse 512))
(newline)
(display "8-15-? triangle: c = ")
(display (hypotenuse 815))
(newline)
; Verify: is 3-4-5 a right triangle?
(define (right-triangle? a b c)
(= (* c c) (+ (* a a) (* b b))))
(display "Is 3-4-5 a right triangle? ")
(display (right-triangle? 345))
(newline)
(display "Is 3-4-6 a right triangle? ")
(display (right-triangle? 346))
Python
importmathdef hypotenuse(a, b):
returnmath.sqrt(a**2 + b**2)
print(f"3-4-? triangle: c = {hypotenuse(3, 4)}")
print(f"5-12-? triangle: c = {hypotenuse(5, 12)}")
print(f"8-15-? triangle: c = {hypotenuse(8, 15)}")
def is_right_triangle(a, b, c):
return c**2 == a**2 + b**2print(f"Is 3-4-5 a right triangle? {is_right_triangle(3, 4, 5)}")
print(f"Is 3-4-6 a right triangle? {is_right_triangle(3, 4, 6)}")
Neighbors
Cross-references
🔑 Logic Ch.1 — axiomatic reasoning: Euclid's method is the prototype