Gradient and Equation of a Straight Line: GCSE Maths

The equation y = mx + c describes every straight line on a coordinate grid: m is the gradient (steepness) and c is the y-intercept (where it crosses the y-axis). At GCSE, you go deeper — finding equations from two points, recognising parallel and perpendicular gradients, and working with lines in any form.

What do m and c represent in y = mx + c?

Every straight line (except a vertical line) can be written in the form y = mx + c. The two values m and c fully describe the line, and recognising them instantly is one of the most frequently rewarded skills at GCSE.

m is the gradient. It tells you how steep the line is and in which direction it slopes. A positive m means the line rises from left to right. A negative m means it falls from left to right. The larger the absolute value of m, the steeper the slope. A gradient of 0 gives a horizontal line.

c is the y-intercept. It is the y-coordinate of the point where the line crosses the y-axis — the value of y when x = 0.

Equation | Gradient (m) | y-intercept (c) | Notes
y = 3x + 2 | 3 | 2 | Steep upward slope
y = −2x + 5 | −2 | 5 | Downward slope, y-intercept at 5
y = x − 4 | 1 | −4 | 45° slope, crosses at −4
y = 7 | 0 | 7 | Horizontal line
y = ½x | ½ | 0 | Gentle upward slope through origin

A vertical line such as x = 3 cannot be written in y = mx + c form because its gradient is undefined — it rises infinitely steeply. Every other straight line fits the form.

How do you calculate the gradient between two points?

The gradient formula uses the coordinates of any two points on the line. If the two points are (x₁, y₁) and (x₂, y₂), then:

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

This is often described as "rise over run" — the vertical change divided by the horizontal change. The crucial rule: subtract in the same order top and bottom. Mixing up the order will reverse the sign and give the gradient of a different line entirely.

Worked example 1 — positive gradient:

Points A(1, 3) and B(5, 11).

Rise: 11 − 3 = 8.

Run: 5 − 1 = 4.

Gradient: m = 8 ÷ 4 = 2.

Worked example 2 — negative gradient:

Points P(2, 7) and Q(6, 3).

Rise: 3 − 7 = −4.

Run: 6 − 2 = 4.

Gradient: m = (−4) ÷ 4 = −1.

A quick sense-check: if the line goes up from left to right, your gradient should be positive. If it goes down, it should be negative. The sign tells you the direction of slope at a glance.

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

Once you have calculated the gradient, finding the full equation requires one further step. Use the point-gradient form:

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

where (x₁, y₁) is any point on the line. Expand the right-hand side and rearrange into y = mx + c.

Here is the full process as numbered steps:

Calculate the gradient m using the two given points.

Substitute m and the coordinates of one point into y − y₁ = m(x − x₁).

Expand the right-hand side.

Add y₁ to both sides to isolate y.

Verify the equation by substituting both original points back in.

Complete worked example — find the equation through (1, 3) and (5, 11):

Gradient: m = (11 − 3) ÷ (5 − 1) = 8 ÷ 4 = 2.

Use point (1, 3): y − 3 = 2(x − 1).

Expand: y − 3 = 2x − 2.

Rearrange: y = 2x + 1.

Check with (1, 3): y = 2(1) + 1 = 3 ✓. Check with (5, 11): y = 2(5) + 1 = 11 ✓.

Answer: y = 2x + 1.

It is worth verifying both points — not just one — because an error in the gradient calculation can produce an equation that passes through one point by chance but not the other.

What is the gradient rule for parallel lines?

Parallel lines never meet, which means they have identical steepness: exactly the same gradient.

Two lines are parallel if and only if m₁ = m₂.

For example, y = 3x + 2 and y = 3x − 7 are parallel: both have gradient 3. They will never intersect because they are distinct lines running in exactly the same direction.

To find the equation of a line parallel to a given line and passing through a specific point:

Read the gradient m from the given line (it appears as the coefficient of x).

Substitute that same gradient and the new point (x₁, y₁) into y − y₁ = m(x − x₁).

Rearrange to y = mx + c.

Worked example: find the equation of a line parallel to y = 3x − 2 passing through (1, 4).

Gradient: m = 3 (same as the given line).

y − 4 = 3(x − 1).

y − 4 = 3x − 3.

y = 3x + 1.

