2.1 · SLPaper 1Paper 2

Straight-line equations

25 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 tell parallel from perpendicular lines by their gradients. Tangents, normals and linear models later in the course all rely on this.

You'll be able to

  • Find the of a line from two points, and recognise horizontal and vertical lines.
  • Write a line in gradient–intercept, general or point–gradient form, and convert between them.
  • Find where a line crosses the xx-axis and the yy-axis.
  • Use m1=m2m_{1} = m_{2} for parallel lines and m1×m2=−1m_{1} \times m_{2} = -1 for perpendicular lines.
  • Work out the gradient of a real slope such as a ramp, road or bridge.
Before you start3 quick questions on what this builds on
Check yourself
The point (a,5)(a, 5) lies on the line y=3x−7y = 3x - 7. Find aa.
Check yourself
Make yy the subject of 4x−2y=64x - 2y = 6.
Check yourself
Work out −3−52−(−2)\dfrac{-3 - 5}{2 - (-2)}.

The gradient of a line

Walk along a straight line from left to right. For every step across, you go up (or down) by the same amount. That fixed rate is the line's , written mm.

Between any two points on the line, the change in yy is the rise and the change in xx is the run. Rise divided by run is the same for every pair of points.

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.

The sign tells you the direction. If m>0m > 0 the line rises to the right. If m<0m < 0 it falls. A bigger ∣m∣\lvert m\rvert means a steeper line.

Worked exampleFind the gradient of the line through A(−3,5)\text{A}(-3, 5) and B(1,−7)\text{B}(1, -7).

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

  1. Label the points: (x1,y1)=(−3,5)(x_{1}, y_{1}) = (-3, 5) and (x2,y2)=(1,−7)(x_{2}, y_{2}) = (1, -7).
Worked exampleThe line through P(2,k)\text{P}(2, k) and Q(k,14)\text{Q}(k, 14) has gradient 33. Find the value of kk.

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

  1. Write the gradient with the unknown in it: m=14−kk−2m = \frac{14 - k}{k - 2}.
Check yourself
Find the gradient of the line through (−2,1)(-2, 1) and (4,−8)(4, -8).

A horizontal line has no rise, so m=0m = 0 and its equation is y=cy = c: that is y=mx+cy = mx + c with m=0m = 0. A vertical line has no run, so its gradient is undefined. Every point on it has the same xx, so its equation is x=hx = h, where hh is that shared xx-value.

Check yourself
Find the equation of the line through (3,−1)(3, -1) and (3,6)(3, 6).

Three forms of a line, and its intercepts

A line is fixed once you know its and one point on it. The three forms below just store that information in different ways.

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})

These are in the formula booklet. You do need to know what each one shows.

1. Gradient–intercept form, y=mx+cy = mx + c. The gradient is mm. The line crosses the yy-axis at (0,c)(0, c), because x=0x = 0 gives y=cy = c.

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

3. Point–gradient form, y−y1=m(x−x1)y - y_{1} = m(x - x_{1}). It uses one point (x1,y1)(x_{1}, y_{1}) and the gradient mm. It is the fastest way to write down a line.

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

Worked exampleFind the equation of the line through (4,−1)(4, -1) with gradient −32-\frac{3}{2}. Give it in the form y=mx+cy = mx + c.

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

  1. Use point–gradient form with x1=4x_{1} = 4, y1=−1y_{1} = -1 and m=−32m = -\frac{3}{2}: y−(−1)=−32(x−4)y - (-1) = -\frac{3}{2}(x - 4).
Worked exampleFind the equation of the line through A(−2,−3)\text{A}(-2, -3) and B(4,1)\text{B}(4, 1). 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=1−(−3)4−(−2)=46=23m = \frac{1 - (-3)}{4 - (-2)} = \frac{4}{6} = \frac{2}{3}.
Check yourself
Write y=−34x+2y = -\frac{3}{4}x + 2 in the form ax+by+d=0ax + by + d = 0, where a,b,d∈Za, b, d \in \mathbb{Z}.

To read the gradient from the general form, make yy the subject. From ax+by+d=0ax + by + d = 0 you get y=−abx−dby = -\frac{a}{b}x - \frac{d}{b}, so the gradient is −ab-\frac{a}{b}.

For example, 5x−2y+10=05x - 2y + 10 = 0 gives 2y=5x+102y = 5x + 10, so y=52x+5y = \frac{5}{2}x + 5. Its gradient is 52\frac{5}{2} and its yy-intercept is 55.

Worked exampleThe line 3x+4y−24=03x + 4y - 24 = 0 meets the xx-axis at A and the yy-axis at B. O is the origin. Find the area of triangle OAB.

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

  1. For A, put y=0y = 0: 3x−24=03x - 24 = 0, so x=8x = 8 and A is (8,0)(8, 0).
