Skip to main content

O-Level Mathematics · Secondary 3 and 4

O-Level E-Math Coordinate Geometry: Straight Line Basics

By The Singapore Syllabus · Updated · How this guide is checked

Quick answer

Coordinate geometry uses coordinates to describe straight lines. The gradient is (y₂ − y₁)/(x₂ − x₁), the length of a segment is √((x₂ − x₁)² + (y₂ − y₁)²) by Pythagoras' theorem, and every non-vertical line has an equation y = mx + c, where m is the gradient and c is the y-intercept. Parallel lines have equal gradients.

  • Gradient m = (y₂ − y₁)/(x₂ − x₁), the change in y over the change in x.
  • Length of a segment = √((x₂ − x₁)² + (y₂ − y₁)²)
  • Equation of a line: y = mx + c, with c the y-intercept.
  • Horizontal line y = k has gradient 0, and a vertical line x = k has no defined gradient.

Coordinate geometry in O-Level Mathematics deals with straight lines on a grid: the gradient (y₂ − y₁)/(x₂ − x₁), the length of a segment from Pythagoras' theorem, and the equation y = mx + c. A typical question gives two points, such as A(1, 2) and B(7, 10), asks for all three, then asks where the line meets an axis. A frequent slip is reading the gradient of 2x + 3y = 12 as 2 instead of rearranging to find −2/3. Coordinate geometry is examined at the final O-Level and, from 2027, in SEC (G3) Mathematics.

What does the syllabus expect for Coordinate Geometry?

Where it sits: 4052, Geometry and Measurement, G6: Coordinate geometry. In the SEC (G3) syllabus from 2027: K310, Geometry and Measurement, G6: Coordinate geometry.

  • Find the gradient of a straight line given the coordinates of two points on it
  • Find the length of a line segment given the coordinates of its end points
  • Interpret and find the equation of a straight line graph in the form y = mx + c
  • Solve geometric problems involving the use of coordinates

Not in this syllabus

Older papers and other books may include these. You will not be examined on them.

  • The condition for perpendicular lines, m₁m₂ = −1, is listed in A-Math 4049, not in 4052.
  • The midpoint formula is listed in A-Math 4049 coordinate geometry. It is not among the 4052 coordinate geometry content.
  • Equations of circles, such as (x − a)² + (y − b)² = r², are listed in A-Math 4049, not in 4052.

How do you find the gradient of a line?

To find the gradient of a line through two points, divide the change in y by the change in x: gradient = (y₂ − y₁)/(x₂ − x₁). The gradient measures how steep the line is. For C(1, 2) and D(5, −6), the gradient is (−6 − 2)/(5 − 1) = −8/4 = −2. Subtract the coordinates in the same order on the top and the bottom. A line sloping up from left to right has a positive gradient and one sloping down has a negative gradient.

A horizontal line has gradient 0, because y does not change. A vertical line has no defined gradient, because the change in x is 0 and you cannot divide by zero. Lines that are parallel have the same gradient, so any line parallel to y = 3x − 4 also has gradient 3. When a line is given in a form such as 3x + 2y = 8, rearrange it to y = −(3/2)x + 4 before reading the gradient, which is −3/2.

A straight line segment joins A(1, 2) to B(7, 10). A dashed right-angled triangle is drawn beneath it, with a horizontal side of 6 units from (1, 2) to (7, 2) and a vertical side of 8 units up to B. The gradient is 8/6 = 4/3 and, by Pythagoras' theorem, the length of AB is 10 units.

The segment from A(1, 2) to B(7, 10), with a run of 6 and a rise of 8, giving gradient 4/3 and length 10.

How do you find the length of a line segment?

To find the length of a line segment between (x₁, y₁) and (x₂, y₂), use Pythagoras' theorem. The horizontal and vertical distances form the two shorter sides of a right-angled triangle, so length = √((x₂ − x₁)² + (y₂ − y₁)²). For C(1, 2) and D(5, −6), the length is √(4² + (−8)²) = √(16 + 64) = √80 = 8.94 units to 3 significant figures. Because the differences are squared, the order of subtraction does not matter here, and negative differences become positive.

