Linear Graphs

Mathematics revision notes · Cambridge (CIE) · 0580

1. Gradient

What the number tells you

  • The gradient measures how steep a line is and which way it slopes
  • A gradient of 3 means the line rises 3 for every 1 step to the right, and a gradient of −4 means it falls 4 for every 1 step to the right
  • An uphill line, running from bottom left to top right, has a positive gradient; a downhill line has a negative one
  • Comparing steepness ignores the sign, so a gradient of −5 is steeper than one of 2
  • A horizontal line has gradient 0, and a vertical line has no gradient at all because there is no horizontal step to divide by

Measuring it

  • On a printed grid, pick two points that sit on the line and complete a right-angled triangle between them
A line drawn on a grid through (0, 2) and (1, 5), with a dashed right-angled triangle between those two points marking a rise of 5 − 2 = 3 against a run of 1 − 0 = 1, so the gradient is 3
Source: Gradient of a line by Save My Exams
  • The gradient is the vertical change divided by the horizontal change
  • Choose two points that sit exactly on grid intersections and are far apart, because a short triangle magnifies any reading error
  • Read the scales before counting squares: the two axes often use different scales, and one square is frequently not one unit
  • Put the minus sign back in yourself for a downhill line, since the counting gives only the size
A downhill line on a grid through (0, 1) and (1, −1), with a dashed triangle showing 2 down against 1 across, giving a gradient of −2
Source: Gradient of a line by Save My Exams
  • Away from a grid, the gradient between (x₁, y₁) and (x₂, y₂) is (y₂ − y₁) ÷ (x₂ − x₁)
    • Between (1, 3) and (5, 11): (11 − 3) ÷ (5 − 1) = 8 ÷ 4 = 2
  • Subtract the two coordinates in the same order top and bottom, or the sign comes out wrong

Worked example

Finding a gradient from two points

A straight line passes through (1, 2) and (5, 10). Find its gradient.

Solution:

  • Gradient is the change up the side divided by the change along the bottom
  • Change in y: 10 − 2 = 8
  • Change in x: 5 − 1 = 4
  • Gradient = 8 ÷ 4 = 2
  • Take the two coordinates in the same order in both subtractions; reversing both gives (2 − 10) ÷ (1 − 5) = −8 ÷ −4 = 2, the same answer
  • Reversing only one of them gives −2, which is a line sloping the other way

2. The straight-line equation

Reading a line from its equation

  • Any straight line that is not vertical can be written y = mx + c: the number m sets its steepness and the number c fixes where it meets the y-axis
  • The line therefore passes through (0, c)
    • y = 4x − 9 has gradient 4 and meets the y-axis at −9
    • y = 11 − 2x has gradient −2 and meets the y-axis at 11, so take the number attached to x, not the one written first
  • A horizontal line has the form y = c, since every point on it has the same y value
  • A vertical line has the form x = k, and it cannot be written as y = mx + c at all

Other forms of the equation

  • These papers also use the form ax + by = c, which has to be rearranged before the gradient can be read
  • Get a single y on one side, then divide every term by whatever multiplies it
    • 3x + 4y = 24 becomes 4y = −3x + 24, then y = −0.75x + 6, so the gradient is −0.75 and it crosses the y-axis at 6
  • Leaving 4y on the left and reading the gradient as −3 is the standard error here
  • Answers must be given fully simplified, so tidy fractions and collect any like terms before writing the final line

Worked example

Reading a line from its equation

Write down the gradient and the y-axis crossing of y = 3x − 4, and of 2x + 5y = 20.

Solution:

  • The first is already in the form y = mx + c
  • The number in front of x is the gradient, so the gradient is 3
  • The constant is where the line crosses the y-axis, at (0, −4)
  • The second is not in that form, so rearrange it before reading anything
  • Subtract 2x: 5y = −2x + 20
  • Divide every term by 5: y = −0.4x + 4
  • The gradient is −0.4 and the line crosses the y-axis at (0, 4)
  • Reading a gradient of 2 straight off 2x + 5y = 20 is the standard slip: nothing can be read until y stands alone

Worked example

Where a line meets a horizontal line

The lines y = 25 − 4x and y = −3 cross at the point P. Find the coordinates of P.

Solution:

  • Every point on y = −3 has a y-coordinate of −3, so P does too
  • Substitute y = −3 into the other equation: −3 = 25 − 4x
  • Subtract 25 from both sides: −28 = −4x
  • Divide both sides by −4: x = 7
  • P is (7, −3)
  • Check in y = 25 − 4x: 25 − 4 × 7 = 25 − 28 = −3
  • Give both coordinates when the point is asked for: the −3 comes straight from the horizontal line

3. Drawing a straight line

From an equation

  • Build a small table of values by substituting three x values that are spread across the axes you are given
  • Three points, not two: a slip in one of three points shows up because it misses the line through the other two, whereas two points always look convincing
  • Plot the points and join them with a ruled line that runs the full width of the grid
Two straight lines drawn on the same grid: a steep uphill line through (0, −1) and (1, 2), stepping 1 across and 3 up, and a shallow downhill line through (0, 3) and (5, 0)
Source: Drawing linear graphs by Save My Exams
  • Alternatively start at (0, c) and step out the gradient, going one right and m up each time, down instead if m is negative
  • For a gradient written as a fraction, step across by the bottom number and up by the top number
A shallow uphill line on a grid through (0, −1) and (3, 1), with a dashed triangle showing 3 across against 2 up, giving a gradient of two thirds
Source: Gradient of a line by Save My Exams

