Equations of Straight Lines (y = mx + c) (Cambridge (CIE) IGCSE Maths: Extended): Revision Note

Exam code: 0580 & 0980

Guided study available on this topic

Understand this topic with deeper explanations and understanding checks.

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

    • gradient=riserun

      • 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.

Graph of a straight line with negative gradient

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)

Finding the equation of a straight line from a graph

The rise is 4
The run is 8

Calculate the fraction riserun

riserun=48=12

The slope is downward (downhill), so it is a negative gradient

gradient, m=−12

Now find the y-intercept
The line cuts the y-axis at 5

y-intercept,  c=5

Substitute the gradient, m, and the y-intercept, c, into y  = mx  + c

y=−12x+5

(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

y=3x+c

Substitute x  = 5 and y  = 4 into the equation
Solve the equation to find c

4=3×5+c4=15+c−11=c


You now know c
Replace c  with −11 to complete the equation of the line

y=3x−11

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

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

  1. Pick two points with clear coordinates
  2. Draw a right-angled triangle between them
  3. 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.

Mark Curtis

Author: Mark Curtis

Expertise: Maths Content Creator

Mark graduated twice from the University of Oxford: once in 2009 with a First in Mathematics, then again in 2013 with a PhD (DPhil) in Mathematics. He has had nine successful years as a secondary school teacher, specialising in A-Level Further Maths and running extension classes for Oxbridge Maths applicants. Alongside his teaching, he has written five internal textbooks, introduced new spiralling school curriculums and trained other Maths teachers through outreach programmes.

Dan Finlay

Reviewer: Dan Finlay

Expertise: Portfolio Lead

Dan graduated from the University of Oxford with a First class degree in mathematics. As well as teaching maths for over 8 years, Dan has marked a range of exams for Edexcel, tutored students and taught A Level Accounting. Dan has a keen interest in statistics and probability and their real-life applications.