Equations of straight lines

AS · P1 · 14 min

The equation of a line is a rule that every point on the line obeys and no other point does. Paper 1 expects you to find that rule from "sufficient information" (two points, or a point and a gradient), to move between the three standard forms, and to use lines to find intersections, perpendicular bisectors, feet of perpendiculars and areas. These skills appear in nearly every paper, either as a standalone question or as the first part of a circle or calculus question.

What an equation of a line means

A point (x,y)(x, y) lies on a line exactly when its coordinates satisfy the line's equation. So:

  • to check whether a point is on a line, substitute it in;
  • to find where two lines meet, find the point that satisfies both equations at once;
  • to find where a line meets an axis, put y=0y = 0 (for the xx-axis) or x=0x = 0 (for the yy-axis).

Every line that is not vertical has a gradient mm (see Length, gradient and midpoint), and its equation can be built from the gradient and one point.

The three forms

Gradient and one point

Suppose a line has gradient mm and passes through the fixed point (x1,y1)(x_1, y_1). Take any other point (x,y)(x, y) on the line. The gradient from (x1,y1)(x_1, y_1) to (x,y)(x, y) must be mm:

y−y1x−x1=m⇒y−y1=m(x−x1)\frac{y - y_1}{x - x_1} = m \quad\Rightarrow\quad y - y_1 = m(x - x_1)

This is the most useful form, because exam questions nearly always give you a point and a way to find the gradient.

Gradient and intercept

Choosing the point (0,c)(0, c), where the line crosses the yy-axis, gives y−c=m(x−0)y - c = m(x - 0), that is y=mx+cy = mx + c. Here cc is the yy-intercept. This form is best for reading off the gradient and for sketching.

The general form

Multiplying out and collecting everything on one side gives ax+by+c=0ax + by + c = 0. Questions often ask for this form "where aa, bb and cc are integers", which simply means clear the fractions.

Key result
FormWhen to use it
y−y1=m(x−x1)y - y_1 = m(x - x_1)you know a point and the gradient (the usual starting point)
y=mx+cy = mx + cyou want to read off the gradient or yy-intercept, or sketch
ax+by+c=0ax + by + c = 0the question asks for integer coefficients

To read the gradient from ax+by+c=0ax + by + c = 0, rearrange to y=−abx−cby = -\dfrac{a}{b}x - \dfrac{c}{b}, so the gradient is −ab-\dfrac{a}{b}.

Vertical lines have equations x=kx = k; horizontal lines have equations y=ky = k.

Finding the equation of a line
  1. Find the gradient mm: from two points, or from a parallel line (same mm), or from a perpendicular line (−1m-\tfrac{1}{m}).
  2. Choose a point on the line.
  3. Substitute into y−y1=m(x−x1)y - y_1 = m(x - x_1).
  4. Rearrange into the form asked for. If integer coefficients are wanted, multiply through by the denominator.
  5. Check: substitute your known point(s) back into the final equation.
y = -2x + 3 (-1, 5) (3, -3) (0, 3)

The line through (−1,5)(-1, 5) and (3,−3)(3, -3) has gradient −2-2 and yy-intercept 33: y=−2x+3y = -2x + 3, or 2x+y−3=02x + y - 3 = 0.

Perpendicular bisectors

The perpendicular bisector of ABAB is the line that passes through the midpoint of ABAB and is perpendicular to ABAB. Every point on it is the same distance from AA as from BB. That property makes it essential for circles: the centre of any circle through AA and BB lies on the perpendicular bisector of ABAB (see Circles).

Perpendicular bisector of AB
  1. Find the midpoint MM of ABAB.
  2. Find the gradient of ABAB, then the perpendicular gradient −1m-\tfrac{1}{m}.
  3. Use y−yM=−1m(x−xM)y - y_M = -\tfrac{1}{m}(x - x_M).

Intersections of two lines

Two lines that are not parallel meet at exactly one point. Solve their equations simultaneously, by substitution if one is already in the form y=…y = \ldots, and by elimination otherwise. Parallel lines (equal gradients, different intercepts) never meet: the simultaneous equations have no solution.

