
The section formula gives the point P between A(x₁, y₁) and B(x₂, y₂) with AP : PB = m : n. It is x = (mx₂ + nx₁) ÷ (m + n), and likewise for y. Don't swap m and n: m goes with B, even though m is the part next to A. The distance formula is Pythagoras.
In this post we check a phone's screen size with the distance formula, then work with negative numbers. We answer a classic question: is a 1 : 2 point nearer the start or the end? Then we watch the m and n swap put a point at the wrong end, see why the formula works, and meet the same idea inside video games. Last come midpoints (points exactly halfway) and a full answer, step by step. Every hard word is explained where it first comes up. The practice questions from the video are answered in full, and exam-style questions with model answers are at the end.
Key takeaways
- Distance formula = Pythagoras on a grid: across is x₂ − x₁, up is y₂ − y₁, and the distance is √(across² + up²). It gives an iPhone 17 screen's size, corner to corner, as 6.27 inches: Apple's own figure.
- Watch the signs. From −2 to 4 is 4 − (−2) = 6, not 2. After you square, the sign no longer matters.
- A 1 : 2 point is nearer the start. Cut the line into 3 equal parts: the point is 1 part from A and 2 parts from B.
- Section formula: x = (mx₂ + nx₁) ÷ (m + n), and the same for y. It criss-crosses: m goes with B, n goes with A. Swap them and the point lands at the wrong end.
- Midpoint: add and halve. The midpoint of (−2, 3) and (4, −5) is (1, −1).
This post goes with letsBug Maths, episode 7. The distance and section formulas are on the CBSE Class 10 syllabus (the list of what an exam can test), in Chapter 7 of NCERT's Class 10 book. ICSE Class 10 has the section and mid-point formula. GCSE and IGCSE students use the same ideas with points on a grid and Pythagoras. Watch the lesson, or read on: the post adds why the formula works, how to find the ratio when you know the point, the full working for every answer, and model answers with a suggested mark for each step.
Is the distance formula just Pythagoras?
Yes. Let's test it on something in your pocket: a phone screen. The screen is a grid of pixels, the tiny dots of colour that make up the picture. So every point on it has coordinates: a pair of numbers (x, y) that say how far across and how far up it is.
Apple's page for the iPhone 17 lists a "2622‑by‑1206-pixel resolution at 460 ppi". Resolution is how many pixels the screen has: 2622 along the long side and 1206 along the short side. ppi means pixels per inch: 460 pixels side by side make one inch, which is 2.54 cm.
Hold the phone on its side. Put the bottom-left corner of the screen at (0, 0) and the top-right corner at (2622, 1206). The diagonal, the straight line from corner to corner, is the longest side of a right-angled triangle:
- Across: 2622 − 0 = 2622 pixels.
- Up: 1206 − 0 = 1206 pixels.
- Pythagoras: d² = 2622² + 1206² = 6 874 884 + 1 454 436 = 8 329 320.
- Square root: d = √8 329 320, which is about 2886 pixels.
- In inches: 2886 ÷ 460 = 6.27 inches (to two decimal places).
Now compare with Apple: "When measured as a standard rectangular shape, the screen is 6.27 inches diagonally (actual viewable area is less)." The screen's corners are rounded, so the part you can see is a little smaller. But the rectangle's diagonal matches Apple's figure, from coordinates alone. (Apple sells it as a "6.3‑inch" display: 6.27 rounded to one decimal place.)

