2.1 Equations of straight lines

2.1 Equations of straight lines

IB Maths: Analysis and Approaches HL: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • Three forms: y=mx+cy=mx+c, ax+by+d=0ax+by+d=0 and y−y1=m(x−x1)y-y_1=m(x-x_1).
  • The gradient is m=y2−y1x2−x1m=\frac{y_2-y_1}{x_2-x_1}; find intercepts by setting x=0x=0 or y=0y=0.
  • Parallel lines have m1=m2m_1=m_2; perpendicular lines have m1m2=−1m_1m_2=-1.
  • The shortest distance from a point to a line is along the perpendicular.
  • In context, gradient is the vertical change divided by the horizontal change, in the same units.

Three forms of a line

A line can be written in gradient–intercept, general or point–gradient form; they all describe the same line.

Gradient–intercept: y=mx+cy=mx+c, with gradient mm and yy-intercept cc. General form: ax+by+d=0ax+by+d=0, often with integer a,b,da,b,d. Point–gradient: y−y1=m(x−x1)y-y_1=m(x-x_1).

For 3x−4y+12=03x-4y+12=0, make yy the subject: y=34x+3y=\frac34x+3. The gradient is 34\frac34, not 33. Drag the sliders: mm tilts the line, cc slides it.

−6−4−2246−6−4−2246xyy = mx + c
y=mx+cy=mx+c: mm tilts the line, cc slides it up or down.

Gradient–intercept

  • y=mx+cy=mx+c
  • Read mm and cc

General

  • ax+by+d=0ax+by+d=0
  • Integer coefficients

Point–gradient

  • y−y1=m(x−x1)y-y_1=m(x-x_1)
  • Gradient and one point

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

Gradient and intercepts

The gradient is the change in yy over the change in xx; intercepts come from setting x=0x=0 or y=0y=0.

Through (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2), m=y2−y1x2−x1m=\frac{y_2-y_1}{x_2-x_1}. A positive gradient slopes up to the right; a negative one slopes down. Subtract in the same order top and bottom.

The yy-intercept is found by setting x=0x=0; the xx-intercept by setting y=0y=0. For y=−2x+1y=-2x+1 these are 11 and 12\frac12.

run = 4rise = 3ABC
Rise 3, run 4: the gradient from A to B is ¾.

Worked example

Find the gradient of the line through A(1,2)A(1,2) and B(5,5)B(5,5).

−3−2−1123−4−224xy(0, 1)(½, 0)y = −2x + 1
y=−2x+1y=-2x+1 meets the axes at (0,1)(0,1) and (12,0)(\frac12,0).

Find the gradient of the line through (2,7)(2,7) and (6,−1)(6,-1).

Parallel and perpendicular

Parallel lines have equal gradients; perpendicular gradients multiply to −1-1.

Lines with gradients m1m_1 and m2m_2 are parallel if m1=m2m_1=m_2 and perpendicular if m1m2=−1m_1m_2=-1, so m2=−1m1m_2=-\frac1{m_1}, the negative reciprocal. The perpendicular to y=34x+3y=\frac34x+3 has gradient −43-\frac43.

To show lines are perpendicular, find both gradients, show the product is −1-1, and say so in words.

m = ¾m = −4/3OPQ
Gradients ¾ and −4/3 multiply to −1: a right angle at O.

Worked example

Find the line perpendicular to y=34x+3y=\frac34x+3 through (6,−1)(6,-1), in the form ax+by+d=0ax+by+d=0.

A line has gradient −25-\frac25. What is the gradient of a perpendicular line?

Intersections and shortest distance

Go along the perpendicular through the point, find where it meets the line, then use the distance formula.

A point lies on a line if its coordinates satisfy the equation. Two lines meet where their equations hold together, so solve them simultaneously.

The shortest distance is measured along the perpendicular. Find the foot of the perpendicular, then use (x2−x1)2+(y2−y1)2\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}.

6.8ABPF
The shortest distance from P to line AB is PF, which is 6.8.

Worked example

Find the shortest distance from P(6,−1)P(6,-1) to y=34x+3y=\frac34x+3.

Along which line is the shortest distance from a point to a line measured?

Gradients in context

A real gradient is vertical change over horizontal change, often given as a percentage.

A road rising 84 m over a horizontal 1200 m has gradient 841200=0.07\frac{84}{1200}=0.07, a 7%7\% gradient. Always use the horizontal distance and consistent units.

In a model y=mx+cy=mx+c, mm is the rate of change (metres of height per metre travelled) and cc is the starting value.

2004006008001000120020406080100xy(1200, 84)y = 0.07x
A road rising 84 m over 1200 m of horizontal distance: y = 0.07x, a 7% gradient.
  • Percentage gradientverticalhorizontal×100%\dfrac{\text{vertical}}{\text{horizontal}}\times100\%

Worked example

A path rises 150 m over a horizontal distance of 2.5 km. Find its percentage gradient.

A road rises 30 m over a horizontal 600 m. What is its percentage gradient?

Try an exam question

Find the equation of the line perpendicular to y=34x+3y=\frac34x+3 that passes through the point (6,−1)(6,-1). Give your answer in the form ax+by+d=0ax+by+d=0, where a,b,d∈Za,b,d\in\mathbb Z.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find the gradient of L1L_1.

1 mark, marked against the mark scheme

Revision notes