The foot of a perpendicular and the distance to a line

The shortest distance from a point CC to a line ll is measured along the perpendicular from CC to ll. The point NN where this perpendicular meets ll is called the foot of the perpendicular.

Foot of the perpendicular and shortest distance
  1. Find the gradient of ll, then the perpendicular gradient.
  2. Write the equation of the line through CC with the perpendicular gradient.
  3. Solve simultaneously with ll to find NN.
  4. The shortest distance from CC to ll is the length CNCN.

The same construction gives the reflection of CC in ll: the image C′C' is on the other side, with NN as the midpoint of CC′CC'.

y = 2x + 1 y = -0.5x + 3.5 (7, 0) (1, 3) (-5, 6)

In the figure, C(7,0)C(7, 0), the line y=2x+1y = 2x + 1, the foot N(1,3)N(1, 3) and the reflection C′(−5,6)C'(-5, 6).

Tip

There is a formula for the perpendicular distance from a point to a line, but it is not on the 9709 syllabus and is not in the formula list. The method above always works and shows the examiner every step.

Worked examples

Through two points

Find the equation of the line through A(−1,5)A(-1, 5) and B(3,−3)B(3, -3), giving your answer in the form ax+by+c=0ax + by + c = 0.

Solutionm=−3−53−(−1)=−84=−2m = \frac{-3 - 5}{3 - (-1)} = \frac{-8}{4} = -2

Using AA:

y−5=−2(x+1)⇒y−5=−2x−2⇒2x+y−3=0y - 5 = -2(x + 1) \quad\Rightarrow\quad y - 5 = -2x - 2 \quad\Rightarrow\quad 2x + y - 3 = 0

Check with BB: 2(3)+(−3)−3=02(3) + (-3) - 3 = 0. Correct.

Perpendicular to a given line

Find the equation of the line through (4,−1)(4, -1) that is perpendicular to 3x−2y=63x - 2y = 6.

Solution

Rearrange the given line: 2y=3x−62y = 3x - 6, so y=32x−3y = \tfrac{3}{2}x - 3, gradient 32\tfrac{3}{2}. The perpendicular gradient is −23-\tfrac{2}{3}.

y+1=−23(x−4)y + 1 = -\tfrac{2}{3}(x - 4)

Multiply by 33: 3y+3=−2x+83y + 3 = -2x + 8, so 2x+3y=52x + 3y = 5.

A perpendicular bisector

The points PP and QQ are (2,1)(2, 1) and (8,5)(8, 5). Find the equation of the perpendicular bisector of PQPQ.

Solution

Midpoint M=(5,3)M = (5, 3). Gradient of PQ=5−18−2=23PQ = \dfrac{5 - 1}{8 - 2} = \dfrac{2}{3}, so the perpendicular gradient is −32-\dfrac{3}{2}.

y−3=−32(x−5)⇒2y−6=−3x+15⇒3x+2y=21y - 3 = -\tfrac{3}{2}(x - 5) \quad\Rightarrow\quad 2y - 6 = -3x + 15 \quad\Rightarrow\quad 3x + 2y = 21

Check: MM gives 15+6=2115 + 6 = 21.

Foot of a perpendicular, distance and reflection

The line ll has equation y=2x+1y = 2x + 1 and the point CC is (7,0)(7, 0).

(a) Find the coordinates of the foot of the perpendicular from CC to ll.

(b) Find the shortest distance from CC to ll.

(c) Find the coordinates of the reflection of CC in ll.

Solution

(a) The perpendicular gradient is −12-\tfrac{1}{2}. The line through CC: y=−12(x−7)y = -\tfrac{1}{2}(x - 7). At the intersection with ll:

2x+1=−12x+72⇒4x+2=−x+7⇒x=12x + 1 = -\tfrac{1}{2}x + \tfrac{7}{2} \quad\Rightarrow\quad 4x + 2 = -x + 7 \quad\Rightarrow\quad x = 1

and y=2(1)+1=3y = 2(1) + 1 = 3. The foot is N(1,3)N(1, 3).