For any two points (x₁, y₁) and (x₂, y₂), the small numbers just name the first and second point. Across is x₂ − x₁ and up is y₂ − y₁, so:
distance = √((x₂ − x₁)² + (y₂ − y₁)²)
That's the distance formula. It isn't a new rule to learn by heart. NCERT's chapter builds it from a triangle and says so: "You may use the Pythagoras Theorem to calculate this distance." If Pythagoras is new to you, start with a visual proof of Pythagoras' theorem.
How do you use the distance formula with negative coordinates?
Find the distance between (−2, 3) and (4, −5).
- Across: 4 − (−2) = 4 + 2 = 6. Not 4 − 2 = 2: taking away a negative number is the same as adding the positive one, so − (−2) is + 2.
- Up: −5 − 3 = −8. The line goes down, so "up" is negative here. That's fine.
- Square both: 6² = 36 and (−8)² = 64. A negative number times itself is positive, so after this step the minus sign stops mattering.
- Add, then square root: √(36 + 64) = √100 = 10.
The order of the points doesn't matter either. Start from (4, −5) instead and you get across −6 and up 8: (−6)² + 8² = 36 + 64 = 100 again. A distance can't be negative, and NCERT notes that "since distance is always non-negative, we take only the positive square root".
Sign slips (small mistakes with plus and minus signs) are common in exams. Exam boards publish examiner reports on what students got wrong. Cambridge's June 2024 IGCSE maths report (0580, Paper 41, Question 5, a question about two points, P and Q, and the vector between them) lists "slips with arithmetic and slips with signs" among the common errors.
Is a 1 : 2 point nearer the start or the end?
It's nearer the start. Let's see why with a classic example from NCERT's Chapter 7. "A town B is located 36 km east and 15 km north of the town A." Put town A at (0, 0), so B is at (36, 15), measured in km.
First, how far apart are they? √(36² + 15²) = √(1296 + 225) = √1521 = 39 km.
Now NCERT adds a phone company. It wants a relay tower (a tall mast that passes phone signals along) on the straight line between the towns, placed so that "the distance of the tower from B is twice its distance from A". So A to the tower, and the tower to B, are in the ratio 1 : 2.
A ratio of 1 : 2 means 1 part, then 2 parts: 3 equal parts in all. Cut the 39 km into 3 parts of 13 km each. The tower is 1 part (13 km) from A and 2 parts (26 km) from B. So it's nearer the start. It's one third of the way along, not two thirds. (Ratios as parts of a whole are explained in how to share in a ratio.)
One third of the way along means one third of the way across and one third of the way up: x = 36 ÷ 3 = 12 and y = 15 ÷ 3 = 5. The tower is at (12, 5), the same answer as NCERT: "You can check that P(12, 5) meets the condition that OP : PB = 1 : 2."

