Bitesize has changed! We're updating subjects as fast as we can. Visit our new site to find Bitesize guides and clips - and tell us what you think!

Did you know?

We also have Bitesize study guides covering many subjects at National 4 and National 5 on our Knowledge & Learning BETA website.

Home > Maths II > Measure and Shape > Equation of a straight line

Maths II

Equation of a straight line


Graphs can also be drawn from an equation. These equations can show the link between two different quantities. For example if we are changing from one unit to another (for example, £s to $s) we can draw a graph that not only shows the comparison but that we can use for a ready reckoner.

A line graph showing how the value of money in pounds translates to its value in dollars. Starting at zero, the only other two values shown are that one pound equals 1.6 dollars.

If an algebraic equation can be written in the form y = mx + c then we can draw a straight line graph.

Remember that m stands for the gradient or slope of a line and c is the point at which the line cuts through the y axis.

If the line cuts through the origin then the equation would become y = mx

Example 1

Draw the straight line represented by the equation y = 2x


To draw this graph you first of all have to work out at least 3 co-ordinates Using only 2 isn't a good idea as you could have made a mistake, more than 3 and you are spending a lot of extra time calculating.

You can pick any 3 values for x. e.g. x = 2, 4 and 6.

Then substitute these values to find the corresponding y value.

  • when x =2 then y = 2 \times 2 = 4
  • when x = 4 then y = 2 \times 4 = 8
  • when x = 6 then y = 2 \times 6 = 12

We now have the co-ordinates as (2 , 4) (4, 8) and (6, 12).

You can now pick the scale, plot the points and connect them in a straight line.

Obviously x scale could be from 0 to 10 and y from 0 to 15 or 20.

A line graph with a stright line representing the equation that y equals 2 x. x axis values of 2, 4, 6 and 10 are given, and their y axis equivalents of 4, 8, 12 and 20 are also given.

Example 2

Draw the straight line represented by the equation y = 3x + 2


Again you pick 3 values for x. e.g. x = 1, 4 and 7

Now substitute to find y.

  • y = 3 \times 1 + 2 = 5
  • y = 3 \times 4 + 2 = 14
  • y = 3 \times 7 + 2 = 23

Co-ordinates are (1 , 5) (4 , 14) and (7 , 23).

Again you can now draw your graph in confidence that the scale is correct. Perhaps x drawn from 0 to 10 and y from 0 to 30.

A line graph representing the equation y equals 3 x plus 2. along rhe x and y axes 1 corresponds to 5, 4 with 14, and 7 with 23.

BBC © 2014 The BBC is not responsible for the content of external sites. Read more.

This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.