The equation of a straight line takes the form y = mx + c, where m is the gradient and c is the y-intercept. Calculating the gradient from two coordinates and writing the full equation of the line are the two central skills tested at GCSE — both follow a simple, reliable method.

What does y = mx + c mean?

The equation y = mx + c is the general form of any straight line on a coordinate grid. Each part carries precise meaning:

Part Name What it tells you
m Gradient How steep the line is; how much y changes for each 1-unit increase in x
c y-intercept The value of y where the line crosses the y-axis (when x = 0)

A positive gradient means the line slopes upward from left to right. A negative gradient means it slopes downward. A gradient of zero produces a horizontal line. A vertical line has an undefined gradient and cannot be written in the form y = mx + c.

Worked example: A line has the equation y = 3x − 5.

  1. The gradient is m = 3: for every 1-unit increase in x, y increases by 3.
  2. The y-intercept is c = −5: the line crosses the y-axis at (0, −5).
  3. To plot the line, start at (0, −5) and move 1 right, 3 up for each subsequent point.

How do you find the gradient from two points?

The gradient measures the rate of change of y with respect to x. Given two points (x₁, y₁) and (x₂, y₂), the gradient formula is:

m = (y₂ − y₁) ÷ (x₂ − x₁)

This is sometimes described as "rise over run" — the vertical change divided by the horizontal change.

Worked example: Find the gradient of the line through (2, 3) and (6, 11).

  1. Label the coordinates: (x₁, y₁) = (2, 3) and (x₂, y₂) = (6, 11).
  2. Calculate: m = (11 − 3) ÷ (6 − 2) = 8 ÷ 4 = 2.
  3. The gradient is 2: for each 1-unit increase in x, y increases by 2.

It does not matter which point you label as (x₁, y₁) and which as (x₂, y₂) — as long as you subtract in the same order top and bottom. Swapping gives (3 − 11) ÷ (2 − 6) = −8 ÷ −4 = 2 — the same answer. ✓

How do you write the equation of a line given the gradient and one point?

Once you know the gradient m and one point (x₁, y₁) on the line, substitute into:

y − y₁ = m(x − x₁)

Then rearrange into y = mx + c.

Worked example: A line has gradient 3 and passes through (2, 7).

  1. Substitute into y − y₁ = m(x − x₁): y − 7 = 3(x − 2).
  2. Expand the brackets: y − 7 = 3x − 6.
  3. Add 7 to both sides: y = 3x + 1.

Check: Substitute (2, 7): y = 3(2) + 1 = 6 + 1 = 7 ✓

Alternatively, substitute into y = mx + c directly: 7 = 3(2) + c → 7 = 6 + c → c = 1 → y = 3x + 1. Both methods give the same result.

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

Combine the gradient formula with the point substitution method.

Worked example: Find the equation of the line through (1, 4) and (3, 10).

  1. Find the gradient: m = (10 − 4) ÷ (3 − 1) = 6 ÷ 2 = 3.
  2. Substitute with one point — use (1, 4): y − 4 = 3(x − 1).
  3. Expand and simplify: y − 4 = 3x − 3 → y = 3x + 1.
  4. Verify with the second point (3, 10): y = 3(3) + 1 = 10 ✓

Always verify with the second point — it is the one free check available that catches arithmetic errors in either the gradient or the substitution step.

What are the equations of parallel and perpendicular lines?

Parallel and perpendicular lines have a precise relationship through their gradients.

Relationship Gradient rule Example
Parallel Same gradient y = 3x + 5 and y = 3x − 2 are parallel
Perpendicular Gradients multiply to −1 y = 3x + 5 is perpendicular to y = −⅓x + 4

For a perpendicular line: if the original gradient is m, the perpendicular gradient is −1/m (the negative reciprocal).

Worked example: Find the equation of the line perpendicular to y = 2x + 1 that passes through (4, 3).

  1. Original gradient = 2. Perpendicular gradient = −1/2.
  2. Substitute: y − 3 = −½(x − 4).
  3. Expand: y − 3 = −½x + 2.
  4. Add 3: y = −½x + 5.

Check: Gradients 2 and −½ multiply to −1 ✓; substituting (4, 3): y = −½(4) + 5 = −2 + 5 = 3 ✓

How do you rearrange a line equation into y = mx + c?

Some exam questions give equations in other forms such as ax + by = c or ax + by + c = 0. Rearranging into y = mx + c lets you read off the gradient and y-intercept directly.

Worked example 1: Rearrange 3x + 2y = 10 into the form y = mx + c, then state the gradient and y-intercept.

  1. Subtract 3x from both sides: 2y = −3x + 10.
  2. Divide every term by 2: y = −3/2 x + 5.
  3. Gradient m = −3/2; y-intercept c = 5.

Worked example 2: Rearrange 4x − y − 6 = 0.

  1. Add y to both sides: 4x − 6 = y.
  2. Write in standard order: y = 4x − 6.
  3. Gradient = 4; y-intercept = −6.

Frequently asked questions

What does a negative gradient mean?

A negative gradient means the line slopes downward from left to right — as x increases, y decreases. For example, y = −2x + 4 has a gradient of −2: for each 1-unit increase in x, y falls by 2. The steeper the downward slope, the larger the absolute value of the negative gradient. A gradient of −4 is steeper than a gradient of −1.

How do I find the x-intercept of a straight line?

The x-intercept is where the line crosses the x-axis, meaning y = 0. Substitute y = 0 into the equation and solve for x. For the line y = 3x − 6: 0 = 3x − 6 → 3x = 6 → x = 2. The x-intercept is (2, 0). The y-intercept (c in y = mx + c) is found by setting x = 0, giving y = c directly — no substitution needed.

What if the two points I am given have the same x-coordinate?

If both points share the same x-value, the line is vertical — for example, x = 3. A vertical line has an undefined gradient (you would be dividing by zero in the gradient formula). Vertical lines cannot be written in the form y = mx + c because they are not functions. At GCSE, simply state "the line is vertical with equation x = [value]".

How do gradients appear on the GCSE exam?

Gradient questions appear across several topics. You may be asked to find the gradient from a graph (count rise and run), from two coordinates (gradient formula), or to write the equation of a line. Perpendicular lines appear frequently in Higher GCSE, often linked to finding the equation of a tangent or normal to a curve. Recognising parallel lines (same gradient) is also tested in algebraic reasoning questions where you compare two equations without drawing them.


For Socratic algebra coaching at GCSE that builds deep understanding of straight-line graphs, visit aitutors.me.