2.1 · SLPaper 1Paper 2

Straight-line equations

29 min read

In a minute

A straight line is fixed by its and one point on it. You'll write lines in three forms, find where they cross the axes, and use gradients to spot parallel and . In a model the gradient is a rate of change; on a road or ramp it measures steepness.

You'll be able to

  • Find the of a line from two points, and say what it means in context, with units.
  • Write a line in , or form, and convert between them.
  • Find where a line crosses the axes, and interpret the gradient and intercepts of a linear model.
  • Use m1=m2m_{1} = m_{2} for parallel lines and m1×m2=−1m_{1} \times m_{2} = -1 for perpendicular lines.
  • Calculate the gradient of a real incline such as a road, ramp or bridge.
Before you start2 quick questions on what this builds on
Check yourself
Make yy the subject of 6x+3y=126x + 3y = 12.
Check yourself
Work out −7−25−(−1)\dfrac{-7 - 2}{5 - (-1)}.

The gradient of a line

A rainwater tank drains steadily, losing the same volume every minute, so its graph against time is a straight line. That fixed rate of change is the line's , written mm.

Between any two points on a line, the change in yy (the rise) divided by the change in xx (the run) is the same.

In the formula booklet
m=y2−y1x2−x1m = \frac{y_{2} - y_{1}}{x_{2} - x_{1}}

This formula is in the formula booklet. Subtract in the same order on the top and the bottom: point 2 minus point 1 both times.

If m>0m > 0 the line rises from left to right. If m<0m < 0 it falls. A bigger ∣m∣\lvert m\rvert means a steeper line.

In a model, the gradient is a rate. Its units are the units of yy per unit of xx, such as litres per minute or dollars per kilometre.

Worked exampleA rainwater tank is emptied at a constant rate. After 44 minutes it holds 610610 litres, and after 1010 minutes it holds 385385 litres. (a) Find the gradient of the graph of volume against time. (b) Interpret the gradient in context.

Try it first, then reveal one step at a time.

  1. Write each reading as (time, volume): (4,610)(4, 610) and (10,385)(10, 385).
Worked exampleOn a park map, a straight cycle path passes through A(−4,7)\text{A}(-4, 7) and B(6,2)\text{B}(6, 2). The point C(12,k)\text{C}(12, k) is also on the path. Find kk.

Try it first, then reveal one step at a time.

  1. Gradient from A and B: m=2−76−(−4)=−510=−0.5m = \frac{2 - 7}{6 - (-4)} = \frac{-5}{10} = -0.5.
Check yourself
Find the gradient of the line through (−3,−2)(-3, -2) and (5,4)(5, 4).

A horizontal line has no rise, so m=0m = 0 and its equation is y=cy = c. A vertical line has no run, so its gradient is undefined. Its equation is x=hx = h, where hh is the xx-value every point shares.

Check yourself
On a site plan, two fence posts stand at (−2,3)(-2, 3) and (−2,11)(-2, 11). Find the equation of the straight fence through them.

Three forms of a line

A line is fixed once you know its and one point on it. Each of the three forms below stores that information in its own way.

In the formula booklet
y=mx+c;ax+by+d=0;y−y1=m(x−x1)y = mx + c; \quad ax + by + d = 0; \quad y - y_{1} = m(x - x_{1})

All three are in the formula booklet. You need to know what each one shows.

1. , y=mx+cy = mx + c. The gradient is mm, and the line crosses the yy-axis at (0,c)(0, c).

2. , ax+by+d=0ax + by + d = 0. Every term is on one side. Questions often ask for aa, bb and dd to be integers.

3. , y−y1=m(x−x1)y - y_{1} = m(x - x_{1}). Put in the gradient and any one point (x1,y1)(x_{1}, y_{1}) on the line. It is the quickest form to write down.

To convert, rearrange. From the general form, make yy the subject: 6x+4y−20=06x + 4y - 20 = 0 gives 4y=−6x+204y = -6x + 20, so y=−1.5x+5y = -1.5x + 5.

So for ax+by+d=0ax + by + d = 0 with b≠0b \neq 0, the gradient is −ab-\frac{a}{b}. If b=0b = 0 the line is vertical, such as x−3=0x - 3 = 0. Of the three forms, only the general form can describe a vertical line.

Worked exampleA plumber charges a fixed call-out fee plus 4545 dollars per hour. A 2.52.5-hour job costs 142.50142.50 dollars. Let yy be the cost in dollars of a job lasting xx hours. (a) Write down the equation of the line in point-gradient form. (b) Write it in the form y=mx+cy = mx + c, and interpret cc.

Try it first, then reveal one step at a time.

  1. The hourly rate is the gradient, so m=45m = 45. The job gives the point (2.5,142.5)(2.5, 142.5) on the line.