What is the section formula?
The section formula finds the point P that divides the line from A(x₁, y₁) to B(x₂, y₂) in the ratio m : n. Here m is the part next to A (from A to P) and n is the part next to B (from P to B):
x = (mx₂ + nx₁) ÷ (m + n) and y = (my₂ + ny₁) ÷ (m + n)
Look closely and you'll see a criss-cross: m, the part next to A, multiplies B's coordinates. n, the part next to B, multiplies A's. It looks backwards, and that's exactly why people swap them.
Test it on the tower. m = 1, n = 2, A = (0, 0), B = (36, 15):
- x = (1 × 36 + 2 × 0) ÷ 3 = 12
- y = (1 × 15 + 2 × 0) ÷ 3 = 5
The tower is at (12, 5), the point we found by cutting the road into thirds.
Why does the section formula work?
Because a point in the ratio m : n is a fixed fraction of the way along. Out of m + n equal parts, P is m parts from A. So P is m ÷ (m + n) of the way from A to B. Call that fraction t. For the tower, t = 1 ÷ 3.
To find P, start at A and go that fraction of the way across: x = x₁ + (x₂ − x₁) × t. Put t = m ÷ (m + n) in:
x = x₁ + m(x₂ − x₁) ÷ (m + n)
To add the two parts, write x₁ over the same bottom number: x₁ = (m + n)x₁ ÷ (m + n) = (mx₁ + nx₁) ÷ (m + n). Then add, and multiply out m(x₂ − x₁) = mx₂ − mx₁:
x = (mx₁ + nx₁ + mx₂ − mx₁) ÷ (m + n) = (mx₂ + nx₁) ÷ (m + n)
The mx₁ and −mx₁ cancel, and the section formula is left. Now the criss-cross makes sense: m sits with x₂ because m decides how far you travel towards B. NCERT proves it another way, with similar triangles (triangles with the same shape but different sizes), and gets the same formula: "This is known as the section formula."
Where is the section formula used in real life?
In video games. A game engine is the software that runs a game: it draws the world and moves things around in it. The Unity game engine has a function (a named piece of code that does one job) called Lerp, short for linear interpolation: finding a point part of the way along a straight line. Unity's manual says Lerp "Interpolates linearly between two points", and gives the answer as "V = A + ( B − A ) × t". It also says "The distance along the line corresponds to the fraction represented by t".
That's our equation from the last section. For the tower, t = 1/3: x = 0 + (36 − 0) × 1/3 = 12 and y = 0 + (15 − 0) × 1/3 = 5. Same point, (12, 5). Unity says Lerp is useful "for finding a point some fraction of the way along a line between two endpoints. For example, to move an object gradually between those points." Make t grow a little at a time from 0 to 1, and the object slides smoothly from A to B. With t = 1/2 you land exactly halfway: the midpoint.
How do you find the midpoint of two points?
The midpoint is the point exactly halfway between two points: the 1 : 1 split. In NCERT's words, "The mid-point of a line segment divides the line segment in the ratio 1 : 1." (A line segment is the straight piece of line between two points.) Put m = 1 and n = 1 into the section formula, and it becomes: add the coordinates, then halve them.
midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)
Midpoint of (−2, 3) and (4, −5):
- x = (−2 + 4) ÷ 2 = 2 ÷ 2 = 1
- y = (3 + (−5)) ÷ 2 = −2 ÷ 2 = −1
The midpoint is (1, −1).
Examiners see two slips here. In Cambridge's June 2024 report, Paper 42, Question 10: "A common error was to subtract the x and y values rather than adding them before halving the result". It adds: "Occasionally the sum of x and y values for the two points were not halved." In Paper 41, Question 5, the report says the most common wrong answers came from the subtracting slip, (x₁ − x₂) ÷ 2, and from "reversed answers", with the two numbers the wrong way round. So add, halve, and write x first, then y.
How do you write a section formula answer step by step?
Here's NCERT's Exercise 7.2, Question 1: find the coordinates of the point which divides the join of (−1, 7) and (4, −3) in the ratio 2 : 3. ("The join" means the line segment between the two points.) Say it clearly, one step at a time:
- Label first. A = (−1, 7), B = (4, −3), m = 2, n = 3.
- x. x = (2 × 4 + 3 × (−1)) ÷ (2 + 3) = (8 − 3) ÷ 5 = 5 ÷ 5 = 1.
- y. y = (2 × (−3) + 3 × 7) ÷ 5 = (−6 + 21) ÷ 5 = 15 ÷ 5 = 3.
- Answer. The point is (1, 3).
Check it. 2 is smaller than 3, so the point should be nearer A. Measure both distances with the distance formula:
- From A: √((1 − (−1))² + (3 − 7)²) = √(4 + 16) = √20, about 4.47.
- To B: √((4 − 1)² + (−3 − 3)²) = √(9 + 36) = √45, about 6.71.
The point is nearer A. In fact 20 = 4 × 5 and 45 = 9 × 5, so √20 = 2√5 and √45 = 3√5, and the two distances are in the ratio 2 : 3 exactly.
Swap m and n and you get x = (3 × 4 + 2 × (−1)) ÷ 5 = 10 ÷ 5 = 2 and y = (3 × (−3) + 2 × 7) ÷ 5 = 5 ÷ 5 = 1. The point (2, 1) is nearer B: the wrong end.
Should you write √20 or 4.47? Either can be right. A surd is an answer left with a square root sign in it, like √20. Cambridge's examiners say: "A surd answer was acceptable as the final answer but where a decimal answer is given it should be correct to at least three significant figures." Three significant figures means the first three digits that matter, so √20 is 4.47, not 4.5. The same report notes that some students "tried to find the gradient rather than the length of AB": the gradient is how steep a line is, which is a different question (see what y = mx + c means).
How do you find the ratio when you know the point?
Sometimes a question gives you the point and asks for the ratio. Here's NCERT's Example 7: "In what ratio does the point (− 4, 6) divide the line segment joining the points A(− 6, 10) and B(3, − 8)?"
The trick is to call the ratio k : 1. Any ratio can be written this way, because you can divide both parts by the same number: 2 : 7 is the same as 2/7 : 1. Then there is only one unknown, k.
- Use x. Put m = k and n = 1 into the section formula: −4 = (k × 3 + 1 × (−6)) ÷ (k + 1).
- Clear the fraction. Multiply both sides by (k + 1): −4k − 4 = 3k − 6.
- Solve. Add 4k and 6 to both sides: 2 = 7k, so k = 2/7.
- Write the ratio. 2/7 : 1. Multiply both parts by 7: 2 : 7.
Check with y. (2 × (−8) + 7 × 10) ÷ (2 + 7) = 54 ÷ 9 = 6. It works, and NCERT agrees: the point divides the segment "in the ratio 2 : 7". Also, 2 is smaller than 7, so the point should be nearer A. It is: about 4.5 from A and about 15.7 from B.
Your turn. These are the practice questions from the video, plus the swipe bonus from the video. Try each one before you open the answers.
1) Find the point dividing the join of A(2, 3) and B(10, 7) in the ratio 1 : 3.
2) Find the distance between (1, 4) and (5, 7).
3) Find the point dividing the join of (−4, 6) and (8, −3) in the ratio 2 : 1.
4) Bonus: on the iPhone 17 screen, a swipe starts at pixel (200, 300) and ends at pixel (700, 1500). How long is the swipe in pixels, and in inches at 460 pixels per inch?
Show the answers
1) m = 1, n = 3. x = (1 × 10 + 3 × 2) ÷ 4 = 16 ÷ 4 = 4. y = (1 × 7 + 3 × 3) ÷ 4 = 16 ÷ 4 = 4. The point is (4, 4). Check: 1 is smaller than 3, so it should be nearer A, and (4, 4) is a quarter of the way from A to B. The swap gives (8, 6), three quarters of the way: the wrong end.
2) Across: 5 − 1 = 4. Up: 7 − 4 = 3. Distance = √(4² + 3²) = √(16 + 9) = √25 = 5.
3) m = 2, n = 1. x = (2 × 8 + 1 × (−4)) ÷ 3 = 12 ÷ 3 = 4. y = (2 × (−3) + 1 × 6) ÷ 3 = 0 ÷ 3 = 0. The point is (4, 0). Check: 1 is the smaller number and it belongs to B, so the point should be nearer B, two thirds of the way along. It is.
4) Across: 700 − 200 = 500. Up: 1500 − 300 = 1200. Length = √(500² + 1200²) = √(250 000 + 1 440 000) = √1 690 000 = 1300 pixels. In inches: 1300 ÷ 460 = about 2.83 inches (2.8 to one decimal place). That's about 7.2 cm (2.83 × 2.54).
Exam-style questions with model answers
The number in brackets is the marks. Each mark is one clear step.
Q1. Find the distance between (3, −1) and (−5, 5). [2]
Model answer
Across: −5 − 3 = −8. Up: 5 − (−1) = 6 [1]. Distance = √((−8)² + 6²) = √(64 + 36) = √100 = 10 [1].
Q2. Find the midpoint of (−3, 8) and (5, −2). [2]
Model answer
((−3 + 5) ÷ 2, (8 + (−2)) ÷ 2) [1] = (1, 3) [1]. (Add, then halve. Don't subtract.)
Q3. M(3, 2) is the midpoint of A(−1, 5) and B. Find the coordinates of B. [2]
Model answer
Call B (x, y). (−1 + x) ÷ 2 = 3, so −1 + x = 6 and x = 7. (5 + y) ÷ 2 = 2, so 5 + y = 4 and y = −1 [1]. B = (7, −1) [1]. Check: (−1 + 7) ÷ 2 = 3 and (5 + (−1)) ÷ 2 = 2.
Q4. Find the coordinates of the points of trisection of the line segment joining (4, −1) and (−2, −3). (The points of trisection are the two points that cut the segment into three equal parts.) [3]
Model answer
The first point divides it in the ratio 1 : 2, the second in the ratio 2 : 1 [1]. Ratio 1 : 2: x = (1 × (−2) + 2 × 4) ÷ 3 = 6 ÷ 3 = 2, y = (1 × (−3) + 2 × (−1)) ÷ 3 = −5/3. So (2, −5/3) [1]. Ratio 2 : 1: x = (2 × (−2) + 1 × 4) ÷ 3 = 0, y = (2 × (−3) + 1 × (−1)) ÷ 3 = −7/3. So (0, −7/3) [1]. (This is NCERT Exercise 7.2, Question 2.)
Q5. In what ratio does the point (0, 4) divide the line segment joining A(−4, 2) and B(8, 8)? [3]
Model answer
Let the ratio be k : 1. Using x: 0 = (k × 8 + 1 × (−4)) ÷ (k + 1) [1]. So 8k − 4 = 0, which gives k = 1/2 [1]. The ratio is 1/2 : 1, which is 1 : 2 [1]. Check with y: (1 × 8 + 2 × 2) ÷ 3 = 12 ÷ 3 = 4. It works.
Questions people ask
What is the section formula?
It gives the point that divides the line from A(x₁, y₁) to B(x₂, y₂) in the ratio m : n: x = (mx₂ + nx₁) ÷ (m + n) and y = (my₂ + ny₁) ÷ (m + n). For A(0, 0), B(36, 15) and the ratio 1 : 2, the point is (12, 5).
What is the distance formula?
The distance between (x₁, y₁) and (x₂, y₂) is √((x₂ − x₁)² + (y₂ − y₁)²). It's Pythagoras' theorem: across squared plus up squared, then the square root.
Is a point in the ratio 1 : 2 nearer A or B?
Nearer A, the start. 1 : 2 means 3 equal parts, with the point 1 part from A and 2 parts from B. It's one third of the way along.
How do I remember where m and n go?
It criss-crosses: m multiplies B's coordinates and n multiplies A's. Then check your answer: the point must be nearer the end with the smaller number in the ratio.
What is the midpoint formula?
Add the coordinates and halve them: ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). It's the section formula with the ratio 1 : 1. The midpoint of (−2, 3) and (4, −5) is (1, −1).
Does the order of the points matter in the distance formula?
No. Swapping the points changes the signs of across and up, but squaring makes them positive. From (−2, 3) to (4, −5) and back again, the distance is 10 both ways.
Keep going
- Watch the full lesson, Section Formula & Distance Formula: Don't Swap m and n, and its Short, Section Formula: Is the 1:2 Point Nearer the Start or the End? More in letsBug Maths on YouTube. Next in the series: simultaneous equations.
- The episode before this one: what y = mx + c means, with the gradient and the y-intercept.
- Where the distance formula comes from: a visual proof of Pythagoras' theorem.
- Ratios as parts of a whole: how to share in a ratio.
Checked on 2 November 2026 against the 8 sources below. Every distance, point, ratio and practice answer in this post was worked out again in a Python script, with exact fractions where the answer is exact, and every quote was matched word for word with the source text.
Sources
- NCERT: Class 10 Mathematics, Chapter 7, Coordinate Geometry (Reprint 2026-27: the distance formula from Pythagoras, the towns and relay tower, the section formula, the midpoint, Example 7 and Exercise 7.2)
- CBSE: Mathematics curriculum, Class X, 2026-27 (Unit III Coordinate Geometry: distance formula, section formula)
- CISCE: ICSE Mathematics syllabus, Class X, examination year 2027 (a copy hosted by Physics Wallah; section and mid-point formula)
- AQA: GCSE Mathematics 8300 specification (A8: coordinates in all four quadrants; G20: Pythagoras' theorem)
- Cambridge International: IGCSE Mathematics 0580, June 2024 principal examiner report (Papers 41 and 42: sign slips, midpoint errors, surds and significant figures)
- Apple: iPhone 17 technical specifications (2622 by 1206 pixels at 460 ppi; 6.27 inches diagonally as a rectangle)
- Unity: Scripting API, Vector3.Lerp (V = A + (B − A) × t, where t is the fraction of the way along)
- NIST: Approximate conversions from U.S. customary measures to metric (1 inch = 2.54 cm)