Keep an exact surd such as √80 until the end if the answer feeds into a later part or the question asks for an exact value. Length questions often ask you to show that a triangle is isosceles or right-angled. For a right angle, check whether the squares of the two shorter sides add up to the square of the longest side, which is the converse of Pythagoras' theorem.

Gradient, length and equation for A(1, 2) and B(7, 10)
QuantityFormula or methodFor A(1, 2) and B(7, 10)
Gradient(y₂ − y₁)/(x₂ − x₁)(10 − 2)/(7 − 1) = 8/6 = 4/3
Length√((x₂ − x₁)² + (y₂ − y₁)²)√(6² + 8²) = √100 = 10 units
Equationy = mx + c, substitute a point to find cy = (4/3)x + 2/3, or 3y = 4x + 2
y-interceptPut x = 0 in the equation(0, 2/3)
x-interceptPut y = 0 in the equation0 = 4x + 2, so (−1/2, 0)

Equation of a straight line

Every non-vertical straight line has an equation of the form y = mx + c, where m is the gradient and c is the y-intercept. To find the equation through a point with a known gradient, substitute the gradient for m and the coordinates of the point for x and y, then solve for c.

For a line through (−1, 4) with gradient −2, 4 = −2(−1) + c, so c = 2 and the line is y = −2x + 2. With two points, find the gradient first and then use either point.

Horizontal lines have equations of the form y = k and vertical lines have equations of the form x = k, for a constant k. To find where a line crosses the x-axis, put y = 0, and for the y-axis put x = 0. To find where two lines meet, solve their equations simultaneously.

Finding the equation from a gradient and one point, by substituting into y = mx + c
Gradient and pointFind cEquation
m = 2, through (1, 5)5 = 2(1) + c, so c = 3y = 2x + 3
m = −3, through (2, −1)−1 = −3(2) + c, so c = 5y = −3x + 5
m = 1/2, through (4, 0)0 = (1/2)(4) + c, so c = −2y = (1/2)x − 2
m = −2/3, through (3, 2)2 = −(2/3)(3) + c, so c = 4y = −(2/3)x + 4
m = 0, through (3, 7)A horizontal line, so y stays 7y = 7

Problems on a grid

Problems on a grid combine gradient, length and the equation of a line with geometry, such as areas of triangles and proofs about quadrilaterals. To find the area of a triangle with a horizontal or vertical side, use that side as the base and read the perpendicular height from the coordinates.

For the triangle with vertices P(1, 1), Q(7, 1) and R(3, 5), the base PQ is 6 units, the height is 5 − 1 = 4 units, and the area is ½ × 6 × 4 = 12 square units.

If no side is horizontal or vertical, enclose the shape in a rectangle and subtract the right-angled triangles around it. To show that a quadrilateral is a parallelogram, show that both pairs of opposite sides have equal gradients. A rough sketch helps you see which sides to use and whether an answer is sensible: a gradient that comes out positive for a line you drew sloping down is a sign of a subtraction slip.

Worked example

How do you answer an exam question on Coordinate Geometry?

The points A(1, 2) and B(7, 10) are given. Find (a) the gradient of AB, (b) the length of AB, (c) the equation of the line AB, (d) the coordinates of the point where the line AB meets the y-axis.

  1. Gradient = (10 − 2)/(7 − 1) = 8/6 = 4/3.
  2. Length = √((7 − 1)² + (10 − 2)²) = √(36 + 64) = √100 = 10 units.
  3. Use y = mx + c with m = 4/3 and the point B(7, 10): 10 = (4/3)(7) + c = 28/3 + c, so c = 2/3.
  4. The equation is y = (4/3)x + 2/3, which can also be written as 3y = 4x + 2.
  5. Check with A: (4/3)(1) + 2/3 = 6/3 = 2, which is correct.
  6. The line meets the y-axis where x = 0, so y = 2/3.