Worked exampleFind the equation of the line through A(1,−4)\text{A}(1, -4) and B(7,5)\text{B}(7, 5). Give it in the form ax+by+d=0ax + by + d = 0, where a,b,d∈Za, b, d \in \mathbb{Z}.

Try it first, then reveal one step at a time.

  1. Gradient first: m=5−(−4)7−1=96=32m = \frac{5 - (-4)}{7 - 1} = \frac{9}{6} = \frac{3}{2}.
Check yourself
Write y=25x−3y = \frac{2}{5}x - 3 in the form ax+by+d=0ax + by + d = 0, where a,b,d∈Za, b, d \in \mathbb{Z}.
Check yourself
Write down the equation of the line through (4,−9)(4, -9) with gradient −2-2, in point-gradient form.

Intercepts and linear models

The is where a line meets the yy-axis, so put x=0x = 0. The is where it meets the xx-axis, so put y=0y = 0.

In a model, the is the rate of change. The yy-intercept is the value when x=0x = 0, such as a starting amount or a fixed charge. The xx-intercept is often when something runs out.

Worked exampleA cycling club spends exactly 8080 dollars on bike hire. E-bikes cost 88 dollars an hour and standard bikes 55 dollars an hour. With xx hours of e-bike hire and yy hours of standard bike hire, 8x+5y−80=08x + 5y - 80 = 0. (a) Find both intercepts and interpret them. (b) Find the gradient and interpret it.

Try it first, then reveal one step at a time.

  1. (a) xx-intercept: put y=0y = 0. Then 8x−80=08x - 80 = 0, so x=10x = 10, the point (10,0)(10, 0). The club can hire e-bikes for 1010 hours if it hires no standard bikes.
Worked exampleA glacier was 7.347.34 km long in 2005 and 6.516.51 km long in 2019. A linear model L=mt+cL = mt + c gives its length, LL km, tt years after 2000. (a) Find mm and interpret it. (b) Find the model, with values to 3 s.f. (c) Use the model to estimate the length in 2030. (d) Comment on using the model for the year 2150.

Try it first, then reveal one step at a time.

  1. The data give the points (5,7.34)(5, 7.34) and (19,6.51)(19, 6.51). (a) m=6.51−7.3419−5=−0.8314=−0.059285…m = \frac{6.51 - 7.34}{19 - 5} = \frac{-0.83}{14} = -0.059285\ldots km per year. Store it; don't round yet.
Check yourself
A phone's battery charge, BB %, after tt hours of streaming video is modelled by B=92−14.5tB = 92 - 14.5t. Find how many hours of streaming the model allows before the battery is flat. Give your answer to 3 s.f.
Check yourself
The air temperature, T ∘CT\,^{\circ}\mathrm{C}, at a height of hh km above a town is modelled by T=18−6.5hT = 18 - 6.5h. What does −6.5-6.5 represent?

Parallel and perpendicular lines

Parallel lines never meet, so they must climb at the same rate. Two non-vertical lines are parallel when their are equal.

meet at a right angle. Turn a line's rise-and-run triangle through 90∘90^{\circ}. The rise and the run swap places, and one of them changes sign.

Perpendicular lines with gradients three quarters and minus four thirds, each shown by its rise and run triangle 4 3 4 3 gradient 3/4 gradient −4/3
Turning the triangle through 90∘90^{\circ} turns gradient 34\frac{3}{4} into −43-\frac{4}{3}.
Learn this
m1=m2m1×m2=−1m_{1} = m_{2} \qquad m_{1} \times m_{2} = -1

So a perpendicular gradient is the negative reciprocal: flip the fraction and change its sign. 34\frac{3}{4} becomes −43-\frac{4}{3}, and −5-5 becomes 15\frac{1}{5}.

The product rule needs both gradients to exist. A horizontal line (m=0m = 0) and a vertical line are perpendicular, even though 00 has no reciprocal.

Worked exampleOn a map, with units in km, a railway follows the line 2x−5y+15=02x - 5y + 15 = 0. A new road will run parallel to the railway through a village at V(10,1)\text{V}(10, 1). Find the equation of the road in the form y=mx+cy = mx + c.

Try it first, then reveal one step at a time.

  1. Railway gradient: 5y=2x+155y = 2x + 15, so y=0.4x+3y = 0.4x + 3 and m=0.4m = 0.4.
Worked exampleIn a park plan, with units of 1010 m, path A follows y=1.6x−2.3y = 1.6x - 2.3. Path B starts at a fountain at F(8,3)\text{F}(8, 3) and meets path A at right angles, at the point M. Use your calculator to find the coordinates of M. Give your answers to 3 s.f.

Try it first, then reveal one step at a time.

  1. Path A has gradient 1.61.6, so path B has gradient −11.6=−0.625-\frac{1}{1.6} = -0.625. Check: 1.6×(−0.625)=−11.6 \times (-0.625) = -1.
