Find the gradient from two points or from y=mx+c{y = mx + c}y=mx+c
The gradient is how far a straight line goes up for each 1 unit across. A line rising from left to right has a positive gradient, and a falling line has a negative gradient.
Gradient
The gradient of a straight line is the change in y{y}y divided by the change in x{x}x between any two points on the line.
Both lines are equally steep, so only the sign tells their gradients apart.
Subtract the two points' coordinates in the same order:
gradient=y2−y1x2−x1 \text{gradient} = \frac{y_2 - y_1}{x_2 - x_1} gradient=x2−x1y2−y1where (x1,y1){(x_1, y_1)}(x1,y1) and (x2,y2){(x_2, y_2)}(x2,y2) are points on the line. Use it when a question gives two points but no graph.
Wrong. From (−1,7){(-1, 7)}(−1,7) to (3,−5),{(3, -5)\text{,}}(3,−5), the gradient is 3−(−1)−5−7=4−12=−13.{\dfrac{3 - (-1)}{-5 - 7} = \dfrac{4}{-12} = -\dfrac{1}{3}\text{.}}−5−73−(−1)=−124=−31.
Right. The change in y{y}y goes on top, so the gradient is −5−73−(−1)=−124=−3.{\dfrac{-5 - 7}{3 - (-1)} = \dfrac{-12}{4} = -3\text{.}}3−(−1)−5−7=4−12=−3.
Decide the sign from the slope first, then check your answer has it.
The gradient can also be read from the equation of a linear function.
Linear function
A linear function is a function whose graph is a straight line.
Its equation can be written as
y=mx+c y = mx + c y=mx+cwhere m,{m\text{,}}m, the number multiplying x,{x\text{,}}x, is the gradient and c{c}c is the y{y}y-intercept, so y=5x−2{y = 5x - 2}y=5x−2 has gradient 5. Rearrange any other form to make y{y}y the subject first.
Gradient from an equation
Find the gradient of the line 3y=6−12x.{3y = 6 - 12x\text{.}}3y=6−12x.
- Divide every term by 3, giving y=2−4x.{y = 2 - 4x\text{.}}y=2−4x.
- Reorder it as y=−4x+2.{y = -4x + 2\text{.}}y=−4x+2. The gradient is −4,{-4\text{,}}−4, the number multiplying x,{x\text{,}}x, not the 2 on its own.
Read both points from the axis scales on a real-life graph
On a real-life graph each axis has its own scale, so a square across and a square up can stand for different amounts.
The triangle's sides are the changes in cost and distance between the two points.
Gradient of a real-life graph
Work out the gradient of the graph of van hire cost against distance.
- Read two points far apart where the line crosses grid lines, (50,40){(50, 40)}(50,40) and (250,120).{(250, 120)\text{.}}(250,120).
- The change in y{y}y is 120−40=80{120 - 40 = 80}120−40=80 and the change in x{x}x is 250−50=200.{250 - 50 = 200\text{.}}250−50=200.
- The gradient is 80200=0.4.{\dfrac{80}{200} = 0.4\text{.}}20080=0.4.
What this gradient means, the cost per kilometre, is covered in the guide Real Life and Distance Time Graphs.
Wrong. The van hire line rises 8 squares for 8 squares across, so the gradient is 8÷8=1.{8 \div 8 = 1\text{.}}8÷8=1.
Right. One square up is £10 but one square across is 25 km, so the changes are 8×10=80{8 \times 10 = 80}8×10=80 and 8×25=200,{8 \times 25 = 200\text{,}}8×25=200, giving 80200=0.4.{\dfrac{80}{200} = 0.4\text{.}}20080=0.4.
Wrong. The line passes through (250,120),{(250, 120)\text{,}}(250,120), so the gradient is 120÷250=0.48.{120 \div 250 = 0.48\text{.}}120÷250=0.48.
Right. Dividing one point's coordinates works only for a line through the origin, and this line crosses the y{y}y-axis at 20. Use the change between two points, 80200=0.4.{\dfrac{80}{200} = 0.4\text{.}}20080=0.4.
Write down the two points you read and the division, so correct working from your own readings earns credit.
Work backwards from a gradient to find a missing coordinate
A gradient and one point give an equation for a missing coordinate of another point:
- Set the change in y{y}y over the change in x{x}x equal to the gradient.
- Solve the equation, as in the guide Solving Equations.
- Check that the two points give the gradient.
The given gradient turns the triangle's two sides into one equation in k.{k\text{.}}k.
A missing y-coordinate
The line through P(−2,9){P(-2, 9)}P(−2,9) and Q(4,t){Q(4, t)}Q(4,t) has gradient −2.{-2\text{.}}−2. Work out the value of t.{t\text{.}}t.
- The change in y{y}y is t−9{t - 9}t−9 and the change in x{x}x is 4−(−2)=6.{4 - (-2) = 6\text{.}}4−(−2)=6.
- Set the fraction equal to the gradient, giving t−96=−2.{\dfrac{t - 9}{6} = -2\text{.}}6t−9=−2.
- Multiply both sides by 6, so t−9=−12{t - 9 = -12}t−9=−12 and t=−3.{t = -3\text{.}}t=−3.
- Check that −3−96=−126=−2.{\dfrac{-3 - 9}{6} = \dfrac{-12}{6} = -2\text{.}}6−3−9=6−12=−2.
The answer is the value asked for, t=−3,{t = -3\text{,}}t=−3, not the point (4,−3).{(4, -3)\text{.}}(4,−3).
- Why does any pair of points on a straight line give the same gradient?
- Explain why counting squares can give the wrong gradient on a real-life graph.
On a graph, one square across is 2 minutes and one square up is 20 litres. What is the gradient of a line rising 4 squares for 5 squares across?
Solution
8
What is the value of a{a}a if the line through (a,10){(a, 10)}(a,10) and (7,1){(7, 1)}(7,1) has gradient −3?{-3\text{?}}−3?
Solution
4
What is the gradient of the line x+2y=6?{x + 2y = 6\text{?}}x+2y=6?
Solution
−12{-\dfrac{1}{2}}−21