Answer: (a) 4/3 (b) 10 units (c) 3y = 4x + 2 (d) (0, 2/3)

Self-check

Can you do Coordinate Geometry? Four quick questions

Tap an answer to see if it is right and why.

  1. 1. What is the gradient of the line through (2, 3) and (6, 1)?

  2. 2. What is the gradient of the line 4x + 2y = 6?

  3. 3. What is the length of the line segment from (1, 1) to (4, 5)?

  4. 4. Which is the equation of the horizontal line through (2, −5)?

Challenge question

Can you solve a harder Coordinate Geometry question?

The points A(−1, 2), B(5, 4) and C(3, 10) are the vertices of a triangle. (a) Show that triangle ABC is right-angled, and state which angle is the right angle. (b) Find the area of triangle ABC. (c) Find the equation of the line BC.

Hint 1

Find the square of each side with (difference in x)² + (difference in y)². You do not need the square roots yet.

Hint 2

If two squared lengths add up to the third, the triangle is right-angled, and the right angle is opposite the longest side.

Hint 3

With the right angle at B, the two sides meeting at B can be used as the base and the height.

Show the full solution
  1. AB² = (5 − (−1))² + (4 − 2)² = 36 + 4 = 40.
  2. BC² = (3 − 5)² + (10 − 4)² = 4 + 36 = 40.
  3. AC² = (3 − (−1))² + (10 − 2)² = 16 + 64 = 80.
  4. Since AB² + BC² = 40 + 40 = 80 = AC², the triangle is right-angled by the converse of Pythagoras' theorem, with the right angle at B, opposite the longest side AC.
  5. Area = ½ × AB × BC = ½ × √40 × √40 = ½ × 40 = 20 square units.
  6. Gradient of BC = (10 − 4)/(3 − 5) = 6/(−2) = −3.
  7. Using B(5, 4): 4 = −3(5) + c, so c = 19 and the equation is y = −3x + 19. Check with C: −3(3) + 19 = 10.

Answer: (a) The right angle is at B, since AB² + BC² = AC². (b) 20 square units (c) y = −3x + 19

Which mistakes lose marks in Coordinate Geometry?

  • Working out (10 − 2)/(1 − 7) for A(1, 2) and B(7, 10), and getting −4/3 instead of 4/3.

    Why it happens: B is used first on the top but A is used first on the bottom.

    Fix: Choose one point to go first and use it first on both the top and the bottom: (10 − 2)/(7 − 1).

  • Calculating change in x over change in y, which gives 3/4 instead of 4/3.

    Why it happens: Gradient is remembered as a ratio without remembering which way up it goes.

    Fix: Say 'rise over run' and write the y-values on top every time.

  • Saying the gradient of 2x + 3y = 12 is 2.

    Why it happens: The coefficient of x is read off before the equation is in the form y = mx + c.

    Fix: Rearrange to y = mx + c first: y = −(2/3)x + 4, so the gradient is −2/3.

  • From P(−2, 1) to Q(4, 9), writing the run as 4 − 2 = 2.

    Why it happens: The negative coordinate loses its sign when it is subtracted.

    Fix: Write brackets round every coordinate you subtract: 4 − (−2) = 6.

  • Writing x = 5 for the horizontal line through (3, 5).

    Why it happens: Horizontal is linked with the x-axis, so the student reaches for x.

    Fix: On a horizontal line y never changes, so its equation is y = 5. The vertical line through (3, 5) is x = 3.

How do you score well on Coordinate Geometry questions?

  • Draw a quick sketch with the points roughly in place. It tells you whether the gradient should be positive or negative and whether a length is reasonable.
  • Leave gradients as fractions such as 4/3 rather than 1.33, so the equation of the line stays exact and later substitutions give exact answers.
  • Check every equation you find by substituting the coordinates of a second point that should lie on the line.