Check yourself
On a site plan, a straight wall follows 3x+7y−2=03x + 7y - 2 = 0. A drain pipe leaves the wall at right angles. Find the gradient of the pipe.
Check yourself
Two taxi firms charge C=2.2d+4C = 2.2d + 4 and C=2.2d+6.5C = 2.2d + 6.5 dollars for a trip of dd km. Which statement is true?

Gradients of real slopes

Engineers describe the steepness of roads, ramps and bridges by their . It is the same idea: vertical rise divided by horizontal distance.

A sloping road as the hypotenuse of a right-angled triangle, with the vertical rise and the horizontal distance as the other two sides horizontal distance (the run) vertical rise length along the road gradient = vertical rise ÷ horizontal distance
The length along the road is the hypotenuse, not the run.
Learn this
gradient=vertical risehorizontal distance\text{gradient} = \frac{\text{vertical rise}}{\text{horizontal distance}}

Road signs often give a gradient as a percentage. A 10%10\% gradient rises 1010 m for every 100100 m across, so m=0.1m = 0.1.

Ramps are often described as "1 in 12". That means a rise of 11 for every 1212 across, so m=112m = \frac{1}{12}.

Worked exampleA ramp to a school entrance rises 0.720.72 m over a horizontal distance of 99 m. A building guideline says a ramp must be no steeper than 1 in 12. (a) Find the gradient as a decimal and as a percentage. (b) Does the ramp meet the guideline?

Try it first, then reveal one step at a time.

  1. (a) m=0.729=0.08m = \frac{0.72}{9} = 0.08, which is an 8%8\% gradient.
Worked exampleA straight mountain road climbs from 12401240 m to 13951395 m above sea level. Its length, measured along the road, is 2.32.3 km. Find the gradient of the road. Give your answer to 3 s.f.

Try it first, then reveal one step at a time.

  1. Rise: 1395−1240=1551395 - 1240 = 155 m. Use metres throughout: 2.32.3 km =2300= 2300 m.
Check yourself
A straight bridge deck is 14.214.2 m above the river at one end and 16.016.0 m above it at the other. The ends are 120120 m apart horizontally. Find the gradient of the deck as a percentage.
Check yourself
A straight road has a constant gradient of 8%8\%. It climbs 150150 m. Find the horizontal distance it covers, in metres.

Common mistakes

  • Subtracting in a different order on the top and the bottom, such as y2−y1x1−x2\frac{y_{2} - y_{1}}{x_{1} - x_{2}}. That flips the sign of the gradient. Take point 2 minus point 1 in both places.
  • Reading the gradient of ax+by+d=0ax + by + d = 0 as aa. Make yy the subject first: the gradient is −ab-\frac{a}{b}.
  • Only flipping, or only changing the sign, for a perpendicular gradient. Do both, then check that the product is −1-1.
  • Giving an expression such as 0.4x−30.4x - 3 as the equation, or cutting values short. Write y=0.4x−3y = 0.4x - 3, with values exact or to 3 s.f.
  • Interpreting a gradient with no units or context. Say what changes, by how much, per unit: "the tank loses 37.5 litres per minute".

Exam tips

  • "Write down the gradient" needs no working when the line is in the form y=mx+cy = mx + c. From the general form, show the rearrangement first.
  • If a question asks for the form y=mx+cy = mx + c, point-gradient form alone loses the final mark. Rearrange it.
  • When you use your GDC, write down the equations you put into it, then give the coordinates to 3 s.f. Keep stored values; never retype rounded ones.

Key takeaways

In bookletm=y2−y1x2−x1m = \frac{y_{2} - y_{1}}{x_{2} - x_{1}}
In booklety=mx+c;ax+by+d=0;y−y1=m(x−x1)y = mx + c; \quad ax + by + d = 0; \quad y - y_{1} = m(x - x_{1})
Learn thisFor ax+by+d=0ax + by + d = 0 with b≠0b \neq 0, the gradient is −ab-\frac{a}{b}. Make yy the subject to see it.
Learn thisHorizontal lines are y=cy = c, with m=0m = 0. Vertical lines are x=hx = h: the gradient is undefined, so they have no y=mx+cy = mx + c form.
Learn thisyy-intercept: put x=0x = 0. xx-intercept: put y=0y = 0. In a linear model the gradient is a rate (units of yy per unit of xx) and the yy-intercept is the value when x=0x = 0.
Learn thisTwo non-vertical lines are parallel (or the same line) if m1=m2m_{1} = m_{2}, and perpendicular if m1×m2=−1m_{1} \times m_{2} = -1: flip the gradient and change its sign. A horizontal and a vertical line are perpendicular.
Learn thisReal slopes: gradient == vertical rise ÷\div horizontal distance, not the length along the slope. A p%p\% gradient means m=p100m = \frac{p}{100}.

Practise this

6 past-paper questions on Linear functions and graphs in the AI HL bank, each with a mark scheme and a worked explanation.

Practise Linear functions and graphs →