Coordinate Geometry

Chapter 7 · Mathematics · Class 10 30 min read

Why This Matters

Imagine a town B. It is 36 km east of town A and 15 km north of it. How far apart are the two towns if you go in a straight line? Could you find this without dragging a measuring tape across the fields? Here is another one. A phone company wants to put a tower on the road from A to B. The tower must sit twice as far from B as from A. Where exactly on the map does it go?

These are not just puzzles on paper. Think about how a map works. Every place gets a pair of numbers (x, y). Once you do that, questions about distance (how far apart) and position (where something is) turn into simple arithmetic. That is the whole power of coordinate geometry. It lets you study shapes and points using algebra. You don’t need a protractor or a ruler. You just need the coordinates and a formula.

In this chapter you’ll build two tools. The first is the distance formula. It tells you how far apart two points are, using only their coordinates. The second is the section formula. It tells you the coordinates of a point that splits a line segment in a given ratio. We won’t just hand these formulas to you. We will prove both of them, starting from geometry you already know. With these two tools you can check whether three points lie on one line, whether four points form a square, and where exactly a point cuts a segment.

The Big Idea

Once you give each point coordinates (x, y), geometry becomes algebra. To find the distance between two points, draw a right triangle. Its two short sides are the gap in the x-values and the gap in the y-values. The distance is the longest side (the hypotenuse). So d = √[(x₂ − x₁)² + (y₂ − y₁)²], straight from the Pythagoras theorem. For the section formula, take a point P that splits the segment from A to B in the ratio m : n. Its coordinates are a kind of weighted average of A’s and B’s: ((mx₂ + nx₁)/(m + n), (my₂ + ny₁)/(m + n)). The midpoint is just the special case where m = n. Then it is the plain average.

Let’s Break It Down

The coordinate plane — where every point gets a name

Everything in this chapter sits on the coordinate plane. This is just two number lines that cross each other at right angles. The horizontal one is the x-axis. The vertical one is the y-axis. They meet at a point called the origin O, which is the point (0, 0). Now every point gets a name: an ordered pair (x, y). The first number tells you how far to go across (left or right along x). The second number tells you how far to go up or down (along y). For example, to plot the point (3, 2), you go 3 steps right, then 2 steps up.

The two axes cut the plane into four parts called quadrants. We number them 1, 2, 3, 4, going anticlockwise and starting from the top-right. Each quadrant has its own pattern of plus and minus signs. This is a handy way to catch mistakes. If your answer puts a point in the wrong quadrant, you know something has gone wrong. Figure 7.1 below shows the axes, the four quadrants with their sign patterns, and how the point P(3, 2) is plotted.

The coordinate plane. The x-axis is horizontal and the y-axis is vertical, crossing at the origin O. The four quadrants are labelled: Quadrant I top right with signs plus plus, Quadrant II top left minus plus, Quadrant III bottom left minus minus, Quadrant IV bottom right plus minus. The point P at 3 comma 2 is plotted by going 3 units across the x-axis then 2 units up the y-axis.
Figure 7.1 — The coordinate plane. The horizontal x-axis and the vertical y-axis cross at the origin O, which is (0, 0). The two axes split the plane into four quadrants, numbered anticlockwise from the top-right: Quadrant I (+, +) top-right, Quadrant II (−, +) top-left, Quadrant III (−, −) bottom-left, Quadrant IV (+, −) bottom-right — each shows its own pattern of plus and minus signs. The red point P(3, 2) is plotted by going 3 units across to the right along the x-axis (the dashed 3 across (x) line), then 2 units up parallel to the y-axis (the dashed 2 up (y) line).

Distances along an axis — the easy warm-up

Before we get to the full formula, let’s look at the easiest case. Suppose two points both lie on the x-axis, like A(4, 0) and B(6, 0). The distance between them is just the gap in their x-values: AB = 6 − 4 = 2 units. The same idea works on the y-axis. Take C(0, 3) and D(0, 8). The distance is CD = 8 − 3 = 5 units.

So when two points are on the same axis, distance is simply a subtraction. The real question is what to do when the two points are sitting anywhere in the plane, not on the same line. That is where the Pythagoras theorem helps us.

Deriving the distance formula

The whole formula leans on one rule you’ve met before. Let’s quickly refresh it before we put it to work.