(b) CN=(7−1)2+(0−3)2=45=35CN = \sqrt{(7 - 1)^2 + (0 - 3)^2} = \sqrt{45} = 3\sqrt{5}.

(c) NN is the midpoint of CC′CC'. The step from CC to NN is (−6,3)(-6, 3); repeating it from NN gives C′=(−5,6)C' = (-5, 6).

A right angle at a vertex and an area

The points AA and BB are (1,3)(1, 3) and (5,11)(5, 11). The line through AA perpendicular to ABAB meets the xx-axis at CC.

(a) Find the equation of ACAC and the coordinates of CC.

(b) Find the area of triangle ABCABC.

Solution

(a) mAB=11−35−1=2m_{AB} = \dfrac{11 - 3}{5 - 1} = 2, so mAC=−12m_{AC} = -\dfrac{1}{2}:

y−3=−12(x−1)⇒x+2y=7y - 3 = -\tfrac{1}{2}(x - 1) \quad\Rightarrow\quad x + 2y = 7

At CC, y=0y = 0, so x=7x = 7: C=(7,0)C = (7, 0).

(b) The angle at AA is 90∘90^\circ, so ABAB and ACAC are the base and height:

AB=42+82=80,AC=62+32=45AB = \sqrt{4^2 + 8^2} = \sqrt{80}, \qquad AC = \sqrt{6^2 + 3^2} = \sqrt{45}Area=128045=123600=30\text{Area} = \tfrac{1}{2}\sqrt{80}\sqrt{45} = \tfrac{1}{2}\sqrt{3600} = 30
A line through a fixed point with unknown gradient

The line ll passes through (2,3)(2, 3) and has negative gradient mm. It meets the xx-axis at PP and the yy-axis at QQ, and OO is the origin.

(a) Find the coordinates of PP and QQ in terms of mm.

(b) Given that the area of triangle OPQOPQ is 1212, find mm and the equation of ll.

Solution

(a) The line is y−3=m(x−2)y - 3 = m(x - 2).

At QQ, x=0x = 0: y=3−2my = 3 - 2m, so Q=(0, 3−2m)Q = (0,\ 3 - 2m).

At PP, y=0y = 0: −3=m(x−2)-3 = m(x - 2), so x=2−3mx = 2 - \dfrac{3}{m} and P=(2−3m, 0)P = \left(2 - \dfrac{3}{m},\ 0\right).

Since m<0m < 0, both 3−2m3 - 2m and 2−3m2 - \tfrac{3}{m} are positive, so PP and QQ are on the positive axes.

(b)

12(2−3m)(3−2m)=12\tfrac{1}{2}\left(2 - \frac{3}{m}\right)(3 - 2m) = 12

Multiply by 2m2m (remembering m≠0m \neq 0):

(2m−3)(3−2m)=24m−(2m−3)2=24m−4m2+12m−9=24m4m2+12m+9=0(2m+3)2=0\begin{aligned} (2m - 3)(3 - 2m) &= 24m \\ -(2m - 3)^2 &= 24m \\ -4m^2 + 12m - 9 &= 24m \\ 4m^2 + 12m + 9 &= 0 \\ (2m + 3)^2 &= 0 \end{aligned}

So m=−32m = -\tfrac{3}{2} (a repeated root, so this is the only such line). Then P=(4,0)P = (4, 0), Q=(0,6)Q = (0, 6), and ll is

y−3=−32(x−2)⇒3x+2y=12y - 3 = -\tfrac{3}{2}(x - 2) \quad\Rightarrow\quad 3x + 2y = 12

Check: area =12×4×6=12= \tfrac{1}{2} \times 4 \times 6 = 12. The repeated root means 1212 is the smallest area any such triangle can have.

Watch out

Using the gradient of the wrong line. In "perpendicular to 3x−2y=63x - 2y = 6", the gradient of the given line is 32\tfrac{3}{2}, not 33 or −2-2. Rearrange to y=mx+cy = mx + c before reading it off.

Dropping a sign when multiplying out. y−5=−2(x+1)y - 5 = -2(x + 1) gives y−5=−2x−2y - 5 = -2x - 2. Write the bracket expansion as a separate line.