Check yourself
Find the xx-coordinate of the point where the line 2x+5y−7=02x + 5y - 7 = 0 meets the xx-axis.

Parallel and perpendicular lines

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

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

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

So a perpendicular gradient is the : flip the fraction and change the sign. 23\frac{2}{3} becomes −32-\frac{3}{2}, and −4-4 becomes 14\frac{1}{4}.

The 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 exampleFind the equation of the line parallel to 4x+2y−3=04x + 2y - 3 = 0 that passes through (3,1)(3, 1). Give it in the form y=mx+cy = mx + c.

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

  1. Find the given line's gradient. 2y=−4x+32y = -4x + 3, so y=−2x+32y = -2x + \frac{3}{2} and m=−2m = -2.
Worked exampleA is (−1,2)(-1, 2) and B is (5,6)(5, 6). The perpendicular bisector of AB is the line through the midpoint of AB at right angles to AB. Find its equation 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. Midpoint of AB: (−1+52,2+62)=(2,4)\left(\frac{-1 + 5}{2}, \frac{2 + 6}{2}\right) = (2, 4). The midpoint formula is in the prior-learning part of the booklet.
Check yourself
Find the gradient of a line perpendicular to 2x−5y+1=02x - 5y + 1 = 0.

On Paper 2 the numbers can be awkward. Write the two equations down, then let your calculator find where the lines meet.

Worked exampleThe line L1L_{1} has equation y=0.6x+2.4y = 0.6x + 2.4. The line L2L_{2} passes through P(7,1)\text{P}(7, 1) and is perpendicular to L1L_{1}. Use your calculator to find the point where L1L_{1} and L2L_{2} meet. Give your answers to 3 s.f.

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

  1. Gradient of L1L_{1}: 0.6=350.6 = \frac{3}{5}. So L2L_{2} has gradient −53-\frac{5}{3}.
Check yourself
Are the lines 3x−6y+2=03x - 6y + 2 = 0 and y=−2x+1y = -2x + 1 parallel, perpendicular or neither?

Gradients of real slopes

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

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 means a rise of 1010 m for every 100100 m across, so m=0.1m = 0.1.

Worked exampleA wheelchair ramp rises 0.450.45 m over a horizontal distance of 5.45.4 m. Find its gradient as a fraction in its simplest form.

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

  1. Rise =0.45= 0.45 m and horizontal distance =5.4= 5.4 m.
Worked exampleA straight mountain road climbs 8484 m in height. Its length, measured along the road surface, is 1.21.2 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. Use the same units: 1.21.2 km =1200= 1200 m.
Check yourself
A road sign warns of a 12%12\% gradient. How many metres does the road rise over a horizontal distance of 250250 m?
Check yourself
Ramp A rises 0.60.6 m over a horizontal distance of 7.57.5 m. Ramp B rises 0.50.5 m over a horizontal distance of 66 m. Which ramp is steeper?

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.
  • Putting the run on top. The gradient is rise over run, change in yy divided by change in xx.
  • 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}.
  • Taking only the reciprocal, or only the negative, for a perpendicular gradient. Do both, then check that the product is −1-1.
  • Setting x=0x = 0 to find the xx-intercept. On the xx-axis it is yy that is zero.
  • Using the length along a slope as the run. A real gradient divides by the horizontal distance.

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.
  • "Find the equation of the line" asks for an equation, such as y=−2x+7y = -2x + 7, not just the expression −2x+7-2x + 7. Any correct form earns the marks unless the question names one. If it says a,b,d∈Za, b, d \in \mathbb{Z}, clear every fraction.
  • On Paper 1, keep gradients as exact fractions like 23\frac{2}{3}. A rounded 0.6670.667 makes the rest of the line inexact.
  • On Paper 2, write down the equations you put into your calculator before giving the point where lines meet. Give the coordinates to 3 s.f.

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 thism1=m2m1×m2=−1m_{1} = m_{2} \qquad m_{1} \times m_{2} = -1
Learn thisgradient=vertical risehorizontal distance\text{gradient} = \frac{\text{vertical rise}}{\text{horizontal distance}}
Learn thisIn ax+by+d=0ax + by + d = 0 the gradient is −ab-\frac{a}{b}. Make yy the subject to see it.
Learn thisyy-intercept: put x=0x = 0. xx-intercept: put y=0y = 0.
Learn thisHorizontal lines are y=cy = c with m=0m = 0. Vertical lines are x=hx = h, with no gradient.
Learn thisParallel: m1=m2m_{1} = m_{2}. Perpendicular: m1×m2=−1m_{1} \times m_{2} = -1, so flip the gradient and change its sign.
Learn thisReal slopes: gradient == vertical rise ÷\div horizontal distance. A p%p\% gradient means m=p100m = \frac{p}{100}.

Practise this

No HL questions on 2.1 yet; 1 in the SL bank.

Practise 2.1 →