Take any two points P(x₁, y₁) and Q(x₂, y₂). Draw a straight line down from P to the x-axis, and another straight line down from Q to the x-axis. Now draw a flat horizontal line starting at P. Extend it until it hits the vertical line coming down from Q. Call that meeting point T. Look at the triangle PTQ. The corner at T is a perfect right angle (90°), so PTQ is a right-angled triangle. Figure 7.2 below shows this triangle, with the two legs and the hypotenuse d labelled.

Points P with coordinates x1, y1 and Q with coordinates x2, y2 joined by a slanted line of length d. A horizontal dashed leg from P of length x2 minus x1 and a vertical dashed leg up to Q of length y2 minus y1 meet at a right angle at point T, forming a right triangle.
Figure 7.2 — Deriving the distance formula from a right triangle. The red slanted line joins P(x₁, y₁) (lower-left) to Q(x₂, y₂) (upper-right); its length is the distance d we want. A horizontal dashed leg runs from P across to point T, and a vertical dashed leg runs from T up to Q; the small square at T marks the 90° right angle. The horizontal leg PT measures the gap in the x-values, x₂ − x₁, and the vertical leg QT measures the gap in the y-values, y₂ − y₁. By the Pythagoras theorem d² = (x₂ − x₁)² + (y₂ − y₁)², so d = √[(x₂ − x₁)² + (y₂ − y₁)²].

The two short sides (the legs) of this triangle are easy to read off the picture:

  • The flat side PT = x₂ − x₁ (the gap between the x-coordinates).
  • The upright side QT = y₂ − y₁ (the gap between the y-coordinates).

The Pythagoras theorem says: in a right triangle, (longest side)² = (one leg)² + (other leg)². Here PQ is the longest side. So:

PQ² = PT² + QT² = (x₂ − x₁)² + (y₂ − y₁)²

A distance can never be negative, so we take only the positive square root:

PQ = √[(x₂ − x₁)² + (y₂ − y₁)²]

That is the distance formula. Two things worth noticing:

  • Each gap gets squared. So it does not matter which point you call point 1 and which you call point 2. For example, (x₂ − x₁)² = (x₁ − x₂)², because squaring a negative number makes it positive. You can subtract in either order and get the same answer.
  • What if one point is the origin O(0, 0)? Then x₁ = 0 and y₁ = 0, and the formula becomes the distance of P(x, y) from the origin: OP = √(x² + y²).

Let’s see the formula in action on two simple points before anything trickier.

A first distance

Find the distance between A(2, 3) and B(4, 1).

Now let’s settle the town puzzle we opened the chapter with — the same formula does the job.

Back to the two towns

Town B is 36 km east and 15 km north of town A. How far is B from A in a straight line?

Using distances: collinearity, triangles and quadrilaterals

Once you can find any distance, you can answer “what shape is this?” just by comparing lengths.

Collinear points. “Collinear” simply means lying on one straight line. Three points A, B, C are collinear exactly when the longest of the three distances equals the sum of the other two. For example, AB + BC = AC. Why does this work? If the three points made a real triangle, then any two sides would always add up to more than the third side. So when two of the distances add up to exactly the third, the triangle has flattened out into a straight line. Figure 7.3 below shows both cases side by side: points on a line, and points forming a triangle.

Two cases. On top, three points A, B and C lie on one straight line with B between A and C, so AB plus BC equals AC. On the bottom, A, B and C form a triangle, B raised above the line AC, so AB plus BC is greater than AC.
Figure 7.3 — The collinearity test, shown as two cases. (a) The top panel shows three points A, B and C lying on one straight line with B between A and C; the part AB plus the part BC adds up to exactly the whole AC, so AB + BC = AC. (b) The bottom panel shows the same three points NOT on a line: B is lifted up so A, B and C form a triangle, with AC drawn as the dashed base. Now the two slanting sides AB + BC together are greater than the straight base AC. So equality (AB + BC = AC) is the signal that the points are collinear.

Let’s try this distance test on three actual points and see if they line up.

Are they seated in a line?

Three students sit at A(3, 1), B(6, 4) and C(8, 6). Are they collinear?

Types of triangle. Find all three side lengths. If all three are equal, the triangle is equilateral. If exactly two are equal, it is isosceles. And there is one more check: if the squares of two sides add up to the square of the third side, then those two sides meet at a right angle. This is the converse of the Pythagoras theorem (the theorem read backwards). We saw earlier that a 90° corner forces leg² + leg² = hypotenuse². The converse says the reverse is also true: if you find that two sides squared add up to the third side squared, the corner between them must be 90°. No other angle can make those numbers fit. So the equation itself is proof of a right angle.

