2.1 Equation of a straight line

2.1 Equation of a straight line

IB Maths: Applications and Interpretation SL: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • Gradient m=y2−y1x2−x1m=\dfrac{y_2-y_1}{x_2-x_1}: the rise over the run, using the same point first in both.
  • Three forms: gradient-intercept y=mx+cy=mx+c, point-gradient y−y1=m(x−x1)y-y_1=m(x-x_1) and general ax+by+d=0ax+by+d=0.
  • Set x=0x=0 for the yy-intercept and y=0y=0 for the xx-intercept.
  • Parallel lines have equal gradients; perpendicular gradients multiply to −1-1.
  • In a linear model the gradient is the rate of change and cc is the starting value.

Gradient from two points

The gradient is the change in yy for each one-unit change in xx: the rise divided by the run.

The gradient mm measures how steep a line is. A positive gradient slopes upwards (left to right), a negative gradient slopes downwards, a horizontal line has m=0m=0, and a vertical line has an undefined gradient.

For A(1,4)A(1,4) and B(5,12)B(5,12): m=12−45−1=2m=\dfrac{12-4}{5-1}=2, so yy rises by 2 for every 1 across.

run = 4rise = 8AB
A(1,4)A(1,4) and B(5,12)B(5,12): run =4=4, rise =8=8, so m=84=2m=\frac84=2.
  • Gradientm=y2−y1x2−x1=riserunm=\dfrac{y_2-y_1}{x_2-x_1}=\dfrac{\text{rise}}{\text{run}}

What is the gradient of the line through (0,5)(0,5) and (4,1)(4,1)?

Forms of the equation

Know three forms and convert between them: gradient-intercept, point-gradient and general.

Use gradient-intercept form y=mx+cy=mx+c when you know the gradient and the yy-intercept, and point-gradient form when you know a point and the gradient. General form has integer aa, bb, dd.

To find the gradient from general form, rearrange: 3x+4y−24=0⇒y=−34x+63x+4y-24=0\Rightarrow y=-\frac34x+6, so m=−34m=-\frac34. In general m=−abm=-\frac ab.

  • Gradient-intercepty=mx+cy=mx+c
  • Point-gradienty−y1=m(x−x1)y-y_1=m(x-x_1)
  • General formax+by+d=0ax+by+d=0
−5−4−3−2−112345−6−4−2246810xyy = mx + c
Changing mm rotates the line about its yy-intercept; changing cc moves it up or down.

Worked example

Find the equation of the line through A(1,4)A(1,4) with gradient 22, in three forms.

What is the gradient of 2x+5y−10=02x+5y-10=0?

Intercepts

Set x=0x=0 to find the yy-intercept and y=0y=0 to find the xx-intercept.

The yy-intercept is where the line crosses the yy-axis, so set x=0x=0. The xx-intercept is where it crosses the xx-axis, so set y=0y=0.

For 3x+4y−24=03x+4y-24=0: x=0x=0 gives y=6y=6, and y=0y=0 gives x=8x=8. The intercepts are (0,6)(0,6) and (8,0)(8,0).

In y=mx+cy=mx+c the yy-intercept is read straight from cc, and the xx-intercept is −cm-\frac cm.

−2246810−22468xy(0, 6)(8, 0)3x + 4y − 24 = 0
The line 3x+4y−24=03x+4y-24=0 crosses the axes at (0,6)(0,6) and (8,0)(8,0).

Where does y=2x−6y=2x-6 cross the xx-axis?

Parallel and perpendicular lines

Parallel lines share a gradient; for perpendicular lines, flip the fraction and change the sign.

Parallel lines never meet and have m1=m2m_1=m_2. Perpendicular lines meet at a right angle and have m1×m2=−1m_1\times m_2=-1, so m2=−1m1m_2=-\frac{1}{m_1}.

Example: a line perpendicular to y=−25x+1y=-\frac25x+1 has gradient 52\frac52.

−22468−22468xy(2, 5)y = 2x + 1y = −½x + 6
The lines y=2x+1y=2x+1 and y=−12x+6y=-\frac12x+6 meet at (2,5)(2,5) at a right angle.
  • Parallelm1=m2m_1=m_2
  • Perpendicularm1×m2=−1m_1\times m_2=-1

Worked example

Find the line through (2,5)(2,5) perpendicular to y=2x+1y=2x+1.

Which line is perpendicular to y=3x−2y=3x-2?

Gradients in context

In real slopes and linear models the gradient is a rate of change, with units of yy per unit of xx.

A mountain road that rises 150 m over a horizontal distance of 2500 m has gradient 1502500=0.06\frac{150}{2500}=0.06, a 6% incline: 6 m of climb per 100 m across. Both lengths must be in the same units.

In a linear model y=mx+cy=mx+c, the gradient is the rate of change (for example 60 m per km) and cc is the starting value when x=0x=0.

1234567891051015202530xy(0, 3)(4, 13)Fare (£) = 2.5d + 3
Illustrative taxi fare: the gradient 2.5 is the rate of change (£ per km) and the intercept 3 is the fixed charge (£)
  • Gradient of a slopevertical risehorizontal distance\dfrac{\text{vertical rise}}{\text{horizontal distance}}
  • Angle of inclineθ=tan⁡−1(m)\theta=\tan^{-1}(m)

A ramp rises 0.5 m over a horizontal distance of 6 m. What is its gradient?

Try an exam question

The line L1L_1 passes through A(1,4)A(1,4) and B(5,12)B(5,12). (a) Find the gradient of L1L_1. (b) Write the equation of L1L_1 in the form y=mx+cy=mx+c. (c) The line L2L_2 is perpendicular to L1L_1 and passes through (2,5)(2,5). Find the equation of L2L_2.

[5 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find the gradient of LL.

1 mark, marked against the mark scheme

Revision notes