AdvancedQuantitative Aptitude · Lesson 30 of 38 · Updated ·
Coordinate Geometry — Distance, Section Formula, Slope, Lines and Area
Coordinate geometry places shapes on a grid so that geometry becomes arithmetic. A point is written (x, y): x is how far right of the origin it is, and y is how far up. The origin is (0, 0), where the two axes cross.
AMCAT, CoCubes-style tests and many company papers include 1–3 coordinate questions. They are fast marks if you know about eight formulas — and each formula has a simple picture behind it.
1. Distance between two points
Distance between (x₁, y₁) and (x₂, y₂) = √[(x₂ − x₁)² + (y₂ − y₁)²]
Why: go across from A, then up to B. The horizontal and vertical moves are the two legs of a right triangle, and the distance AB is its hypotenuse. This is just Pythagoras.
Example 1
Find the distance between A(1, 2) and B(7, 10).
√(6² + 8²) = √100 = 10. (A 6-8-10 triple.)
The distance of (x, y) from the origin is √(x² + y²): for (−3, 4) it is 5.
2. Midpoint and section formula
The midpoint of (x₁, y₁) and (x₂, y₂) is the average of each coordinate:
Midpoint = ((x₁ + x₂)/2, (y₁ + y₂)/2)
For (2, 5) and (8, −1): midpoint = (5, 2).
A point P that divides AB internally in the ratio m : n (AP : PB = m : n) is:
P = ((m·x₂ + n·x₁)/(m + n), (m·y₂ + n·y₁)/(m + n))
Why: P is m/(m + n) of the way from A to B. Each coordinate moves that fraction of the way. Notice the "cross" pattern: m goes with B's coordinates, n with A's.
Example 2
Find the point dividing A(2, 3) and B(8, 9) in the ratio 1 : 2.
x = (1 × 8 + 2 × 2)/3 = 12/3 = 4. y = (1 × 9 + 2 × 3)/3 = 15/3 = 5. P = (4, 5).
Check with the "fraction of the way" idea: P is 1/3 of the way from A to B. From x = 2 to 8 is 6, and a third of that is 2: x = 4. ✓
Centroid (where the medians of a triangle meet) = the average of the three corners. For (1, 2), (4, 6), (7, 1): ((1 + 4 + 7)/3, (2 + 6 + 1)/3) = (4, 3).
Fourth corner of a parallelogram. The diagonals of a parallelogram cut each other in half, so for ABCD, A + C = B + D. With A(1, 2), B(4, 3), C(6, 6): D = A + C − B = (3, 5).
3. Slope
The slope (or gradient) m measures steepness: how much y rises for each 1 step in x.
m = (y₂ − y₁)/(x₂ − x₁)
Through (1, 2) and (4, 11): m = 9/3 = 3.
| Slope | The line … |
|---|---|
| positive | rises from left to right |
| negative | falls from left to right |
| 0 | is horizontal |
| undefined | is vertical (x₂ = x₁) |
Parallel lines have equal slopes. Perpendicular lines have slopes whose product is −1 (m₁ × m₂ = −1), for example 2 and −1/2.
4. Equations of a line
| Form | Use when you know |
|---|---|
| y = mx + c | slope m and y-intercept c |
| y − y₁ = m(x − x₁) | slope and one point |
| x/a + y/b = 1 | the x-intercept a and y-intercept b |
| ax + by + c = 0 | general form; slope = −a/b |
Example 3
Find the line through (1, 2) and (4, 11).
Slope = 3. y − 2 = 3(x − 1) → y = 3x − 1. Check with (4, 11): 3 × 4 − 1 = 11. ✓
Example 4
Find the line through (2, 3) that is perpendicular to y = 2x + 5.
Perpendicular slope = −1/2. y − 3 = −½(x − 2) → y = −x/2 + 4.
Example 5 (intercepts and area)
Find the area of the triangle formed by 2x + 3y = 12 and the two axes.
Put y = 0: x = 6. Put x = 0: y = 4. The triangle has legs 6 and 4: area = ½ × 6 × 4 = 12.
Intersection of two lines: solve them together. x + y = 7 and 2x − y = 2 → add: 3x = 9 → x = 3, y = 4. They meet at (3, 4).
5. Area of a triangle from its corners
Area = ½ |x₁(y₂ − y₃) + x₂(y₃ − y₁) + x₃(y₁ − y₂)|
The bars | | mean "take the positive value".
Example 6
Find the area of the triangle with corners (1, 1), (4, 5) and (7, 1).
½ |1(5 − 1) + 4(1 − 1) + 7(1 − 5)| = ½ |4 + 0 − 28| = ½ × 24 = 12.
Check: base from (1, 1) to (7, 1) is 6, height up to (4, 5) is 4 → ½ × 6 × 4 = 12. ✓
Collinear points (on one straight line) make a "triangle" of area 0.
Example 7 (Infosys style)
For what value of k are (1, 2), (3, k) and (5, 10) collinear?
The middle point must be on the line through the other two. Slope from (1, 2) to (5, 10) = 2. From (1, 2) to (3, k): (k − 2)/2 = 2 → k = 6. (The area formula gives the same answer.)
6. Distance from a point to a line
Distance from (x₁, y₁) to ax + by + c = 0 = |ax₁ + by₁ + c| / √(a² + b²)
From (3, 4) to 3x + 4y − 5 = 0: |9 + 16 − 5| / 5 = 4.
Between parallel lines ax + by + c₁ = 0 and ax + by + c₂ = 0: |c₁ − c₂| / √(a² + b²). For 3x + 4y = 5 and 3x + 4y = 15: 10/5 = 2.
Common mistakes
- Swapping m and n in the section formula. m multiplies the far point B.
- Forgetting the square root in the distance formula, or squaring a negative difference wrongly ((−3)² = 9).
- Writing the slope as (x₂ − x₁)/(y₂ − y₁). It is rise over run: y on top.
- Thinking perpendicular slopes are equal with opposite signs. They multiply to −1.
- Dropping the ½ or the absolute value in the area formula.
Quick recap
- Distance = √(Δx² + Δy²). Midpoint = averages. Section m : n = (mx₂ + nx₁)/(m + n).
- Centroid = average of the three corners.
- Slope = Δy/Δx. Parallel: equal slopes. Perpendicular: product −1.
- y = mx + c; y − y₁ = m(x − x₁); x/a + y/b = 1; slope of ax + by + c = 0 is −a/b.
- Triangle area = ½|x₁(y₂ − y₃) + x₂(y₃ − y₁) + x₃(y₁ − y₂)|; 0 means collinear.
- Point to line = |ax₁ + by₁ + c|/√(a² + b²).