Types of quadrilateral. A quadrilateral is any four-sided shape. Take the four points in order around the shape. Find the four side lengths and the two diagonals (the lines joining opposite corners). Then use this table to name the shape:

Telling quadrilaterals apart by sides and diagonals
ShapeWhat to check
Squareall 4 sides equal AND both diagonals equal
Rhombusall 4 sides equal BUT diagonals unequal
Rectangleopposite sides equal AND both diagonals equal
Parallelogramopposite sides equal (diagonals need not be)

You might wonder why the diagonals matter at all. If a shape already has all four sides equal, isn’t that enough to call it a square? No — and this is exactly where students lose marks. A rhombus also has all four sides equal. Picture a square that you push sideways so it leans over, like a squashed cardboard box. The four sides stay the same length, but the corners are no longer square (90°). That tilted shape is a rhombus, not a square. So “four equal sides” cannot, on its own, tell a square apart from a rhombus.

The diagonals are what break the tie. In a square the two diagonals come out equal. In a leaning rhombus one diagonal stretches long while the other shrinks short, so they are unequal. (In fact, the diagonals come out equal only when the corners are true 90° corners — so equal diagonals are a secret way of checking for square corners without measuring any angle.) That is why the square test needs both equal sides and equal diagonals. Figure 7.4 below shows the two shapes side by side.

A square and a rhombus side by side, both with all four sides marked equal. The square's two diagonals are drawn equal in length. The rhombus is a squashed diamond whose vertical diagonal is short and horizontal diagonal is long, so its diagonals are unequal. The note explains that equal sides alone cannot separate the two shapes, but equal diagonals can, because equal diagonals force 90 degree corners.
Figure 7.4 — Why four equal sides alone cannot tell a square from a rhombus. (a) On the left, the green square has all four sides marked equal (the tick marks) and its two red diagonals are equal in length — its corners are true 90° corners. (b) On the right, the blue rhombus is a squashed diamond: its four sides are also marked equal, but its short vertical diagonal and long horizontal diagonal are unequal, because its corners are tilted, not 90°. The note below sums it up: equal sides alone can't decide between the two, but equal diagonals force square corners — so 4 equal sides plus equal diagonals means square.

Let’s put the table to work on four points and prove what shape they make.

Is it a square?

Show that A(1, 7), B(4, 2), C(−1, −1) and D(−4, 4) are the vertices of a square.

Deriving the section formula

Now for the second tool. Suppose a point P(x, y) sits on the segment from A(x₁, y₁) to B(x₂, y₂). It divides the segment in the ratio m : n. “Divides internally in the ratio m : n” just means the part AP and the part PB are in the ratio m : n. In short, AP : PB = m : n. For example, a ratio of 3 : 1 means AP is three times as long as PB.

Now draw straight lines down from A, P and B to the x-axis. Then draw a flat horizontal line from A and another from P. This makes two right triangles, AQP and PCB. These two triangles have the same set of angles, because the segment AB crosses both of them at the same slant. When two triangles have the same angles, they have the same shape (one is just a bigger or smaller copy of the other). We call such triangles similar. This is the AA similarity criterion (AA means “angle-angle”). So △AQP ~ △PCB.

Similar triangles are the engine of this proof, so let’s make sure that idea is solid first.

Figure 7.5 below shows those two similar triangles drawn under the segment, so you can see exactly which sides we’ll compare.

A red segment from A at x1, y1 up to B at x2, y2 with point P at x, y sitting on it. AP is marked m and PB is marked n. Dashed legs form two similar right triangles AQP and PCB below the segment.
Figure 7.5 — Deriving the section formula from similar triangles. The red segment runs from A(x₁, y₁) at the lower-left up to B(x₂, y₂) at the upper-right, with the green point P(x, y) sitting on it. The lower part AP is marked m and the upper part PB is marked n, so P divides AB in the ratio AP : PB = m : n. Dashed legs build two right triangles below the segment: triangle AQP (horizontal leg AQ = x − x₁, vertical leg PQ = y − y₁, right angle at Q) and triangle PCB (horizontal leg PC = x₂ − x, vertical leg BC = y₂ − y, right angle at C). Because AB cuts both at the same slant, the two triangles are similar, so their matching sides share the ratio m : n — which turns the length ratio into ratios of coordinate gaps.

