The gradient of a straight line
🖨 Print a self-study sheet Why print?
Suppose a stretch of road climbs m while a walker moves m horizontally. To say whether the road is steep or gentle, we compare the height gained with the horizontal distance: . This number tells us that for every metre travelled horizontally the road rises m, a steepness of .
In mathematics, the number that describes the steepness of a straight line is called its gradient. It tells us whether the line rises or falls, and how steep it is. What about two lines with the same steepness? This lesson answers such questions.
Let's explore
We draw three lines , and on the same coordinate plane. For each line, see how much changes when increases by .
When increases by : for , increases by ; for , increases by ; for , decreases by . The numbers ; 0.5; -1 are exactly the coefficients of x in the formulas. Their sign tells us whether the line rises or falls, and their size tells us how steep it is.
The gradient
Why is a the steepness? When x increases by 1, the value y=ax+b becomes a(x+1)+b=ax+b+a, so y increases by exactly a. So a tells us how much y changes each time x increases by 1.
From this we get the following remarks:
- a>0: the line rises from left to right; a<0: the line falls.
- The larger |a| is, the steeper the line.
- The constant b is the y-coordinate where the line meets the y-axis, because x=0 gives y=b.
If we know two points on the line, we can find the gradient from the idea "how much does y change when x increases by 1".
Why? Since A and B lie on the line y=ax+b, we have y_1=ax_1+b and y_2=ax_2+b. Subtracting the two equalities gives y_2-y_1=a(x_2-x_1). Dividing both sides by x_2-x_1\neq0 gives the formula.
We draw a line by finding two of its points and joining them.
Parallel and intersecting lines
Why? If a=a' the two lines are equally steep, and one is the other shifted up or down by b'-b units: parallel if b\neq b', coincident if b=b'. If a\neq a', the equation ax+b=a'x+b' has exactly one solution x=\dfrac{b'-b}{a-a'}, so the lines have exactly one common point.
We return to the road at the start, using the four steps of solving a problem.
Connections. This lesson uses functions, graphs and the coordinate plane from the idea of a function and its graph, and linear equations to find intersection points. In real life the gradient is a "rate of change": the steepness of a road, the price per gigabyte of a phone plan, the speed of uniform motion.
Key terms
Summary
- A linear function y=ax+b (a\neq0) has a straight line as its graph; a is the gradient and b is the y-coordinate where the line meets the y-axis.
- a>0: the line rises; a<0: the line falls; the larger |a|, the steeper.
- The line through A(x_1, y_1) and B(x_2, y_2) has gradient a=\dfrac{y_2-y_1}{x_2-x_1}.
- Parallel: a=a', b\neq b'; coincident: a=a', b=b'; intersecting: a\neq a'.
- To draw a line you only need two points.
Practice
Each exercise comes with what you need and how to start. Try it yourself first, then open the solution.
Find the gradient a and the constant b of each function:
a) y=-3x+5.
b) y=\dfrac{x}{4}-1.
c) y=4-2x.
d) y=7x.
What you need: write each one in the form y=ax+b.
Steps:
- Put the term containing x first.
- Read off a and b.
Show solution
A linear function has the form y=ax+b, where a is the gradient and b is the constant (the y-intercept). We bring each function to this form.
a) The function y=-3x+5 already has the form y=ax+b, so a=-3, b=5.
b) We have y=\dfrac{x}{4}-1=\dfrac14x-1, so a=\dfrac14, b=-1.
c) We have y=4-2x=-2x+4, so a=-2, b=4.
d) We have y=7x=7x+0, so a=7, b=0.
So a) (a, b)=(-3, 5); b) \left(\dfrac14, -1\right); c) (-2, 4); d) (7, 0).
Answer. a) (-3, 5). b) \left(\dfrac14, -1\right). c) (-2, 4). d) (7, 0).
Which functions rise and which fall?
a) y=0.5x+2.
b) y=-4x+1.
c) y=1-3x.
What you need: the sign of the gradient tells us whether the line rises (a>0) or falls (a<0).
Steps:
- Find the gradient of each function.
- Look at its sign.
Show solution
For a function y=ax+b: if a>0 the function is increasing (the graph rises from left to right); if a<0 the function is decreasing (the graph falls).
a) The function y=0.5x+2 has a=0.5>0, so it rises.
b) The function y=-4x+1 has a=-4<0, so it falls.
c) We have y=1-3x=-3x+1, so a=-3<0, and it falls.
So function a) rises; functions b) and c) fall.
Answer. a) rises. b) falls. c) falls.
Write the equation of the line through:
a) A(-1, -3) and B(2, 3).
b) A(0, 5) and B(4, 1).
What you need: a=\dfrac{y_2-y_1}{x_2-x_1}, then find b.
Steps:
- Work out the gradient a.
- Substitute the coordinates of one point to find b.
Show solution
Let the required line be y=ax+b. The gradient of the line through A(x_A, y_A) and B(x_B, y_B) is a=\dfrac{y_B-y_A}{x_B-x_A} (where x_A\neq x_B).
a) For A(-1, -3) and B(2, 3), we have a=\frac{3-(-3)}{2-(-1)}=\frac63=2.
The line passes through A, so -3=2\cdot(-1)+b, hence b=-3+2=-1. The equation of the line is y=2x-1.
Check with B: 2\cdot2-1=3, correct.
b) For A(0, 5) and B(4, 1), we have a=\frac{1-5}{4-0}=\frac{-4}{4}=-1.
The line meets the y-axis at A(0, 5), so b=5. The equation of the line is y=-x+5.
Check with B: -4+5=1, correct.
So a) y=2x-1; b) y=-x+5.
Answer. a) y=2x-1. b) y=-x+5.
Draw the graph of y=\dfrac{x}{2}+1.
What you need: drawing a line needs only two points.
Steps:
- Choose two easy values of x, for example 0 and 2.
- Work out y and join the two points.
Show solution
The graph of a linear function is a straight line, so we only need two distinct points on it.
For x=0, y=\dfrac02+1=1, giving the point (0, 1).
For x=2, y=\dfrac22+1=2, giving the point (2, 2).
The table of values is:
| x | 0 | 2 |
|---|---|---|
| y | 1 | 2 |
Draw the coordinate axes Oxy, plot the points (0, 1) and (2, 2) and join them; this gives the required line. Since a=\dfrac12>0, the line rises. It also passes through (-2, 0), because when x=-2 we get y=\dfrac{-2}{2}+1=0.
So the graph of y=\dfrac{x}{2}+1 is the line through the points (0, 1) and (2, 2).
Answer. The line through (0, 1) and (2, 2).
Consider the four lines d_1: y=2x+3, d_2: y=2x-5, d_3: y=-2x+3, d_4: y=2x+3. Find the position of d_1 relative to each of the others.
What you need: compare the gradients and the constants b.
Steps:
- Compare the gradient a of d_1 with each of the others.
- If the gradients are equal, compare b.
Show solution
Two lines y=ax+b and y=a'x+b' (with a\neq0, a'\neq0): they are parallel when a=a' and b\neq b'; coincident when a=a' and b=b'; intersecting when a\neq a'.
The line d_1: y=2x+3 has a=2, b=3.
For d_2: y=2x-5: here a=2 and b=-5. The gradients are equal and 3\neq-5, so d_1\parallel d_2.
For d_3: y=-2x+3: here a=-2\neq2, so d_1 and d_3 intersect. The x-coordinate of the intersection satisfies 2x+3=-2x+3\iff4x=0\iff x=0. Then y=2\cdot0+3=3. So the intersection point is (0, 3).
For d_4: y=2x+3: here a=2 and b=3, the same gradient and the same constant as d_1, so d_1\equiv d_4.
So d_1 is parallel to d_2; d_1 meets d_3 at (0, 3); d_1 coincides with d_4.
Answer. d_1\parallel d_2; d_1 meets d_3 at (0, 3); d_1\equiv d_4.
Write the equation of the line through (0, 4) that is parallel to the line y=3x-1.
What you need: parallel lines have the same gradient.
Steps:
- The gradient we need is 3.
- The line meets the y-axis at (0, 4), so b=4.
Show solution
The line is parallel to y=3x-1, so it has the form y=3x+b with b\neq-1. Since it passes through (0, 4), 4=3\cdot0+b, so b=4\neq-1.
So the equation of the line is y=3x+4.
Answer. y=3x+4.
Suppose two phone plans cost (in dong) A: y=6\,000x+40\,000 and B: y=4\,000x+60\,000 for x extra GB. Say what the gradient means for each plan. For how many GB do the two plans cost the same? Beyond that, which plan is cheaper?
What you need: the gradient is the extra cost per GB; find the intersection by setting the two expressions equal.
Steps:
- Solve 6\,000x+40\,000=4\,000x+60\,000.
- Try a value of x larger than the solution.
Show solution
The gradients 6\,000 and 4\,000 are the price per extra GB of plan A and plan B. The equation 6\,000x+40\,000=4\,000x+60\,000 gives 2\,000x=20\,000, so x=10; both plans then cost 100\,000 dong. For x=11: plan A costs 106\,000 and plan B costs 104\,000, so beyond that plan B is cheaper (smaller gradient).
So at 10 GB the plans cost the same; above 10 GB plan B is cheaper.
Answer. 10 GB; plan B is cheaper above 10 GB.
Suppose road A climbs 6 m while moving 80 m horizontally, and road B climbs 5 m while moving 60 m horizontally. Which road is steeper?
What you need: steepness is the height gained divided by the horizontal distance.
Steps:
- Work out the gradient of each road.
- Compare the two numbers.
Show solution
Road A has gradient \dfrac{6}{80}=0.075. Road B has gradient \dfrac{5}{60}\approx0.0833. Since 0.0833>0.075, road B is steeper.
So road B is steeper than road A.
Answer. Road B.
Find the point of intersection of the lines y=2x-1 and y=-x+5. (Revise linear equations.)
What you need: at the intersection the two values of y are equal.
Steps:
- Solve 2x-1=-x+5.
- Substitute x into one function to find y.
Show solution
The x-coordinate of the intersection of two lines is the solution of the equation obtained by setting the two expressions for y equal: 2x-1=-x+5.
Moving terms, we get 2x+x=5+1, that is 3x=6, so x=2.
Substituting x=2 into y=2x-1, we get y=2\cdot2-1=3.
Check with the other line: y=-2+5=3, correct.
So the point of intersection of the two lines is (2, 3).
Answer. (2, 3).
Prove that the three points A(1, 3), B(2, 5), C(4, 9) are collinear (lie on one straight line).
What you need: three points are collinear when the gradients of AB and AC are equal.
Steps:
- Find the gradient of line AB.
- Find the gradient of line AC and compare.
Show solution
The gradient of AB is \dfrac{5-3}{2-1}=2. The gradient of AC is \dfrac{9-3}{4-1}=\dfrac63=2. The two gradients are equal and the lines AB and AC both pass through A, so they coincide.
So A, B, C are collinear (all lie on the line y=2x+1).
Answer. Proved.
Mini test
Marked like the Vietnamese graduation exam: Part I 0.25 points per question; Part II up to 1 point per question (1, 2, 3, 4 correct statements give 0.1, 0.25, 0.5, 1 point); Part III 0.5 points per question.
Part I. Multiple choice
Writing y=-2x+4 gives a=-2. A takes the constant term, B drops the sign, C gets both sign and value wrong.
a=\dfrac{8-2}{3-1}=3. B forgets to divide, C inverts the ratio, D confuses it with 3-1.
Both lines have a=2 and different b. A and C intersect (different gradients), D coincide.
The gradient is a=-2 and the y-coordinate where it meets the y-axis is b=3. A swaps the two coefficients, B gets the sign of b wrong, D gets the sign of a wrong.
Part II. True or false
| a) The gradient of d is -3. | ||
| b) d rises from left to right. | ||
| c) d meets the y-axis at the point (0, 6). | ||
| d) d is parallel to the line y=-3x+2. |
a) True. b) False: a=-3<0, so d falls. c) True: x=0 gives y=6. d) True: same a=-3 and 6\neq2.
Part III. Short answer
a=\dfrac{9-1}{6-2}=2.
\dfrac{2}{25}=0.08.
Show answers and explanations
- Part I, question 1: D. Writing y=-2x+4 gives a=-2. A takes the constant term, B drops the sign, C gets both sign and value wrong.
- Part I, question 2: A. a=\dfrac{8-2}{3-1}=3. B forgets to divide, C inverts the ratio, D confuses it with 3-1.
- Part I, question 3: B. Both lines have a=2 and different b. A and C intersect (different gradients), D coincide.
- Part I, question 4: C. The gradient is a=-2 and the y-coordinate where it meets the y-axis is b=3. A swaps the two coefficients, B gets the sign of b wrong, D gets the sign of a wrong.
- Part II, question 1: a) True; b) False; c) True; d) True. a) True. b) False: a=-3<0, so d falls. c) True: x=0 gives y=6. d) True: same a=-3 and 6\neq2.
- Part III, question 1: 2. a=\dfrac{9-1}{6-2}=2.
- Part III, question 2: 0.08. \dfrac{2}{25}=0.08.