2.1 Equation of a straight line

2.1 Equation of a straight line

IB Maths: Applications and Interpretation HL: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • Gradient m=y2−y1x2−x1m=\frac{y_2-y_1}{x_2-x_1}: rise over run.
  • Three forms: y=mx+cy=mx+c, y−y1=m(x−x1)y-y_1=m(x-x_1) and ax+by+d=0ax+by+d=0.
  • The yy-intercept sets x=0x=0; the xx-intercept (the zero) sets y=0y=0.
  • Parallel lines have m1=m2m_1=m_2; perpendicular lines have m1m2=−1m_1m_2=-1.
  • In a linear model the gradient is the rate of change and cc is the starting value.
−3−2−1123456−224681012xy(−1, 0)(0, 2)A(1, 4)B(5, 12)y = 2x + 2
The line y = 2x + 2 through A(1, 4) has gradient 2.

Gradient

The gradient is the change in yy for each one-unit change in xx.

For points (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2):

m=y2−y1x2−x1=riserunm=\frac{y_2-y_1}{x_2-x_1}=\frac{\text{rise}}{\text{run}}

A positive gradient slopes up from left to right, a negative one slopes down, 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=\frac{12-4}{5-1}=2.

48ABC
For A(1, 4) and B(5, 12): rise 8 over run 4 gives a gradient of 2.
  • Gradient mmy2−y1x2−x1\dfrac{y_2-y_1}{x_2-x_1}

What is the gradient through (2,1)(2,1) and (4,9)(4,9)?

Forms of the equation

Use point-gradient when you know a point and the gradient, then convert to whichever form is asked.

  • Gradient-intercept: y=mx+cy=mx+c.
  • Point-gradient: y−y1=m(x−x1)y-y_1=m(x-x_1).
  • General: ax+by+d=0ax+by+d=0, usually with integer coefficients.

Through A(1,4)A(1,4) with m=2m=2: y−4=2(x−1)y-4=2(x-1), so y=2x+2y=2x+2, or 2x−y+2=02x-y+2=0.

To read the gradient from general form, rearrange: 3x+4y−24=03x+4y-24=0 gives y=−34x+6y=-\frac34x+6, so m=−abm=-\frac ab.

−2−1123456789−224681012xyA(1, 4)(0, 6)(8, 0)y = 2x + 23x + 4y − 24 = 0
The same line y = 2x + 2 through A(1, 4), and 3x + 4y − 24 = 0, which rearranges to y = −¾x + 6.

Gradient-intercept

Form:
y=mx+cy=mx+c
Use when you know:
Gradient and yy-intercept

Point-gradient

Form:
y−y1=m(x−x1)y-y_1=m(x-x_1)
Use when you know:
A point and the gradient

General

Form:
ax+by+d=0ax+by+d=0
Use when you know:
Integer coefficients

Worked example

Find the equation of the line through (3,−1)(3,-1) with gradient 44, in the form ax+by+d=0ax+by+d=0.

What is the gradient of 3x+4y−24=03x+4y-24=0?

Intercepts

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

The yy-intercept is where the line crosses the yy-axis (x=0x=0). The xx-intercept is where it crosses the xx-axis (y=0y=0); it is the zero of the function.

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

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

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

What is the xx-intercept of y=2x+6y=2x+6?

Parallel and perpendicular lines

Parallel lines share a gradient; perpendicular gradients multiply to −1-1.

For gradients m1m_1 and m2m_2:

  • Parallel: m1=m2m_1=m_2.
  • Perpendicular: m1×m2=−1m_1\times m_2=-1, so m2=−1m1m_2=-\frac{1}{m_1} (flip and change sign).

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

−2246810−2246810xy(2, 5)y = 2x + 1y = −½x + 6
y = 2x + 1 and y = −½x + 6 are perpendicular and meet at (2, 5).

Worked example

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

A line has gradient −13-\frac13. What gradient is perpendicular to it?

Gradients in context

A gradient is a rate of change, found as rise over run with both lengths in the same units.

A road rising 150 m over 2500 m horizontally has gradient 1502500=0.06\frac{150}{2500}=0.06, a 6% incline. Its angle is θ=tan⁡−1(m)\theta=\tan^{-1}(m).

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

  1. 1

    Same units

    2.5 km = 2500 m

  2. 2

    Gradient

    1502500=0.06\frac{150}{2500}=0.06

  3. 3

    Percentage

    6% incline

  4. 4

    Angle

    tan⁡−1(0.06)=3.43∘\tan^{-1}(0.06)=3.43^\circ

A road rises 150 m over 2.5 km

A taxi costs C=12+2.5nC=12+2.5n AED for nn km. What does the gradient 2.5 mean?

Try an exam question

The line L1L_1 passes through A(1,3)A(1,3) and B(5,11)B(5,11). (a) Find the gradient of L1L_1. (b) Find 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 (4,2)(4,2). 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