Vertex Learn

Writing the equation of a line

WorksheetShare to Classroom

What this lesson covers

  • The form y − y₁ = m(x − x₁) needs one point and a gradient.
  • Two points give the gradient first.
  • Rearranging to y = mx + c shows the gradient and the y-intercept.
Key idea

The point and gradient form

  • For a line through (x₁, y₁) with gradient m, write y − y₁ = m(x − x₁).
  • Expand and tidy to reach y = mx + c, where m is the gradient and c is the y-intercept.
Worked example

Gradient 3 through (2, 5)

  • Put the numbers straight into the form.
  1. y − 5 = 3(x − 2)
  2. y − 5 = 3x − 6expand
  3. y = 3x − 1add 5
Key idea

Try it: gradient and intercept

Worked example

Through (1, 4) and (3, 10)

  • Two points give the gradient, then either point finishes it.
  1. m = (10 − 4) ÷ (3 − 1) = 3
  2. y − 4 = 3(x − 1)
  3. y = 3x + 1
Worked example

Reading a line in general form

  • Rearrange 2x + 3y = 12 to see its gradient.
  1. 3y = −2x + 12
  2. y = −(2/3)x + 4gradient −2/3, y-intercept 4
Key idea

Reading the line

  • In y = 3x − 1, the line crosses the y-axis at −1 and rises 3 for each 1 across.
The line y equals 3x minus 1 with intercept negative 1 and the point (2, 5).
Key idea

Graphing calculator

Worked example

General form

  • Write y = x/2 + 2 in the form ax + by + c = 0.
  1. 2y = x + 4multiply by 2
  2. x − 2y + 4 = 0
Key idea

Try it: lines through a point

Common mistakes

  • Reading the gradient of 2x + 3y = 12 as 2.
    Make y the subject first; the gradient is −2/3.
  • Forgetting to multiply the negative in y − 5 = −2(x − 3).
    The bracket expands to −2x + 6.

Your turn

1

State the gradient of y = −2x + 5.

2

Find the line with gradient 2 through (1, 3).

3

Find the gradient of 4x + 2y = 6.

4

Find the y-intercept of 3x − y = 6.

Show answer

1. −2 2. y = 2x + 1 3. y = −2x + 3, so −2 4. y = 3x − 6, so −6

Your turn

Sample question: Achieved

Find the equation of the line through (−2, 7) and (4, −5) in the form y = mx + c.

Hint

Find the gradient from the two points, then put it and one point into y − y₁ = m(x − x₁).

Answer

y = −2x + 3

Step by step
  1. Two points give the gradient first: m = (y₂ − y₁) ÷ (x₂ − x₁).
  2. m = (−5 − 7) ÷ (4 − (−2)) = −12 ÷ 6 = −2.
  3. Use the point and gradient form with (−2, 7): y − 7 = −2(x − (−2)) = −2(x + 2).
  4. Expand: y − 7 = −2x − 4.
  5. Add 7 to both sides: y = −2x + 3.
  6. Classic mistake: x − (−2) written as x − 2. Two minus signs make a plus.
  7. Check with the other point: x = 4 gives y = −8 + 3 = −5. Correct.
Full working
  1. m = −5 − 74 + 2 = −2rise over run
  2. y − 7 = −2(x + 2)point and gradient form
  3. y − 7 = −2x − 4
  4. y = −2x + 3
Your turn

Sample questions: Merit

1

Line L passes through (3, −1) and has the same y-intercept as the line 2x − 5y = 20. Find L in the form ax + by + c = 0.

Hint

Put x = 0 into 2x − 5y = 20 to find the shared y-intercept. That gives you a second point on L.

Answer

x − y − 4 = 0

Step by step
  1. The y-intercept is where x = 0. Put x = 0 into 2x − 5y = 20: −5y = 20, so y = −4.
  2. So L also goes through (0, −4). Now L has two points: (0, −4) and (3, −1).
  3. Gradient of L: (−1 − (−4)) ÷ (3 − 0) = 3 ÷ 3 = 1.
  4. The y-intercept is −4 and the gradient is 1, so y = x − 4.
  5. General form means everything on one side, equal to zero: x − y − 4 = 0.
  6. Classic mistake: taking the gradient of 2x − 5y = 20 as well. The question only shares the intercept, not the slope.
  7. Check: (3, −1) gives 3 − (−1) − 4 = 0, and (0, −4) gives 0 + 4 − 4 = 0. Both lie on L.
Full working
  1. x = 0: −5y = 20, so y = −4y-intercept of the given line
  2. m = −1 + 43 − 0 = 1through (0, −4) and (3, −1)
  3. y = x − 4y = mx + c with c = −4
  4. x − y − 4 = 0
2

The line through A(1, 5) and B(4, −1) crosses the x-axis at P and the y-axis at Q. Find the exact length PQ.

Hint

Find the equation of AB first. Then P has y = 0 and Q has x = 0.

Answer

PQ = √61.25 = 7√52 ≈ 7.83 units