Leaving fractions when integers are asked for. "y=−23x+53y = -\tfrac{2}{3}x + \tfrac{5}{3}" is correct but not in the form ax+by=cax + by = c with integer coefficients; multiply by 33.

Confusing the perpendicular bisector with any perpendicular line. It must pass through the midpoint.

Reading the shortest distance as the distance to an intercept. The shortest distance to a line is along the perpendicular, not to where the line crosses an axis.

Exam tip
  • "Sufficient information". If a question gives you a point and a direction (parallel, perpendicular, through another point), you have enough. Start with y−y1=m(x−x1)y - y_1 = m(x - x_1).
  • Form of the answer. Follow the requested form exactly. "In the form y=mx+cy = mx + c" and "in the form ax+by+c=0ax + by + c = 0" are different, and the final mark is for the right form.
  • Exact coordinates. Keep fractions exact. Intersections and feet of perpendiculars are often reused in later parts, and rounded values lose accuracy marks there.
  • Areas. If a triangle has a right angle or a side along an axis, use 12×\tfrac{1}{2} \times base ×\times height. For other triangles, see the methods in Proving properties of shapes.
  • Check one point. Substituting a known point into your final equation takes ten seconds and catches most slips.
Summary
  • y−y1=m(x−x1)y - y_1 = m(x - x_1): line with gradient mm through (x1,y1)(x_1, y_1). Use it as the default.
  • y=mx+cy = mx + c: gradient mm, yy-intercept cc. ax+by+c=0ax + by + c = 0 has gradient −ab-\tfrac{a}{b}.
  • Vertical lines are x=kx = k; horizontal lines are y=ky = k.
  • Parallel lines share a gradient; perpendicular gradients multiply to −1-1.
  • Perpendicular bisector: through the midpoint, perpendicular to the segment.
  • Intersection: solve simultaneously. Axis intercepts: put x=0x = 0 or y=0y = 0.
  • Shortest distance to a line: find the foot of the perpendicular, then the length. The reflection has the foot as its midpoint.

Practice questions

Question
  1. Find the equation of the line with gradient 44 through (3,−2)(3, -2), in the form y=mx+cy = mx + c.
  2. Find the equation of the line through (−2,5)(-2, 5) and (4,2)(4, 2), in the form ax+by+c=0ax + by + c = 0 with integer coefficients.
  3. Find the equation of the line through (1,4)(1, 4) parallel to 2x+5y=72x + 5y = 7.
  4. Find the equation of the perpendicular bisector of the line joining (−3,2)(-3, 2) and (5,6)(5, 6).
  5. Find the point of intersection of 3x−2y=43x - 2y = 4 and x+4y=13x + 4y = 13.
  6. The line 5x+2y=205x + 2y = 20 meets the xx-axis at AA and the yy-axis at BB. Find the exact length of ABAB and the area of triangle OABOAB, where OO is the origin.
  7. Find the foot of the perpendicular from (5,6)(5, 6) to the line x+2y=7x + 2y = 7. Hence find the shortest distance from (5,6)(5, 6) to the line, and the reflection of (5,6)(5, 6) in the line.
  8. The lines y=3x−2y = 3x - 2 and x+2y=10x + 2y = 10 meet at PP. Find the equation of the line through PP perpendicular to x+2y=10x + 2y = 10.
  9. The points AA and BB are (−1,1)(-1, 1) and (3,9)(3, 9). The line through BB perpendicular to ABAB meets the xx-axis at CC. Find the coordinates of CC and the area of triangle ABCABC.
  10. The line l1l_1 has equation x+2y=9x + 2y = 9. The line l2l_2 passes through A(0,−3)A(0, -3) and is perpendicular to l1l_1. (a) Find the equation of l2l_2 and the point BB where l1l_1 and l2l_2 meet. (b) Find the reflection of AA in l1l_1. (c) Find the shortest distance from AA to l1l_1, in exact form.
