Coordinate Geometry
2705 words
14 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Coordinate Geometry ## ๐ฏ Learning Objectives By the end of this topic, you will be able to: 1. **Locate** points in the rectangular (Cartesian) coordinate system 2.

Coordinate Geometry
๐ฏ Learning Objectives
By the end of this topic, you will be able to:
- Locate points in the rectangular (Cartesian) coordinate system
- Compute the distance between any two points using the distance formula
- Apply the section formula to find a point dividing a line segment in a given ratio
- Calculate the area of a triangle given three vertices
- Determine whether three points are collinear
๐ Prerequisites
- Sets and Set Operations โ number systems, R2 as a set of ordered pairs
- Basic arithmetic โ squares, square roots, absolute value
- Algebra โ solving linear equations
๐ Core Content
1.1 The Cartesian Coordinate System
1.1.1 Intuition: The Grid of Mathematics
Imagine a city laid out on a perfect grid. Every location can be described by two numbers: how far east (x-coordinate) and how far north (y-coordinate) it is from a central reference point (the origin). This is the Cartesian coordinate system, named after Renรฉ Descartes who famously developed the idea while watching a fly crawl on his ceiling!
The plane is divided into 4 quadrants:
| Quadrant | X-sign | Y-sign | Example |
|---|---|---|---|
| I | + | + | (3,2) |
| II | โ | + | (โ4,1) |
| III | โ | โ | (โ2,โ5) |
| IV | + | โ | (3,โ1) |
The point where both axes meet is the origin O=(0,0).
๐ก Why this matters: Every visualization in data science (scatter plots, line charts, histograms) uses the Cartesian coordinate system. Understanding coordinates is the first step to understanding any graph. (Diagram) Key convention: The ordered pair (x,y) always lists the horizontal (x) coordinate first, then the vertical (y) coordinate. (3,5) means "3 units right, 5 units up."
1.1.2 Worked Examples
Example 1.1: Plot the points A=(2,3), B=(โ1,4), C=(โ3,โ2), D=(4,โ1) and state which quadrant each lies in.
Solution:
A(2,3): 2 right, 3 up โ Quadrant I
B(โ1,4): 1 left, 4 up โ Quadrant II
C(โ3,โ2): 3 left, 2 down โ Quadrant III
D(4,โ1): 4 right, 1 down โ Quadrant IV
1.2 The Distance Formula
1.2.1 Intuition: Measuring Between Points
If you walk 3 blocks east and then 4 blocks north, how far are you from your starting point (as the crow flies)? The answer uses the Pythagorean theorem: 32+42โ=25โ=5 blocks. The distance formula is just the Pythagorean theorem applied to the coordinate grid.
1.2.2 Formula
The distance d between two points P1โ=(x1โ,y1โ) and P2โ=(x2โ,y2โ) is:
Recipe:
- Subtract the x-coordinates: ฮx=x2โโx1โ
- Subtract the y-coordinates: ฮy=y2โโy1โ
- Square both differences
- Add the squares
- Take the square root
1.2.3 Worked Examples
Example 2.1 (Easy): Find the distance between (1,2) and (4,6).
Step 1: ฮx=4โ1=3, ฮy=6โ2=4
Step 2: d=32+42โ=9+16โ=25โ=5
Example 2.2 (Medium): Find the distance between (โ3,5) and (2,โ7).
Step 1: ฮx=2โ(โ3)=5, ฮy=โ7โ5=โ12
Step 2: d=52+(โ12)2โ=25+144โ=169โ=13
Example 2.3 (Exam-style): Show that the triangle with vertices A(1,1), B(4,5), C(7,1) is isosceles.
Step 1: AB=(4โ1)2+(5โ1)2โ=32+42โ=5
Step 2: BC=(7โ4)2+(1โ5)2โ=32+(โ4)2โ=5
Step 3: AC=(7โ1)2+(1โ1)2โ=62+02โ=6
Two sides (AB and BC) are equal โ isosceles triangle.
1.3 Section Formula
1.3.1 Intuition: Splitting a Segment
If you have a rope from point A to point B and you want to cut it at a point P that divides it in the ratio m:n (say 2:3), where is P? The section formula gives the coordinates of P using a weighted average of A and B.
1.3.2 Formula
If P divides the line segment AB (from A(x1โ,y1โ) to B(x2โ,y2โ)) in the ratio m:n (i.e., AP:PB=m:n), then:
P=(2x1โ+x2โโ,ย 2y1โ+y2โโ)๐ก Memory aid: The coordinates of P are the weighted average of A and B with weights n and m respectively โ the weight for B is m (the ratio of AP) and the weight for A is n (the ratio of PB). Special case โ midpoint: When m=n=1, P is the midpoint:
1.3.3 Worked Examples
Example 3.1 (Easy): Find the midpoint of (2,3) and (6,9).
Step 1: x=22+6โ=4, y=23+9โ=6
Example 3.2 (Medium): Find the point P that divides the segment from A(1,2) to B(7,8) in the ratio 2:1.
Step 1: m=2, n=1 (ratio AP:PB=2:1)
Step 2: x=2+12(7)+1(1)โ=314+1โ=5
Step 3: y=2+12(8)+1(2)โ=316+2โ=6
Check: AP=(5โ1)2+(6โ2)2โ=16+16โ=32โ=42โ
PB=(7โ5)2+(8โ6)2โ=4+4โ=8โ=22โ
AP:PB=42โ:22โ=2:1 โ
Example 3.3 (Hard โ external division): Find the point Q that divides AB externally in the ratio 3:1 where A(2,3) and B(4,5).
For external division, the formula becomes x=mโnmx2โโnx1โโ:
Step 1: x=3โ13(4)โ1(2)โ=212โ2โ=5
Step 2: y=3โ13(5)โ1(3)โ=215โ3โ=6
1.4 Area of a Triangle
1.4.1 Intuition
Given three points on the coordinate plane, how do you find the area of the triangle they form without measuring side lengths? The formula uses the shoelace pattern โ multiply and subtract coordinates in a cycle.
1.4.2 Formula
Area of triangle with vertices A(x1โ,y1โ), B(x2โ,y2โ), C(x3โ,y3โ):
Shoelace method:
1.4.3 Collinearity Check
Three points are collinear (lie on the same straight line) if and only if the area of the triangle they form is 0:
1.4.4 Worked Examples
Example 4.1 (Easy): Find the area of triangle with vertices (0,0), (4,0), (0,3).
Step 1: x1โ=0,y1โ=0, x2โ=4,y2โ=0, x3โ=0,y3โ=3
Step 2: Area=21โโฃ0(0โ3)+4(3โ0)+0(0โ0)โฃ=21โโฃ0+12+0โฃ=6
(Check: base=4, height=3, area = 21โร4ร3=6 โ)
Example 4.2 (Medium): Find the area of triangle with vertices A(1,2), B(5,3), C(3,6).
Step 1 โ Using the formula:
Area=21โโฃ1(3โ6)+5(6โ2)+3(2โ3)โฃ
=21โโฃ1(โ3)+5(4)+3(โ1)โฃ
=21โโฃโ3+20โ3โฃ=21โโฃ14โฃ=7
Step 2 โ Using shoelace:
x1โy2โ+x2โy3โ+x3โy1โ=1(3)+5(6)+3(2)=3+30+6=39
y1โx2โ+y2โx3โ+y3โx1โ=2(5)+3(3)+6(1)=10+9+6=25
Area=21โโฃ39โ25โฃ=21โโฃ14โฃ=7 โ
Example 4.3 (Exam-style): Check whether points (1,2), (3,5), (5,8) are collinear.
Step 1: Compute area: 21โโฃ1(5โ8)+3(8โ2)+5(2โ5)โฃ
=21โโฃ1(โ3)+3(6)+5(โ3)โฃ
=21โโฃโ3+18โ15โฃ=21โโฃ0โฃ=0
1.5 Why This Matters
Coordinate geometry is the bridge between algebra and geometry. It allows us to:
- Solve geometric problems using algebraic methods
- Model real-world data as points on a plane
- Fit lines and curves to data (regression analysis in statistics)
- Visualize functions and their properties In data science, everything starts with coordinate geometry: scatter plots, the data space where each point is an observation with features as coordinates.
๐ Key Formulas โ Summary Table
| Concept | Formula | When to Use |
|---|---|---|
| Distance | d=(x2โโx1โ)2+(y2โโy1โ)2โ | Between any two points |
| Midpoint | (2x1โ+x2โโ,ย 2y1โ+y2โโ) | Center of a segment |
| Section (internal) | (m+nmx2โ+nx1โโ,ย m+nmy2โ+ny1โโ) | Point dividing segment in ratio m:n |
| Triangle area | $\frac{1}{2}\ | x_1(y_2-y_3) + x_2(y_3-y_1) + x_3(y_1-y_2)\ |
| Collinearity | x1โ(y2โโy3โ)+x2โ(y3โโy1โ)+x3โ(y1โโy2โ)=0 | Checking if 3 points are collinear |
| Shoelace | $\frac{1}{2}\ | (x_1y_2 + x_2y_3 + x_3y_1) - (y_1x_2 + y_2x_3 + y_3x_1)\ |
โ ๏ธ Common Pitfalls
Pitfall 1: Forgetting to Take the Absolute Value in Area
Mistake: Reporting a negative area.
Why: The formula 21โ[x1โ(y2โโy3โ)+โฆ] can be negative depending on vertex order (clockwise vs. counterclockwise). Area must be positive.
Correct: Always take the absolute value: Area=21โโฃโฆโฃ.
Pitfall 2: Reversing the Section Formula Ratio
Mistake: Using m and n in wrong order.
Correct: If AP:PB=m:n, then x=m+nmx2โ+nx1โโ. The coordinate of B (the far endpoint from A) gets the m weight.
Memory aid: The point you're going towards (B) gets the first ratio part (m).
Pitfall 3: Confusing Collinearity with Parallelism
Mistake: Thinking collinear means parallel lines.
Correct: Collinear means points lie on the same line. Three parallel lines have points on different lines that are parallel โ these are NOT collinear.
Pitfall 4: Forgetting the Square Root in Distance
Mistake: Computing d=(x2โโx1โ)2+(y2โโy1โ)2 without the square root.
Correct: Distance is the square root of the sum of squared differences.
๐ Practice Questions
Q1: Find the distance between (โ2,3) and (4,โ5).Strategy Hint: Apply the distance formula directly.Step 1: ฮx=4โ(โ2)=6, ฮy=โ5โ3=โ8 Step 2: d=62+(โ8)2โ=36+64โ=100โ=1010โ Q2: Find the midpoint of (3,โ2) and (โ5,8).Strategy Hint: Average the x-coordinates and y-coordinates.Step 1: x=23+(โ5)โ=2โ2โ=โ1 Step 2: y=2โ2+8โ=26โ=3(โ1,3)โ Q3: In what ratio does the point P(3,5) divide the segment joining A(1,3) and B(5,7)?Strategy Hint: Use the section formula and solve for m:n.Step 1: x=m+nm(5)+n(1)โ=3โน5m+n=3m+3nโน2m=2nโนm=nSo the ratio is 1:1 โ P is the midpoint. Verify: 21+5โ=3, 23+7โ=5 โ1:1โ Q4: Find the area of triangle with vertices (2,3), (5,7), (8,3).Strategy Hint: Use the formula with absolute value.Step 1: Area=21โโฃ2(7โ3)+5(3โ3)+8(3โ7)โฃ =21โโฃ2(4)+5(0)+8(โ4)โฃ =21โโฃ8+0โ32โฃ=21โโฃโ24โฃ=1212ย squareย unitsโ Q5: Are the points (0,0), (2,4), (4,8) collinear?Strategy Hint: Compute the area โ it should be 0 if collinear.Step 1: Area=21โโฃ0(4โ8)+2(8โ0)+4(0โ4)โฃ =21โโฃ0โ (โ4)+16+4(โ4)โฃ=21โโฃ0+16โ16โฃ=0Yes,ย collinearโ Q6: Find the point on the y-axis that is equidistant from (2,3) and (4,7).Strategy Hint: On the y-axis, x=0. So the point is (0,y). Use distance formula.Step 1: Distance from (0,y) to (2,3) = distance to (4,7) (0โ2)2+(yโ3)2โ=(0โ4)2+(yโ7)2โStep 2: Square both sides: 4+(yโ3)2=16+(yโ7)2 4+y2โ6y+9=16+y2โ14y+49 13โ6y=65โ14y 8y=52 y=6.5(0,6.5)โ Q7: Find the area of quadrilateral with vertices (0,0), (4,0), (6,3), (2,3).Strategy Hint: Divide into two triangles or use polygon area formula.Step 1: Split into โณABC and โณACD (with A(0,0), B(4,0), C(6,3), D(2,3)). Step 2: Area โณABC=21โโฃ0(0โ3)+4(3โ0)+6(0โ0)โฃ=21โโฃ12โฃ=6 Step 3: Area โณACD=21โโฃ0(3โ3)+6(3โ0)+2(0โ3)โฃ=21โโฃ18โ6โฃ=6 Step 4: Total = 6+6=1212ย squareย unitsโ Q8: For what value of k are (2,3), (5,k), (8,9) collinear?Strategy Hint: Set the area formula equal to 0 and solve for k.Step 1: 21โโฃ2(kโ9)+5(9โ3)+8(3โk)โฃ=0 โฃ2kโ18+30+24โ8kโฃ=0 โฃโ6k+36โฃ=0 โ6k+36=0โนk=6k=6โ Q9: Find the centroid of the triangle with vertices (2,4), (6,8), (10,3).Strategy Hint: Centroid = average of coordinates: (3x1โ+x2โ+x3โโ,3y1โ+y2โ+y3โโ).Step 1: x=32+6+10โ=318โ=6 Step 2: y=34+8+3โ=315โ=5(6,5)โ Q10: Determine if points (1,1), (2,4), (3,9) are collinear.Strategy Hint: Compute area โ a non-zero area means they form a triangle.Step 1: Area=21โโฃ1(4โ9)+2(9โ1)+3(1โ4)โฃ =21โโฃโ5+16โ9โฃ=21โโฃ2โฃ=1Area = 1 (not 0), so they are NOT collinear (they lie on a parabola y=x2).Notย collinearโ Q11: The vertices of a triangle are (3,4), (7,2), (5,6). Find its area. What type of triangle is it?Strategy Hint: Compute area, then side lengths to classify.Step 1: Area=21โโฃ3(2โ6)+7(6โ4)+5(4โ2)โฃ =21โโฃ3(โ4)+7(2)+5(2)โฃ=21โโฃโ12+14+10โฃ=21โโฃ12โฃ=6Step 2: Side lengths: AB=(7โ3)2+(2โ4)2โ=16+4โ=20โ BC=(5โ7)2+(6โ2)2โ=4+16โ=20โ AC=(5โ3)2+(6โ4)2โ=4+4โ=8โAB=BC โ isosceles triangle.Area=6,ย isoscelesโ Q12: A point P divides the segment joining A(2,3) and B(6,7) in the ratio 3:2 externally. Find P.Strategy Hint: External division: x=mโnmx2โโnx1โโ.Step 1: m=3, n=2, A(2,3), B(6,7) Step 2: x=3โ23(6)โ2(2)โ=118โ4โ=14 Step 3: y=3โ23(7)โ2(3)โ=121โ6โ=15P=(14,15)โ
๐ Cross-References
- Next topic: Straight Lines โ slope, intercepts, equations of lines
- Related: Quadratic Functions โ parabolas as curves
- Across courses: BSMA1002 Stats 1 (scatter plots, linear regression); BSMA1003 Maths 2 (vectors in coordinate plane) Join Discord Previous1.3 FunctionsNext2.2 Straight Lines