Gradient and equation of a straight line

Math · Algebra I

Question 1 of 10

0

    On the line y = 6x − 6, what is y when x = −2?

    Decimals (0.75 or 0,75), fractions (3/4) and mixed numbers (1 1/2) are accepted. Do not use thousands separators.

    How to type your answer
    • Fractions: 3/4. Mixed numbers: 1 1/2.
    • Decimals with a point or a comma: 0.75 or 0,75.
    • Negative numbers start with a minus: -3/4.
    • Percentages need the % sign: 75%.

    Stuck? Read the explanation

    Unlocks at a streak of 5 correct answers in a row.

    Print a free worksheet (PDF)

    Embed this practice on your site or class page

    Paste this HTML into your page. Students practise right there; it is free and needs no account.

    Gradient and equation of a straight line explained

    The gradient of a straight line measures how steeply it rises or falls. A line with a positive gradient rises from left to right, and a negative gradient falls. The equation y=mx+cy = mx + c describes every point on the line, where mm is the gradient and cc is the y-intercept, the value of yy where the line crosses the y-axis.

    To find the gradient from two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2), divide the change in yy by the change in xx: m=y2−y1x2−x1m = \dfrac{y_2 - y_1}{x_2 - x_1}. Subtract in the same order on the top and the bottom. Parallel lines have equal gradients. Perpendicular lines have gradients whose product is −1-1, so a gradient mm has a perpendicular gradient of −1m-\dfrac{1}{m}.

    To find the equation of a line when you know its gradient and one point, substitute the point into y=mx+cy = mx + c and solve for cc.

    Worked example

    A line passes through (2,3)(2, 3) and (6,11)(6, 11). The gradient is m=11−36−2=84=2m = \dfrac{11 - 3}{6 - 2} = \dfrac{8}{4} = 2.

    Substitute (2,3)(2, 3) into y=2x+cy = 2x + c: 3=4+c3 = 4 + c, so c=−1c = -1. The line is y=2x−1y = 2x - 1.

    A line perpendicular to it has gradient −12-\dfrac{1}{2}.

    Key facts

    • The practice questions use whole-number coordinates and, at harder levels, fractional gradients such as 34\dfrac{3}{4}. You may be asked for a gradient, the value of cc, a yy-value at a given xx, or the intercept of a perpendicular line.
    • The gradient between two points is y2−y1x2−x1\dfrac{y_2 - y_1}{x_2 - x_1}. Subtract in the same order on top and bottom.
    • To find cc, put the gradient and one point into y=mx+cy = mx + c.
    • Perpendicular gradients multiply to −1-1. The perpendicular gradient is −1m-\dfrac{1}{m}: flip the fraction and change the sign.
    • A decimal answer is only needed at the end. Keep gradients as fractions in the working.
    • Read a line in the form y=mx+cy = mx + c directly: the number in front of xx is the gradient, and the constant is where the line crosses the yy-axis.
    • A positive gradient means the line rises from left to right. A negative gradient means it falls.

    Worked example 2

    A line passes through (−2,7)(-2, 7) and (4,−5)(4, -5). Find its equation, then find yy when x=−3x = -3.

    1. Gradient: m=−5−74−(−2)=−126=−2m = \dfrac{-5 - 7}{4 - (-2)} = \dfrac{-12}{6} = -2.
    2. Substitute (−2,7)(-2, 7) into y=−2x+cy = -2x + c: 7=−2×(−2)+c7 = -2 \times (-2) + c, so 7=4+c7 = 4 + c and c=3c = 3.
    3. The line is y=−2x+3y = -2x + 3.
    4. When x=−3x = -3: y=−2×(−3)+3=6+3=9y = -2 \times (-3) + 3 = 6 + 3 = 9.

    Check with the other point (4,−5)(4, -5): −2×4+3=−5-2 \times 4 + 3 = -5. It lies on the line.

    Worked example 3

    Line LL has gradient 34\dfrac{3}{4}. Line PP is perpendicular to LL and passes through (5,−2)(5, -2). Find the yy-intercept of PP, to 2 decimal places.

    1. Gradient of PP: −1÷34=−43-1 \div \dfrac{3}{4} = -\dfrac{4}{3}. As a decimal this is −1.33-1.33 (to 2 d.p.).
    2. Substitute (5,−2)(5, -2) into y=mx+cy = mx + c: −2=−43×5+c-2 = -\dfrac{4}{3} \times 5 + c.
    3. −43×5=−203-\dfrac{4}{3} \times 5 = -\dfrac{20}{3}, so c=−2+203=143c = -2 + \dfrac{20}{3} = \dfrac{14}{3}.
    4. c=4.67c = 4.67 (to 2 d.p.).

    Using the rounded gradient −1.33-1.33 would give c=−2+6.65=4.65c = -2 + 6.65 = 4.65, which is wrong in the second decimal place. So use the fraction in the working and round only at the end. A check on the sign: the line goes down to the right, and at x=5x = 5 it is below the axis at −2-2, so it must have started higher up at x=0x = 0. A positive cc fits.

    Common mistakes

    • Subtracting in a different order on top and bottom, which gives the wrong sign. Writing −5−7−2−4\dfrac{-5 - 7}{-2 - 4} gives 22, but the correct gradient is −2-2 when the order is the same on both: −5−74−(−2)\dfrac{-5 - 7}{4 - (-2)}.
    • Losing the double negative: 4−(−2)=64 - (-2) = 6, not 2.
    • Taking the perpendicular gradient as just the reciprocal or just the negative. You need both.
    • Reading cc as the gradient, or the other way round, from y=mx+cy = mx + c.
    • Rounding the gradient to 2 decimal places before using it.
    • Forgetting that a line written as y=3−2xy = 3 - 2x has gradient −2-2, not 33.

    Exam tips

    • Write the gradient formula with the numbers in brackets, so negative coordinates are handled properly.
    • Finish with a check: substitute your second point into the final equation.
    • For perpendicular gradients, test that the product is −1-1. Here 34×(−43)=−1\dfrac{3}{4} \times \left(-\dfrac{4}{3}\right) = -1.
    • Give the accuracy asked for ("2 decimal places") and keep unrounded values in your calculator.
    • Sketch a quick picture. A line that rises must have a positive gradient, and a perpendicular line must fall.
    • If you are given two points and asked for yy at a third xx, you do not have to find the full equation. Find the gradient, then move from one point along the line.
    • Show every substitution, not just the result. A wrong final answer can still earn marks for a correct method.

    What you will practise

    New numbers every time you practise. Levels: Easy, Medium, Hard. Each answer is followed by a worked explanation.

    Example questions

    • Easy

      What is the gradient of the line y = −5x + 7?

    • Medium

      A line with gradient 6 passes through (3, −1). Find the value of c in y = mx + c.

    • Hard

      A straight line passes through (−6, 9) and (−10, 25). Find the value of y when x = −6.