Check: at x = 1: y = 3 + 1 = 4 ✓. Both lines have m = 3 and are parallel ✓.

What is the gradient rule for perpendicular lines?

Perpendicular lines meet at right angles (90°). Their gradients satisfy a specific relationship: the product of the two gradients equals −1.

m₁ × m₂ = −1, so m₂ = −1 ÷ m₁

The value −1/m₁ is called the negative reciprocal of m₁. To find it: flip the fraction and change the sign.

Gradient of line 1 (m₁) | Perpendicular gradient (m₂) | Check: m₁ × m₂
2 | −½ | 2 × (−½) = −1 ✓
−3 | ⅓ | (−3) × ⅓ = −1 ✓
½ | −2 | ½ × (−2) = −1 ✓
1 | −1 | 1 × (−1) = −1 ✓

Worked example: find the equation of a line perpendicular to y = 2x + 5 passing through (4, 1).

Gradient of given line: m₁ = 2.

Perpendicular gradient: m₂ = −½.

y − 1 = −½(x − 4).

y − 1 = −½x + 2.

y = −½x + 3.

Check at (4, 1): y = −½(4) + 3 = −2 + 3 = 1 ✓.

Verify perpendicularity: 2 × (−½) = −1 ✓.

How do you rearrange a line equation not in y = mx + c form?

GCSE questions sometimes present line equations in forms such as ax + by = c or ay − bx = c. You need to rearrange into y = mx + c before you can read off the gradient and y-intercept.

The steps are the same as rearranging any linear equation for y:

Move all terms not containing y to the right-hand side.

Divide both sides by the coefficient of y.

Worked example 1: rearrange 3x + 2y = 12.

Subtract 3x from both sides: 2y = 12 − 3x.

Divide by 2: y = 6 − (3/2)x = −(3/2)x + 6.

Gradient = −3/2, y-intercept = 6.

Worked example 2: rearrange 4y − 8x = 20.

Add 8x to both sides: 4y = 8x + 20.

Divide by 4: y = 2x + 5.

Gradient = 2, y-intercept = 5.

Once you have the equation in y = mx + c form, all the rules for parallel lines (same gradient), perpendicular lines (negative reciprocal gradient), and identifying key features apply as normal.

Frequently asked questions

How do I find the gradient from a graph?

Choose two clear points on the line — ideally where it passes exactly through grid intersections so you can read the coordinates precisely. Calculate rise ÷ run: count how many units the line rises (or falls) vertically for each unit it moves horizontally. If the line rises 4 units for every 2 units it moves right, the gradient is 4 ÷ 2 = 2. If it falls 3 units for every 1 unit right, the gradient is −3. Always check whether the slope is upward (positive) or downward (negative) before you calculate.

What does a gradient of zero look like on a graph?

A gradient of zero means the line is perfectly horizontal — y does not change as x increases. The equation of any horizontal line is y = c, where c is the constant y-value. For example, y = 4 is a horizontal line crossing the y-axis at 4, running perfectly flat in both directions. In a real-life context, a zero gradient means "no change over time" — for instance, a stationary object on a distance-time graph, or a constant temperature on a temperature-time graph.

How do I know if two lines are perpendicular without drawing them?

Multiply their gradients together. If the product is exactly −1, the lines are perpendicular. For example, the lines y = (3/4)x + 1 and y = −(4/3)x + 5 have gradients 3/4 and −4/3. Multiplying: (3/4) × (−4/3) = −12/12 = −1 ✓ — the lines are perpendicular. This test works for any pair of non-horizontal, non-vertical lines. A horizontal line (gradient 0) is always perpendicular to a vertical line (undefined gradient), but the product formula does not apply to that special case.

What is the equation of a vertical line?

A vertical line cannot be written in y = mx + c form because its gradient is undefined — it rises (or falls) infinitely steeply. Every point on a vertical line shares the same x-coordinate, so its equation is simply x = k, where k is that constant x-value. For example, x = 3 passes through (3, 0), (3, 1), (3, −5), and every other point where x = 3. The y-axis itself has equation x = 0. Vertical lines are perpendicular to every horizontal line, but this cannot be verified using the m₁ × m₂ = −1 formula.

For Socratic straight-line graphs practice at GCSE, see aitutors.me.