Mathematics Topic

Equation of a Straight Line

  1. Read notes
  2. Flashcards
  3. Quiz
  4. Confident

Study focus - 3 things

  1. Every non-vertical line has an equation y = mx + c: find the gradient m first, then use one point to find c
  2. From a graph read c where the line cuts the y-axis and get m from a slope triangle; from two points use m = (y2 - y1) / (x2 - x1)
  3. Parallel lines have the same gradient; perpendicular gradients multiply to -1; horizontal lines are y = c and vertical lines are x = c

Visual notes

The line through A(1, 2) and B(3, 8)
The straight line y = 3x - 1 on a grid from -2 to 7 across and -4 to 10 up. It rises from left to right, crosses the y-axis at (0, -1) and passes through the marked points A(1, 2) and B(3, 8).

Gradient = (8 - 2) / (3 - 1) = 3, and the line cuts the y-axis at (0, -1), so its equation is y = 3x - 1.

Section 1What the equation of a line says

The equation of a line is a rule that every point on the line obeys and no other point does. For a line that is not vertical it can be written in the form y = mx + c, with the letter m standing for the gradient and the letter c for the y-intercept (the y value where the line cuts the y-axis). To write the equation you need two facts about the line, such as its gradient and one point on it, or two points on it.

Section 2From the gradient and the y-intercept

If you know m and c, put them straight into y = mx + c. A line with gradient 2 that cuts the y-axis at 5 has the equation y = 2x + 5. Take care with signs: a y-intercept of -3 gives y = 2x - 3, not y = 2x + 3.

Section 3From a graph

Read c from the point where the line crosses the y-axis. To get m, choose two points that sit exactly on grid crossings, draw the slope triangle and work out rise ÷ run. A line that falls from left to right has a negative m. Put m and c into y = mx + c and check by testing another point that is on the line. If the line is vertical, it has no gradient: its equation is x = (the x value where it crosses the x-axis).

Section 4From the gradient and one point

Write y = mx + c with the known m. Substitute the point's x and y to get an equation for c, and solve it. For m = 2 through (3, 7): 7 = 2(3) + c, so c = 1 and y = 2x + 1. An equivalent method is the point-slope form y - y1 = m(x - x1), which you can leave as it is or tidy into y = mx + c. Watch the signs when the point has negative coordinates: y - (-2) becomes y + 2.

Section 5From two points

Find the gradient first: m = (y2 - y1) / (x2 - x1), subtracting in the same order on the top and the bottom. Then use either point with the method above to find c. The other point is your check: substitute it and the equation must hold. For (1, 3) and (3, 11): m = 8/2 = 4, then 3 = 4(1) + c gives c = -1, so y = 4x - 1, and 4(3) - 1 = 11 confirms it.

Section 6Parallel and perpendicular lines

Rule for parallel lines: they have the same gradient. Rule for perpendicular lines: their gradients multiply to -1, so one is the negative reciprocal of the other (turn the fraction upside down and change the sign): a gradient of 2 pairs with -1/2, and -3/4 pairs with 4/3. To find the equation of a line through a given point and parallel or perpendicular to a given line, first get the given line's gradient (rearrange to y = mx + c if needed), apply the rule to get the new m, then use the point to find c. A horizontal line is perpendicular to a vertical one. (The detailed work on these gradients has its own topic.)

Section 7Special lines, other forms, and real problems

A horizontal line has the equation y = c and a vertical line has the equation x = c; a vertical line cannot be written as y = mx + c. The equation can also be left as ax + by = c, for example y = 2x - 3 is the same line as 2x - y = 3; rearrange to y = mx + c whenever you need the gradient. In a real problem the same steps give a model: if a fare graph passes through two readings, m is the rate in J$ per km and c is the starting charge.

Examples

The line in the diagram passes through A(1, 2) and B(3, 8). Find its equation in the form y = mx + c, and check it.

Gradient: m = (8 - 2)/(3 - 1) = 6/2 = 3, so the equation is y = 3x + c. Use A(1, 2): 2 = 3(1) + c, so c = 2 - 3 = -1. The equation is y = 3x - 1. Check with B(3, 8): 3(3) - 1 = 8, which is the y value of B, so the line is right. The point-slope form gives the same line: y - 2 = 3(x - 1) becomes y - 2 = 3x - 3, so y = 3x - 1. The y-intercept -1 matches the point (0, -1) in the diagram.

(a) Suppose the taxi fare C in J$ for a trip of d km is a straight-line graph through (3, 660) and (8, 1260). Find the equation and the fare for 12 km. (b) Find the equation of the line through (6, 2) that is perpendicular to y = 3x - 4. (c) Find the equation of the line through (-1, 4) that is parallel to 3x + y = 5.

(a) m = (1260 - 660)/(8 - 3) = 600/5 = 120. Then 660 = 120(3) + c, so c = 660 - 360 = 300 and C = 120d + 300. For 12 km: C = 120(12) + 300 = 1440 + 300 = 1740, so the fare is J$1740. (b) The given gradient is 3, so the perpendicular gradient is -1/3, because 3 × (-1/3) = -1. Then 2 = -(1/3)(6) + c = -2 + c, so c = 4 and y = -(1/3)x + 4. (c) Rearrange: y = -3x + 5, so the gradient is -3 and the parallel line has gradient -3. Then 4 = -3(-1) + c = 3 + c, so c = 1 and y = -3x + 1. Check: -3(-1) + 1 = 4.

Now let's water it

Session runs notes to flashcards to quiz back-to-back.

Where this comes from