Step by step
  1. To find where a line crosses the axes you need its equation, so start there.
  2. Gradient AB = (−1 − 5) ÷ (4 − 1) = −6 ÷ 3 = −2.
  3. Through A(1, 5): y − 5 = −2(x − 1), so y = −2x + 7.
  4. Q is on the y-axis, where x = 0: y = 7. So Q = (0, 7). That is just the y-intercept.
  5. P is on the x-axis, where y = 0: 0 = −2x + 7, so x = 3.5. So P = (3.5, 0).
  6. PQ by the distance formula: √(3.5² + 7²) = √(12.25 + 49) = √61.25.
  7. Exact form: 61.25 = 2454 = 49 × 5 ÷ 4, so √61.25 = 7√52 ≈ 7.83.
  8. Classic mistake: putting y = 0 in to find Q. The y-axis is where x = 0.
  9. Check: both A and B fit y = −2x + 7: 5 = −2 + 7 and −1 = −8 + 7.
Full working
  1. m = −1 − 54 − 1 = −2
  2. y = −2x + 7through A(1, 5)
  3. Q = (0, 7), P = (3.5, 0)x = 0, then y = 0
  4. PQ = √(3.5² + 7²) = √61.25
  5. PQ = 7√52 ≈ 7.83
Your turn

Sample questions: Excellence

1

A line with negative gradient m passes through P(2, 3) and cuts the positive x-axis at A and the positive y-axis at B. Show that the area of triangle OAB is (3 − 2m)²−2m. Hence find the line that makes the area 12.

Hint

Write the line as y − 3 = m(x − 2), find both intercepts in terms of m, and use ½ × base × height.

Answer

Area = (3 − 2m)²−2m; area 12 gives m = −32, so the line is y = −(32)x + 6

Step by step
  1. Start with the point and gradient form: y − 3 = m(x − 2).
  2. B is on the y-axis, so put x = 0: y = 3 − 2m. That is the height of the triangle.
  3. A is on the x-axis, so put y = 0: −3 = m(x − 2), so x = 2 − 3m. That is the base.
  4. Tidy the base over one denominator: 2 − 3m = 2m − 3m.
  5. Area = ½ × base × height = ½ × 2m − 3m × (3 − 2m).
  6. Note 2m − 3 = −(3 − 2m), so the area is −(3 − 2m)²2m = (3 − 2m)²−2m. That is what we had to show.
  7. "Hence": set it equal to 12: (3 − 2m)² = −24m.
  8. Expand: 9 − 12m + 4m² = −24m, so 4m² + 12m + 9 = 0.
  9. This factorises as (2m + 3)² = 0, so m = −32. A repeated root means exactly one line gives area 12.
  10. The line: y − 3 = −(32)(x − 2), so y = −(32)x + 6.
  11. Check: it cuts the axes at A(4, 0) and B(0, 6), and ½ × 4 × 6 = 12. Correct.
Full working
  1. y − 3 = m(x − 2)point and gradient form
  2. x = 0: OB = 3 − 2mheight
  3. y = 0: OA = 2 − 3m = 2m − 3mbase
  4. area = ½ × 2m − 3m × (3 − 2m) = (3 − 2m)²−2mshown
  5. (3 − 2m)² = −24m, so 4m² + 12m + 9 = 0set the area to 12
  6. (2m + 3)² = 0, so m = −32one repeated root
  7. y = −(32)x + 6
2

Triangle ABC has A(0, 0), B(8, 0) and C(2, 6). A median joins a corner to the midpoint of the opposite side. Find the equations of the medians from C and from A, find where they meet, and prove that the third median also passes through that point.

Hint

Find each midpoint, then each line. Solve two of the lines together, then substitute the point into the third.

Answer

Medians y = −3x + 12 and y = (35)x meet at (103, 2); the median from B, y = −(37)(x − 8), also passes through (103, 2)

Step by step
  1. A median needs a corner and the midpoint of the opposite side. So find the midpoints first.
  2. Midpoint of AB is (4, 0). Midpoint of BC is (5, 3). Midpoint of AC is (1, 3).
  3. Median from C(2, 6) to (4, 0): gradient (0 − 6) ÷ (4 − 2) = −3, so y − 0 = −3(x − 4), which is y = −3x + 12.
  4. Median from A(0, 0) to (5, 3): gradient 35 through the origin, so y = (35)x.
  5. They meet where the y values agree: (35)x = −3x + 12. Multiply by 5: 3x = −15x + 60, so 18x = 60 and x = 103.
  6. Then y = (35) × (103) = 2. They meet at (103, 2).
  7. Median from B(8, 0) to (1, 3): gradient (3 − 0) ÷ (1 − 8) = −37, so y = −(37)(x − 8).
  8. Test the point: x = 103 gives x − 8 = −143, and −(37) × (−143) = 2. So y = 2, and the third median passes through (103, 2) too.
  9. All three medians meet at one point. Notice it is the average of the corners: ((0 + 8 + 2) ÷ 3, (0 + 0 + 6) ÷ 3) = (103, 2).
  10. Classic mistake: drawing the median to a corner instead of to a midpoint. A median always ends at a midpoint.
Full working
  1. midpoints: AB (4, 0), BC (5, 3), AC (1, 3)
  2. median from C: m = −3, y = −3x + 12
  3. median from A: y = (35)x
  4. (35)x = −3x + 12, so x = 103, y = 2solve together
  5. median from B: y = −(37)(x − 8)through (8, 0) and (1, 3)
  6. x = 103: y = −(37) × (−143) = 2the point fits
  7. all three medians meet at (103, 2)
Summary

What to take away

  • One point and a gradient fix a line.
  • Make y the subject before reading the gradient.
Practice

Practise this

Worksheet with answersWithout answersDownload PDF
Report a mistake

More in AS 91256

Is your child on track?

Take the free placement test