Practice questions

1. Find the gradient and the length of the line segment joining P(1, −3) and Q(5, 0).

Show answer

Gradient 3/4 and length 5 units. Gradient = (0 − (−3))/(5 − 1) = 3/4. Length = √(4² + 3²) = √25 = 5.

2. Find the equation of the line that passes through (2, 5) and is parallel to y = 3x − 4.

Show answer

y = 3x − 1. Parallel lines have equal gradients, so m = 3. Then 5 = 3(2) + c gives c = −1.

3. The line 2x + 3y = 12 meets the x-axis at A and the y-axis at B, and O is the origin. Find the gradient of AB, the length of AB and the area of triangle OAB.

Show answer

Putting y = 0 gives A(6, 0), and putting x = 0 gives B(0, 4). Gradient = (4 − 0)/(0 − 6) = −2/3. Length AB = √(6² + 4²) = √52 = 7.21 units to 3 significant figures. Area of OAB = ½ × 6 × 4 = 12 square units.

Questions students and parents ask

How do you find the equation of a line through two points?

Find the gradient m from the two points, then substitute m and the coordinates of either point into y = mx + c to find c. For A(1, 2) and B(7, 10), m = 4/3 and c = 2/3, so y = (4/3)x + 2/3. Check with the other point.

How do you find the gradient from an equation like 2x + 3y = 12?

Rearrange it into the form y = mx + c. Subtract 2x from both sides and divide by 3 to get y = −(2/3)x + 4. The gradient is the coefficient of x, −2/3, and the line crosses the y-axis at 4.

What does it mean when two lines have the same gradient?

Lines with the same gradient are parallel, so they never meet unless they are the same line. To find a line parallel to y = 3x − 4 through a given point, keep m = 3 and use the point to work out the new value of c.

Does the order of the points matter in the length formula?

No. The differences are squared, so (7 − 1)² and (1 − 7)² both give 36. Order does matter for the gradient, where you must subtract in the same order on the top and on the bottom.

How can parents check Coordinate Geometry at home?

  • Ask your child to sketch the two points before calculating. If the line slopes down from left to right, the gradient must be negative, so a positive answer signals a slip.
  • Ask them to check their line equation by putting the second point into it. If both sides agree, the equation is right.

Free download: O-Level E-Math Formula Sheet, with what the exam paper gives you.

Practise with real papers: 10 free Sec 3 and Sec 4 E-Math papers set by Singapore schools, 10 of them with Coordinate Geometry questions.

Next in A-Math Coordinate Geometry of Circles.

Related topics

Official syllabus

This guide follows the syllabus documents published by the Singapore Examinations and Assessment Board.

First published 16 October 2026. Updated 18 October 2026 with a self-check quiz, a challenge question and notes for parents. Every worked example and practice answer on this page was checked a second time, separately from the writing, before publishing. Spotted an error? Tell us and we will correct it.

Want help with Coordinate Geometry?

Tell us the level and we send a shortlist of E-Math tutors on WhatsApp within 16 hours. You choose the tutor. About E-Math tuition

Rated 4.9 on Google · No contract · You choose the tutor from real profiles

“TSS has been the best tuition agency I’ve tried. Alicia matched me with a tutor that really suits my learning style, and the lessons have helped me improve a lot.” Cheryl Ngu, on Google

Request an O‑Level Math tutor

We use your number only to send your shortlist on WhatsApp, and you choose the tutor. Privacy

From S$35 an hour for Sec 3 and Sec 4.

Add level, subjects, budget (optional)

Optional, helps us match faster. We can also ask you on WhatsApp.

Child's level
Subjects
Lessons
Budget per hour

Our rates for Sec 3: part-time S$35 to S$45, full-time S$45 to S$65, Ex-MOE S$65 to S$95 an hour.

Tutor preferences

Or ask on WhatsApp