From the ax + by = c form

  • A quicker route for this form is to find where the line meets each axis
  • Substitute x = 0 to get the point on the y-axis, then y = 0 to get the point on the x-axis
  • Join those two points and extend the line across the grid
    • For 3x + 4y = 24, setting x = 0 gives (0, 6) and setting y = 0 gives (8, 0)

Worked example

Drawing a line two ways

Draw y = 2x + 3 for x from −1 to 2, and draw 3x + 2y = 12.

Solution:

  • For the first, build a short table of values
  • x = −1 gives y = 1; x = 0 gives 3; x = 1 gives 5; x = 2 gives 7
  • Plot (−1, 1), (0, 3), (1, 5) and (2, 7), and join them with a ruled line
  • For the second, the cover-up method is quicker than rearranging
  • Setting x = 0 gives 2y = 12, so y = 6 and the line passes through (0, 6)
  • Setting y = 0 gives 3x = 12, so x = 4 and the line passes through (4, 0)
  • Plot those two intercepts and rule the line through them
  • Two points fix a straight line, but a third is worth plotting as a check
A grid from x = −1 to 5 and y = −2 to 8 with both lines drawn: y = 2x + 3 ruled through the crosses at (−1, 1), (0, 3), (1, 5) and (2, 7), and 3x + 2y = 12 ruled across the grid through the crosses at (0, 6) and (4, 0)

4. Finding the equation of a line

From a graph

A downhill line crossing the y-axis at 5 and the x-axis at 10, with a red right-angled triangle marking 4 down against 8 across between (2, 4) and (10, 0), so the gradient is −0.5
Source: Finding equations of straight lines by Save My Exams
  • Work out the gradient from a triangle, then read where the line crosses the y-axis
  • Put both numbers into y = mx + c and write the equation out
  • If the crossing point is off the edge of the grid, use a point the line does pass through instead

From a gradient and a point

  • Write y = mx + c with the gradient filled in and c left as a letter
  • Substitute the coordinates of the known point and solve the resulting equation for c
  • Rewrite the equation with that value in place

Worked example

A gradient and one point

Find the equation of the line with gradient 5 that passes through (3, 7). Give your answer in the form y = mx + c.

Solution:

  • Start from y = 5x + c
  • Substitute x = 3 and y = 7: 7 = 5 × 3 + c
  • So 7 = 15 + c
  • Subtract 15: c = −8
  • The equation is y = 5x − 8

5. Parallel lines

Same gradient, different intercept

  • Two different lines are parallel exactly when their gradients are equal (or both are vertical), and they then never meet
  • y = 7x + 2 and y = 7x − 5 are parallel; y = 7x + 2 and y = 4x + 2 are not
  • Check by rearranging both equations into y = mx + c first, since a shared gradient can be hidden by the form
  • To find the equation of a line parallel to a given one, copy the gradient across and then find the new intercept from the point you are given

Worked example

Parallel through a given point

A line is parallel to y = 7x + 2 and passes through (3, 8). Find its equation.

Solution:

  • Parallel means the same gradient, so the new line is y = 7x + c
  • Substitute x = 3 and y = 8: 8 = 21 + c
  • Subtract 21: c = −13
  • The line is y = 7x − 13

6. Perpendicular lines

Negative reciprocal gradients

  • Two lines are perpendicular when they cross at a right angle
  • Their gradients multiply to give −1, so each is the negative reciprocal of the other
    • 4 pairs with −0.25, and ⅔ pairs with −1.5
  • To turn one gradient into the other, flip the fraction over and change the sign
  • Rearrange both equations to y = mx + c before comparing, otherwise the gradients cannot be read
  • The special case is a horizontal and a vertical line: y = c and x = k are perpendicular, and this is the one pair whose gradients cannot be multiplied

Building the equation

  • Rearrange the given line and read its gradient
  • Take the negative reciprocal to get the gradient of the new line
  • Substitute the point you are given to find c, exactly as for a parallel line

Worked example

Perpendicular through a given point

A line passes through (6, 1) and is perpendicular to y = ⅔x + 4. Find its equation. Give your answer in the form y = mx + c.

Solution:

  • The given gradient is ⅔
  • Flip it and change the sign: the new gradient is −1.5
  • Check: ⅔ × (−1.5) = −1
  • Start from y = −1.5x + c
  • Substitute x = 6 and y = 1: 1 = −9 + c
  • Add 9: c = 10
  • The equation is y = −1.5x + 10

The perpendicular bisector

  • Bisecting a segment at right angles means passing through its midpoint at 90°, and the line that does so is its perpendicular bisector
  • It needs both skills together: the midpoint gives the point it passes through, and the negative reciprocal gives its gradient
  • Find the midpoint, find the gradient of the segment, flip and negate that gradient, then substitute the midpoint to find c

Exam tip

Write each step of a perpendicular line

Perpendicular lines, including perpendicular bisectors, are set in 8 of the 21 papers. Write the first gradient, then −1 ÷ it, then the point substituted into y = mx + c, each on its own line. In all eight schemes the last two lines earn a method mark each, and the substitution mark follows through from your own perpendicular gradient, so an early slip does not cost it. A gradient worked out from two points earns its own mark too.

Worked example

Perpendicular bisector of a segment

Find an equation for the perpendicular bisector of the segment from P(2, −1) to Q(10, 5).

Solution:

  • Midpoint: ((2 + 10) ÷ 2, (−1 + 5) ÷ 2) = (6, 2)
  • Gradient of PQ: (5 − (−1)) ÷ (10 − 2) = 6 ÷ 8 = 0.75
  • Negative reciprocal: −4 ÷ 3
  • Start from y = (−4 ÷ 3)x + c
  • Substitute (6, 2): 2 = −8 + c, so c = 10
  • The perpendicular bisector is y = (−4 ÷ 3)x + 10