Equations of Straight Lines (y = mx + c) (Cambridge (CIE) IGCSE Maths: Extended): Revision Note
Exam code: 0580 & 0980
Finding equations of straight lines
What is the equation of a straight line?
The general equation of a straight line is y = mx + c where
m is the gradient
c is the y-intercept
The value where it cuts the y-axis
y = 5x + 2 is a straight line with
gradient 5
y-intercept 2
y = 3 - 4x is a straight line with
gradient -4
y-intercept 3
How do I find the equation of a straight line from a graph?
Find the gradient by drawing a triangle and using
Positive for uphill lines, negative for downhill
Read off the y-intercept from the graph
Where it cuts the y-axis
Substitute these values into y = mx + c
What if no y-intercept is shown?
If you can't read off the y-intercept
find any point on the line
substitute it into the equation
solve to find c
For example, a line with gradient 6 passes through (2, 15)
The y-intercept is unknown
Write y = 6x + c
Substitute in x = 2 and y = 15
15 = 6 × 2 + c
15 = 12 + c
Solve for c
c = 3
The equation is y = 6x + 3
What are the equations of horizontal and vertical lines?
A horizontal line has the equation y = c
c is the y-intercept
A vertical line has the equation x = k
k is the x-intercept
For example
y = 4
x = -2
Worked Example
(a) Find the equation of the straight line shown in the diagram below.

Answer:
Find m, the gradient
Identify any two points the line passes through and work out the rise and run
Line passes through (2, 4) and (10, 0)

The rise is 4
The run is 8
Calculate the fraction
The slope is downward (downhill), so it is a negative gradient
gradient,
Now find the y-intercept
The line cuts the y-axis at 5
y-intercept,
Substitute the gradient, m, and the y-intercept, c, into y = mx + c
(b) Find the equation of the straight line with a gradient of 3 that passes through the point (5, 4).
Answer:
Substitute m = 3 into y = mx + c
Leave c as an unknown letter
Substitute x = 5 and y = 4 into the equation
Solve the equation to find c
You now know c
Replace c with −11 to complete the equation of the line
Unlock more, it's free!
Was this revision note helpful?
Build on this topic
Questions students ask about Equations of Straight Lines (y = mx + c)
Real questions from students revising this topic on Save My Exams
What is the gradient of the y-axis?
The y-axis is a vertical line, so its gradient is undefined — it has no numerical value.
- The y-axis is the vertical line x = 0
- Gradient = rise ÷ run
- On a vertical line you can rise as far as you like, but the run is always 0
- Dividing by 0 is impossible, so there is no gradient to write down
Example: take (0, 1) and (0, 5) on the y-axis
- Rise = 5 − 1 = 4
- Run = 0 − 0 = 0
- 4 ÷ 0 is undefined
Compare with the x-axis
- The x-axis is the horizontal line y = 0
- The rise is 0, so gradient = 0 ÷ run = 0
Summary
- Vertical lines (x = k, including the y-axis): gradient undefined, and they cannot be written as y = mx + c
- Horizontal lines (y = c, including the x-axis): gradient 0
How do you know if a gradient is positive or negative?
Read the line from left to right, like reading a book: uphill means a positive gradient, downhill means a negative one.
From a graph
- Uphill as you move right: positive
- Downhill as you move right: negative
- Flat (horizontal): gradient 0
From an equation
- In y = mx + c, the sign of m tells you
- y = 5x + 2 has gradient 5, so positive
- y = 3 − 4x has gradient −4, so negative — look at the sign in front of the x term, not the first number
Page example
- The line passes through (2, 4) and (10, 0)
- Rise = 4, run = 8, so rise/run = ½
- It slopes downhill, so m = −½ and the equation is y = −½x + 5
Quick check: if y gets bigger as x gets bigger the gradient is positive; if y gets smaller as x gets bigger it is negative.
What is the difference between rise and run?
The rise is the vertical (up or down) distance between two points on the line; the run is the horizontal (across) distance.
- Rise: the change in the y-coordinates
- Run: the change in the x-coordinates
- Gradient = rise ÷ run
On a graph
- Pick two points with clear coordinates
- Draw a right-angled triangle between them
- The vertical side is the rise, the horizontal side is the run
Page example: the line through (2, 4) and (10, 0)
- Rise: from y = 4 down to y = 0, so 4
- Run: from x = 2 across to x = 10, so 8
- rise/run = 4/8 = ½
- The line goes downhill, so m = −½
Using coordinates instead
- (0 − 4) ÷ (10 − 2) = −4 ÷ 8 = −½
- Subtract in the same order top and bottom and the sign appears automatically
Tip: rise goes up the page, run goes along it.