In short
Coordinate geometry assigns every point in the plane a unique address — an ordered pair (x, y) — and then uses algebra to answer geometric questions. The distance between two points comes from the Pythagorean theorem applied to their coordinates. The section formula locates the point that divides a segment in any given ratio, and the midpoint formula is its simplest special case.
Two friends stand in a flat, open field. One says, "I buried something in this field — find it." Impossible. The field is vast, and there are no landmarks. But now the first friend plants two sticks in the ground — one pointing east, one pointing north — and says, "Walk 3 steps east and 7 steps north from where the sticks cross." Suddenly, the treasure has an address. The pair of numbers (3, 7) tells you exactly where it is, and no other point in the field has that same pair.
That is the entire idea behind coordinate geometry. You choose a reference point (where the sticks cross), you choose two perpendicular directions (east and north), and then every point in the plane can be described by two numbers. Once you have numbers, you can do algebra — and algebra can answer questions that pure geometry makes surprisingly hard.
How far apart are two points? What point lies exactly one-third of the way along a segment? Where is the midpoint? These are geometric questions, but once you attach numbers to points, they become algebra problems with clean, universal formulas. That translation — from shape to equation, from picture to computation — is what coordinate geometry is about.
The Cartesian plane
The system works like this. Draw two perpendicular number lines that cross at a point called the origin, labelled O. The horizontal line is the x-axis. The vertical line is the y-axis. Together, they form the Cartesian coordinate system — named after the 17th-century mathematician who popularised it, though the idea of locating points by two measurements is much older (Indian astronomers used coordinate-like grids in the Surya Siddhanta long before).
Every point P in the plane gets an ordered pair (x, y):
- The x-coordinate (also called the abscissa) is how far P is to the right of the y-axis. If P is to the left, x is negative.
- The y-coordinate (also called the ordinate) is how far P is above the x-axis. If P is below, y is negative.
The word "ordered" matters. The point (3, 2) is not the same as (2, 3) — one is 3 steps east and 2 steps north; the other is 2 steps east and 3 steps north. Swap the numbers, and you land at a different spot.
The two axes divide the plane into four regions called quadrants, numbered counter-clockwise:
| Quadrant | Sign of x | Sign of y | Example |
|---|---|---|---|
| I (top-right) | + | + | (3, 2) |
| II (top-left) | - | + | (-4, 3) |
| III (bottom-left) | - | - | (-2, -3) |
| IV (bottom-right) | + | - | (4, -1) |
Points on the axes do not belong to any quadrant: a point like (5, 0) sits on the x-axis itself, and (0, -3) sits on the y-axis. The origin (0, 0) is where both axes cross.
The distance formula
Here is the first payoff of having coordinates. Given two points A(x_1, y_1) and B(x_2, y_2), how far apart are they?
If the two points share the same y-coordinate — meaning they sit on the same horizontal line — the answer is just the difference in their x-coordinates: |x_2 - x_1|. If they share the same x-coordinate, the answer is |y_2 - y_1|. But if they differ in both coordinates, neither trick works directly.
The key insight is to build a right triangle. Drop a perpendicular from A and a horizontal from B (or the other way around) so they meet at a third point C. The point C has the x-coordinate of one point and the y-coordinate of the other.
Derivation
Let A = (x_1, y_1) and B = (x_2, y_2). Construct the point C = (x_2, y_1) — same horizontal level as A, same vertical level as B.
Now triangle ACB is a right triangle with the right angle at C. The two legs are:
- Horizontal leg AC: length = |x_2 - x_1|
- Vertical leg CB: length = |y_2 - y_1|
By the Pythagorean theorem:
Why: the Pythagorean theorem says that in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs. The absolute values disappear because squaring a negative number gives a positive result anyway.
Taking the positive square root:
Distance formula
The distance between two points A(x_1, y_1) and B(x_2, y_2) is
A quick sanity check: if A and B are on the same horizontal line, then y_1 = y_2, the second square vanishes, and d = |x_2 - x_1| — exactly what you would measure with a ruler. The formula is just the Pythagorean theorem with coordinates plugged in.
The section formula
The distance formula tells you how far apart two points are. The section formula answers a different question: given two points A and B, where is the point P that divides the segment AB in the ratio m : n?
"Divides in the ratio m : n" means that P lies on the segment AB such that the distance from A to P and the distance from P to B are in the ratio m : n. If m = n, the point P is the midpoint. If m = 2 and n = 1, the point P is two-thirds of the way from A to B.
Derivation (internal division)
Let A = (x_1, y_1), B = (x_2, y_2), and let P = (x, y) divide AB internally in the ratio m : n. This means P lies between A and B, with AP : PB = m : n.
Drop perpendiculars from A, P, and B to the x-axis, and draw horizontal lines through A and P. This creates two right triangles that are similar (their angles match because both have a right angle and share the angle at which line AB is inclined).
Since the triangles are similar and the ratio AP : PB = m : n, the corresponding sides are in the same ratio m : n.
For the x-coordinates, the horizontal displacement from A to P is x - x_1, and from P to B is x_2 - x. Since these are in the ratio m : n:
Why: the horizontal projections of AP and PB are proportional to AP and PB themselves (similar triangles). That's the whole geometric engine.
Cross-multiplying:
Why: after cross-multiplying, you collect the x terms on one side and the constants on the other. The factor (m + n) divides out cleanly.
By exactly the same argument applied to the vertical direction:
Section formula (internal division)
The point P that divides the segment joining A(x_1, y_1) and B(x_2, y_2) internally in the ratio m : n is
Read the formula carefully. The coordinate of the farther endpoint (B) gets the weight m, and the coordinate of the nearer endpoint (A) gets the weight n. This makes sense: if m is much bigger than n, the point P is very close to B — so B's coordinate should dominate.
A useful mnemonic: the ratio weight crosses over. The ratio is m : n from A to B, but in the formula, m sits next to x_2 (the B-coordinate) and n sits next to x_1 (the A-coordinate). The weights "cross" to the opposite endpoint.
External division
Sometimes the point P does not lie between A and B but on the line AB extended beyond one of the endpoints. This is called external division.
If P divides AB externally in the ratio m : n, the derivation is identical except that P is on the far side of B (when m > n). The result differs by only a sign: replace n with -n (or equivalently, replace every + with -).
Section formula (external division)
The point P that divides the segment joining A(x_1, y_1) and B(x_2, y_2) externally in the ratio m : n is
(provided m \neq n; if m = n, the "point" is at infinity — the line never reaches it).
Why does the sign change? In internal division, P is between A and B, so AP and PB point in the same direction along the line. In external division, P is beyond B, so AP and PB point in opposite directions. That opposite direction introduces a minus sign into the ratio, which propagates through the algebra.
The midpoint formula
The midpoint of a segment is the point that divides it in the ratio 1 : 1 — equal parts on both sides. Setting m = 1 and n = 1 in the section formula:
Midpoint formula
The midpoint of the segment joining A(x_1, y_1) and B(x_2, y_2) is
This is just the average of the two x-coordinates and the average of the two y-coordinates. It is the simplest and most frequently used special case of the section formula.
Worked examples
Example 1: Distance between two points
Find the distance between A(2, 3) and B(7, 15).
Step 1. Identify the coordinates.
Why: labelling the coordinates explicitly prevents sign errors in the next step.
Step 2. Compute the differences.
Why: the distance formula needs these two differences — they form the legs of the right triangle.
Step 3. Square each difference.
Step 4. Add and take the square root.
Why: 169 = 13^2, so the root simplifies to a clean integer. The numbers 5, 12, 13 form a Pythagorean triple — the right triangle with these legs has an integer hypotenuse.
Result: The distance is 13 units.
The picture confirms the answer: the horizontal leg stretches 5 units across and the vertical leg stretches 12 units up. The hypotenuse — the line from A to B — is the distance you computed.
Example 2: Dividing a segment in a given ratio
The point P divides the segment joining A(1, -2) and B(6, 8) internally in the ratio 3 : 2. Find P.
Step 1. Identify the values.
Why: m : n = 3 : 2 means P is closer to B than to A — three-fifths of the way from A to B.
Step 2. Apply the section formula for the x-coordinate.
Why: the weight m = 3 multiplies the B-coordinate (6), and n = 2 multiplies the A-coordinate (1). Remember: weights cross over.
Step 3. Apply the section formula for the y-coordinate.
Why: the negative sign on y_1 = -2 flows through the multiplication naturally — no special rule needed.
Step 4. State the answer.
Result: The point dividing AB in the ratio 3 : 2 is (4, 4).
A quick verification: AP = \sqrt{(4-1)^2 + (4-(-2))^2} = \sqrt{9 + 36} = \sqrt{45} and PB = \sqrt{(6-4)^2 + (8-4)^2} = \sqrt{4 + 16} = \sqrt{20}. The ratio AP : PB = \sqrt{45} : \sqrt{20} = \sqrt{9} : \sqrt{4} = 3 : 2. It checks out.
Common confusions
-
"The order of the points in the distance formula doesn't matter." Correct — and this is worth understanding, not just memorising. Since you square the differences, (x_2 - x_1)^2 = (x_1 - x_2)^2. Distance is symmetric: the distance from A to B equals the distance from B to A.
-
"In the section formula, m multiplies x_1." No — m multiplies x_2. The weights cross over to the opposite endpoint. This is the single most common error students make with the section formula. Write down the formula every time until it becomes automatic.
-
"Internal and external division formulas are unrelated." They are the same formula — external division just uses -n instead of +n. If you remember only the internal formula, you can get the external one by changing the sign of n.
-
"The midpoint formula needs to be memorised separately." It is just the section formula with m = n = 1. You can derive it on the spot.
-
"(3, 4) and (4, 3) are the same point." They are not. An ordered pair is ordered — the first number is the x-coordinate (horizontal), the second is the y-coordinate (vertical). Swapping them moves you to a different location in the plane.
Going deeper
If you came here to learn how the coordinate system works and how to use the distance and section formulas, you have everything you need — you can stop here. What follows is for readers who want to see the formulas used in slightly harder settings, and the connections that lead into the rest of coordinate geometry.
Distance from the origin
A useful special case: the distance from a point P(x, y) to the origin O(0, 0) is
This is just the distance formula with x_1 = 0, y_1 = 0. It appears constantly — for instance, the equation x^2 + y^2 = r^2 says "the set of all points whose distance from the origin is r," which is a circle of radius r centred at the origin.
Proving geometric results with coordinates
One of the most powerful uses of coordinate geometry is proving theorems from Euclidean geometry by converting them into algebra. Here is a classic example.
Claim: The diagonals of a parallelogram bisect each other.
Proof using coordinates. Place the parallelogram so that one vertex is at the origin. Let the four vertices be A(0, 0), B(a, 0), D(b, c), and C(a + b, c) — this arrangement guarantees ABCD is a parallelogram because \vec{AB} = (a, 0) = \vec{DC} and \vec{AD} = (b, c) = \vec{BC}.
The midpoint of diagonal AC (from (0, 0) to (a + b, c)) is:
The midpoint of diagonal BD (from (a, 0) to (b, c)) is:
Since M_1 = M_2, both diagonals share the same midpoint — which means they bisect each other. The proof is three lines of arithmetic.
This is the power of coordinate geometry. A statement that requires careful congruence arguments in Euclidean geometry becomes a simple computation once you assign coordinates.
The section formula in vector language
If you have met vectors, the section formula has a clean interpretation. The position vector of P dividing AB in the ratio m : n is
This is a weighted average of the position vectors of A and B. The weights are n (for A) and m (for B) — the same cross-over pattern as before. Thinking of division as a weighted average is useful: the midpoint is the average with equal weights, an internal point in ratio 3:1 is the average with weights 1 and 3 (favouring B three times as much), and so on.
Applications of the distance formula
The distance formula is the foundation for several important concepts that come next in coordinate geometry:
-
Equation of a circle. A circle of radius r centred at (h, k) is the set of all points (x, y) satisfying \sqrt{(x-h)^2 + (y-k)^2} = r, or equivalently, (x - h)^2 + (y - k)^2 = r^2. This is just the distance formula set equal to a constant.
-
Locus problems. Many locus problems ask: "find the set of all points equidistant from two given points" or "find the set of all points whose sum of distances from two points is constant." Both reduce to the distance formula.
-
Proving triangle types. To show a triangle is isosceles, compute all three side lengths with the distance formula and check if two are equal. To show it is right-angled, check if the Pythagorean theorem holds for the three sides.
Where this leads next
You now have the basic toolkit of coordinate geometry: a coordinate system that turns points into number pairs, and formulas that measure distance and locate division points. Every topic that follows builds on this.
- Area and Collinearity — how to compute the area of a triangle from the coordinates of its vertices, and how to test whether three points lie on the same line.
- Straight Line Forms — the equation of a line in slope-intercept, point-slope, and two-point forms — the next major object in coordinate geometry.
- Centres of Triangle — the centroid, incentre, circumcentre, and orthocentre, all computed using coordinates.
- Locus — the idea of describing a whole curve as the set of all points satisfying a distance or angle condition.
- Geometry with Complex Numbers — a different coordinate system where each point is a single complex number instead of an ordered pair.