Answers
  1. y+2=4(x−3)y + 2 = 4(x - 3), so y=4x−14y = 4x - 14.

  2. m=2−54−(−2)=−12m = \dfrac{2 - 5}{4 - (-2)} = -\dfrac{1}{2}. y−5=−12(x+2)y - 5 = -\tfrac{1}{2}(x + 2); multiply by 22: 2y−10=−x−22y - 10 = -x - 2, so x+2y−8=0x + 2y - 8 = 0.

  3. 2x+5y=72x + 5y = 7 has gradient −25-\tfrac{2}{5}. y−4=−25(x−1)y - 4 = -\tfrac{2}{5}(x - 1), so 5y−20=−2x+25y - 20 = -2x + 2, giving 2x+5y=222x + 5y = 22. (A parallel line keeps the left-hand side 2x+5y2x + 5y; only the constant changes.)

  4. Midpoint (1,4)(1, 4); gradient of segment 48=12\tfrac{4}{8} = \tfrac{1}{2}, so perpendicular gradient −2-2. y−4=−2(x−1)y - 4 = -2(x - 1), so 2x+y=62x + y = 6.

  5. From the second equation x=13−4yx = 13 - 4y. Then 3(13−4y)−2y=43(13 - 4y) - 2y = 4, so 39−14y=439 - 14y = 4 and y=52y = \tfrac{5}{2}, x=3x = 3. The point is (3,52)\left(3, \tfrac{5}{2}\right).

  6. A=(4,0)A = (4, 0) and B=(0,10)B = (0, 10). AB=16+100=116=229AB = \sqrt{16 + 100} = \sqrt{116} = 2\sqrt{29}. Area =12×4×10=20= \tfrac{1}{2} \times 4 \times 10 = 20.

  7. The line has gradient −12-\tfrac{1}{2}, so the perpendicular has gradient 22: y−6=2(x−5)y - 6 = 2(x - 5), i.e. y=2x−4y = 2x - 4. Substituting: x+2(2x−4)=7x + 2(2x - 4) = 7, so 5x=155x = 15, x=3x = 3, y=2y = 2. Foot (3,2)(3, 2). Distance 22+42=20=25\sqrt{2^2 + 4^2} = \sqrt{20} = 2\sqrt{5}. Reflection: step from (5,6)(5, 6) to (3,2)(3, 2) is (−2,−4)(-2, -4), so the image is (1,−2)(1, -2).

  8. x+2(3x−2)=10x + 2(3x - 2) = 10, so 7x=147x = 14, x=2x = 2, y=4y = 4: P=(2,4)P = (2, 4). The perpendicular gradient to −12-\tfrac{1}{2} is 22: y−4=2(x−2)y - 4 = 2(x - 2), so y=2xy = 2x.

  9. mAB=84=2m_{AB} = \tfrac{8}{4} = 2, so the perpendicular gradient is −12-\tfrac{1}{2}: y−9=−12(x−3)y - 9 = -\tfrac{1}{2}(x - 3). At y=0y = 0: x−3=18x - 3 = 18, so C=(21,0)C = (21, 0). AB=80AB = \sqrt{80}, BC=182+92=405BC = \sqrt{18^2 + 9^2} = \sqrt{405}. The angle at BB is 90∘90^\circ, so area =1280×405=1232400=12(180)=90= \tfrac{1}{2}\sqrt{80 \times 405} = \tfrac{1}{2}\sqrt{32400} = \tfrac{1}{2}(180) = 90.

  10. (a) l1l_1 has gradient −12-\tfrac{1}{2}, so l2l_2 has gradient 22 and equation y=2x−3y = 2x - 3. Then x+2(2x−3)=9x + 2(2x - 3) = 9, so 5x=155x = 15, x=3x = 3, y=3y = 3: B=(3,3)B = (3, 3). (b) BB is the midpoint of AA and its image. Step A→BA \to B is (3,6)(3, 6), so the image is (6,9)(6, 9). (c) AB=32+62=45=35AB = \sqrt{3^2 + 6^2} = \sqrt{45} = 3\sqrt{5}.

How well do you know this?

Builds on

Where this leads

Console

Search notes, courses and tools, or run an action