In similar triangles, matching sides are in the same ratio. That ratio here is AP : PB = m : n. So:

AQ / PC = PQ / BC = m / n

Read these sides off the figure:

  • AQ = x − x₁ and PC = x₂ − x.
  • PQ = y − y₁ and BC = y₂ − y.

Let’s do the x-part first. We have (x − x₁) / (x₂ − x) = m / n. Cross-multiply (multiply each side’s top by the other side’s bottom):

n(x − x₁) = m(x₂ − x)

Open the brackets: nx − nx₁ = mx₂ − mx. Bring the x-terms to one side: mx + nx = mx₂ + nx₁. Take x common on the left: (m + n)x = mx₂ + nx₁. So:

x = (mx₂ + nx₁) / (m + n)

The y-part works in exactly the same way. From (y − y₁) / (y₂ − y) = m / n we get y = (my₂ + ny₁) / (m + n).

So the point P that divides AB in the ratio m : n is:

P = ((mx₂ + nx₁)/(m + n), (my₂ + ny₁)/(m + n))

This is the section formula. Watch the “cross” pattern here. The first ratio number m gets multiplied by the far point B (its x₂ and y₂). The second ratio number n gets multiplied by the near point A (its x₁ and y₁). The numbers cross over to the opposite point.

The midpoint — just the m = n case

The midpoint is the exact middle of a segment. It splits the segment into two equal halves, so the ratio is 1 : 1. Put m = 1 and n = 1 into the section formula:

Midpoint = ((1·x₂ + 1·x₁)/(1 + 1), (1·y₂ + 1·y₁)/(1 + 1)) = ((x₁ + x₂)/2, (y₁ + y₂)/2)

In plain words: to find the midpoint, just take the average of the two x-values and the average of the two y-values. There is no new formula to memorise here. It comes straight out of the section formula.

Let’s run the section formula on a real 3 : 1 split and watch the crossed pattern do its work.

Dividing a segment in a ratio

Find the point dividing the segment joining (4, −3) and (8, 5) internally in the ratio 3 : 1.

We can also run the formula backwards: given the dividing point, find the unknown ratio.

Finding the ratio

In what ratio does the point (−4, 6) divide the segment joining A(−6, 10) and B(3, −8)?

Before moving on, here’s a quick one to make sure the midpoint-as-special-case idea stuck.

Concept check

What ratio must you use in the section formula to get the midpoint of a segment?

Common Mistakes

These two formulas trip up almost everyone in the same few spots. Here are the slip-ups to watch for so you don’t lose easy marks.

⚠️ Common mistake
What students think

In the distance formula you add the two gaps first, then square the whole thing: d = √[(x₂ − x₁) + (y₂ − y₁)]².

Why it seems right

Both versions use the same pieces under a square root, so it feels okay to pull the squaring outside and 'tidy up'.

What actually happens

You must square EACH gap on its own, and then add: d = √[(x₂ − x₁)² + (y₂ − y₁)²]. Squaring the sum gives a totally different (wrong) answer. Remember the Pythagoras shape is leg² + leg², not (leg + leg)².

⚠️ Common mistake
What students think

The order of the points matters, so you must always do (bigger − smaller) to keep things positive.

Why it seems right

When you measure a length by hand, you naturally take small from big so the answer is not negative. So the order feels important.

What actually happens

Because each gap is SQUARED, (x₂ − x₁)² = (x₁ − x₂)². Squaring turns any minus sign into a plus. So you can subtract in any order and the distance comes out the same.

⚠️ Common mistake
What students think

In the section formula for ratio m : n, multiply x₁ by m and x₂ by n: x = (mx₁ + nx₂)/(m + n).

Why it seems right

It feels natural to pair the first ratio number m with the first point A, keeping everything 'in order'.

What actually happens

It's CROSSED: the first ratio number m goes with the FAR point B, the second number n with the NEAR point A. So x = (mx₂ + nx₁)/(m + n). A quick sanity check: a 3 : 1 split lands the point closer to B, so B should carry the bigger weight (3).

⚠️ Common mistake
What students think

To find the midpoint you average the x with the y: midpoint = ((x₁ + y₁)/2, (x₂ + y₂)/2).

Why it seems right

There are lots of subscripts and two halves, so it's easy to mix up which numbers get paired.

What actually happens

Keep x's with x's and y's with y's: midpoint = ((x₁ + x₂)/2, (y₁ + y₂)/2). The first coordinate averages the two x-values; the second averages the two y-values.

