Coordinate Geometry
Geometry on the number plane — distance, midpoint, lines, circles, and the bridge between algebra and shape.
The Coordinate Plane
René Descartes’ key insight: every point in a plane can be described by two numbers — its horizontal position (x) and vertical position (y). This bridges geometry and algebra completely. Every geometric shape becomes an equation; every equation becomes a shape.
A point is written as an ordered pair (x, y).
Distance and Midpoint
Distance between two points (x₁, y₁) and (x₂, y₂):
d = √((x₂ − x₁)² + (y₂ − y₁)²)
Just Pythagoras applied to the horizontal and vertical separations.
Midpoint:
M = ((x₁ + x₂)/2, (y₁ + y₂)/2)
Average the coordinates. The midpoint is literally the mean of the two positions.
Lines
A straight line is the set of all points satisfying a linear equation.
Slope
The slope m measures steepness — rise over run:
m = (y₂ − y₁) / (x₂ − x₁)
- Positive slope: rises left to right
- Negative slope: falls left to right
- Zero slope: horizontal line
- Undefined slope: vertical line (x₂ = x₁, division by zero)
Forms of a line equation
Slope-intercept form: y = mx + b
- m = slope, b = y-intercept (where line crosses y-axis)
- Most useful for graphing and reading off slope directly
Point-slope form: y − y₁ = m(x − x₁)
- Most useful when you know a point and the slope
Standard form: ax + by = c (integers, a > 0)
- Most useful for systems of equations
Converting between forms:
y − 3 = 2(x − 1) (point-slope, point (1,3), slope 2)
y − 3 = 2x − 2
y = 2x + 1 (slope-intercept)
2x − y = −1 (standard)
Parallel and perpendicular lines
- Parallel lines: same slope, m₁ = m₂ (never intersect)
- Perpendicular lines: slopes are negative reciprocals, m₁ × m₂ = −1
Line with slope 3 → perpendicular slope = −1/3
Line with slope 2/3 → perpendicular slope = −3/2
Intersection of Lines
Two lines intersect at the point satisfying both equations simultaneously — solve the system:
y = 2x + 1
y = −x + 7
2x + 1 = −x + 7
3x = 6
x = 2, y = 5
Intersection: (2, 5)
Parallel lines: no intersection (same slope, different intercepts). Same line: infinitely many intersections (same slope, same intercept).
Circles
A circle is the set of all points at distance r from a centre (h, k):
(x − h)² + (y − k)² = r²
Standard form — centre (h, k), radius r. Read them off directly.
Expanded form (general form):
x² + y² + Dx + Ey + F = 0
To convert from general to standard, complete the square for x and y:
x² + y² − 4x + 6y − 3 = 0
(x² − 4x + 4) + (y² + 6y + 9) = 3 + 4 + 9
(x − 2)² + (y + 3)² = 16
Centre: (2, −3), radius: 4
Distance from a Point to a Line
The shortest distance from point (x₀, y₀) to line ax + by + c = 0:
d = |ax₀ + by₀ + c| / √(a² + b²)
Useful in geometry, optimisation, and machine learning (support vector machines find the line that maximises this distance to data points).
Conic Sections
All conic sections are intersections of a plane with a cone. In coordinate form:
Parabola: y = ax² + bx + c (or x = ay² + by + c for horizontal)
- Vertex form: y = a(x − h)² + k, vertex at (h, k)
Ellipse: (x − h)²/a² + (y − k)²/b² = 1
- a = semi-major axis, b = semi-minor axis
- When a = b: circle
Hyperbola: (x − h)²/a² − (y − k)²/b² = 1
- Two branches, opens left-right
- Asymptotes: y − k = ±(b/a)(x − h)
All four (circle, parabola, ellipse, hyperbola) come from the same general second-degree equation:
Ax² + Bxy + Cy² + Dx + Ey + F = 0
The discriminant B² − 4AC determines which:
- B² − 4AC < 0: ellipse (or circle if B = 0 and A = C)
- B² − 4AC = 0: parabola
- B² − 4AC > 0: hyperbola
Transformations in the Coordinate Plane
| Transformation | Rule |
|---|---|
| Translate by (a, b) | (x, y) → (x + a, y + b) |
| Reflect over x-axis | (x, y) → (x, −y) |
| Reflect over y-axis | (x, y) → (−x, y) |
| Reflect over y = x | (x, y) → (y, x) |
| Rotate 90° CCW | (x, y) → (−y, x) |
| Rotate 180° | (x, y) → (−x, −y) |
| Scale by factor k | (x, y) → (kx, ky) |
Rotation by arbitrary angle θ:
x' = x cos θ − y sin θ
y' = x sin θ + y cos θ
This is the rotation matrix from trigonometry — coordinate geometry and trig unify here.
The Gradient of a Curve
At a point on a curve, the gradient (slope of the tangent) is what calculus computes — the derivative. Coordinate geometry sets up the language: a tangent line at (x₀, y₀) has the form y − y₀ = m(x − x₀), where m is the derivative at that point.
This is the bridge: coordinate geometry gives the framework; calculus gives the tool to find slopes of curves, not just lines.
Why Coordinate Geometry Matters
Descartes’ invention turned geometry into algebra. Every geometric problem — distance, area, intersection, curvature — became a computational problem. This is why computers can do graphics: every shape is an equation, and equations are just arithmetic.
All of machine learning, computer vision, and data science lives in high-dimensional coordinate space. The intuitions from 2D coordinate geometry — distance, projection, orthogonality — generalise directly to 1000-dimensional feature spaces.