Quick Check

What is the distance between the points (0, 0) and (5, 12)?

Three points satisfy AB + BC = AC. What does this tell you?

What is the midpoint of the segment joining (−2, 4) and (6, −2)?

A point divides the segment from A(0, 0) to B(8, 0) in the ratio 3 : 1. What is its x-coordinate?

Practice Problems

Easy

easy

Find the distance between (−5, 7) and (−1, 3).

easy

Find the midpoint of the segment joining (3, 0) and (3, 8).

Medium

medium

Find the coordinates of the points of trisection of the segment joining A(2, −2) and B(−7, 4) — the two points that divide it into three equal parts.

medium

Find a point on the y-axis that is equidistant from A(6, 5) and B(−4, 3).

Challenge

challenge

A(6, 1), B(8, 2), C(9, 4) and D(p, 3) are the vertices of a parallelogram, taken in order. Find p.

challenge

Find the ratio in which the y-axis divides the segment joining (5, −6) and (−1, −4), and find the point of division.

Summary

You should now be able to explain:

  • Coordinate geometry turns geometric questions about points into algebra, using their coordinates (x, y).
  • The distance formula: PQ = √[(x₂ − x₁)² + (y₂ − y₁)²], derived from the Pythagoras theorem on the right triangle with legs x₂ − x₁ and y₂ − y₁. The order of subtraction doesn’t matter because the differences are squared.
  • The distance from the origin: OP = √(x² + y²).
  • Collinearity: three points lie on a line when the largest distance equals the sum of the other two (AB + BC = AC).
  • You can classify triangles and quadrilaterals by comparing side lengths and diagonals (square, rhombus, rectangle, parallelogram).
  • The section formula: a point dividing AB internally in ratio m : n is ((mx₂ + nx₁)/(m + n), (my₂ + ny₁)/(m + n)) — derived from similar triangles, with the ratio numbers crossed onto the opposite endpoints.
  • The midpoint formula is the m = n = 1 case: ((x₁ + x₂)/2, (y₁ + y₂)/2) — just the average of the coordinates.

What’s Next

So far you’ve used coordinates to describe positions and distances. Next, in Introduction to Trigonometry, you’ll link the angles of a right triangle to the ratios of its sides. These ratios are called sine, cosine and tangent. Think of it this way: coordinate geometry tells you how far, while trigonometry tells you which direction. Put together, they let you do amazing things, from finding the height of a tall tower to navigation and physics.

Frequently Asked Questions

How do you derive the distance formula in coordinate geometry?

Take two points A(x₁, y₁) and B(x₂, y₂). Draw a right-angled triangle by going across from A and then up to B. The horizontal side has length |x₂ − x₁| and the vertical side has length |y₂ − y₁|. By the Pythagoras theorem, AB² = (x₂ − x₁)² + (y₂ − y₁)², so AB = √[(x₂ − x₁)² + (y₂ − y₁)²].

What is the section formula and how do you use it?

If a point P divides the line segment joining A(x₁, y₁) and B(x₂, y₂) in the ratio m : n, then P has coordinates ((mx₂ + nx₁)/(m + n), (my₂ + ny₁)/(m + n)). Think of it as a weighted average — the point closer to B gets a bigger pull from B's coordinates. The midpoint is the special case where m = n, giving ((x₁ + x₂)/2, (y₁ + y₂)/2).

How do you check if three points are collinear using coordinate geometry?

Three points are collinear (on one straight line) if the area of the triangle formed by them is zero. Use the formula: Area = ½ |x₁(y₂ − y₃) + x₂(y₃ − y₁) + x₃(y₁ − y₂)|. If this equals 0, the points are collinear. Alternatively, check if the distance AB + BC equals AC (the three distances rule).

How do you find what type of quadrilateral four points form?

Calculate the lengths of all four sides and both diagonals using the distance formula. A parallelogram has two pairs of equal opposite sides. A rectangle is a parallelogram with equal diagonals. A rhombus is a parallelogram with all four sides equal. A square is a rhombus with equal diagonals. Comparing these lengths tells you exactly which shape it is.

What is the distance of a point from the origin, and how is it calculated?

The origin is the point (0, 0). The distance of any point P(x, y) from the origin is √(x² + y²), which comes directly from the distance formula with x₁ = 0 and y₁ = 0. For example, the distance of the point (3, 4) from the origin is √(9 + 16) = √25 = 5.