The equation of a non-vertical line gives its gradient and y-intercept
The equation of a line is the rule that links x{x}x and y{y}y for every point on it. Unless the line is vertical, its usual form shows the line's gradient and y{y}y-intercept.
Gradient
The gradient of a line is the change in y{y}y when x{x}x increases by 1.
y-intercept
The y{y}y-intercept is the value of y{y}y where a line crosses the y{y}y-axis.
Each number in y=2x+1{y = 2x + 1}y=2x+1 matches a feature of the graph.
The usual form is:
y=mx+c y = mx + c y=mx+cwhere:
- (x,y){(x, y)}(x,y) is any point on the line
- m{m}m is the gradient
- c{c}c is the y{y}y-intercept
With y{y}y on its own, m{m}m is the number multiplying x,{x\text{,}}x, sign included.
Reading the gradient and y-intercept
Write down the gradient of y=5−3x{y = 5 - 3x}y=5−3x and where the line crosses the y{y}y-axis.
- Reordered, the equation is y=−3x+5,{y = -3x + 5\text{,}}y=−3x+5, so the gradient is −3.{-3\text{.}}−3.
- c=5,{c = 5\text{,}}c=5, so the line crosses the y{y}y-axis at (0,5).{(0, 5)\text{.}}(0,5).
Wrong. The gradient of 2y=6x+10{2y = 6x + 10}2y=6x+10 is 6.
Right. y{y}y must be on its own first. Dividing every term by 2 gives y=3x+5,{y = 3x + 5\text{,}}y=3x+5, so the gradient is 3.
Find the equation of a line from its graph
Read c{c}c where the line crosses the y{y}y-axis, not the x{x}x-axis, then find m{m}m from a right-angled triangle on the line.
L{L}L meets the y{y}y-axis at a grid point, so c{c}c is read exactly.
Count both shorter sides of the triangle on the axis scales, as in the guide Gradient of a Line:
m=change in ychange in x m = \frac{\text{change in } y}{\text{change in } x} m=change in xchange in yWrong. A line rises 6 as it goes 2 across, so its gradient is 26=13.{\dfrac{2}{6} = \dfrac{1}{3}\text{.}}62=31.
Right. Gradient is change in y{y}y divided by change in x,{x\text{,}}x, up over across, so it is 62=3.{\dfrac{6}{2} = 3\text{.}}26=3.
Settle the sign of m{m}m from the slope before writing the equation.
Finding an equation from a graph
Find an equation for line L,{L\text{,}}L, which passes through (0,5),{(0, 5)\text{,}}(0,5), (3,3){(3, 3)}(3,3) and (6,1).{(6, 1)\text{.}}(6,1).
- L{L}L crosses the y{y}y-axis at (0,5),{(0, 5)\text{,}}(0,5), so c=5.{c = 5\text{.}}c=5.
- L{L}L slopes down to the right, so m{m}m is negative. As x{x}x rises 3, y{y}y falls 2, so m=−23{m = -\dfrac{2}{3}}m=−32 and y=−23x+5.{y = -\dfrac{2}{3}x + 5\text{.}}y=−32x+5.
- At x=6,{x = 6\text{,}}x=6, y=−23×6+5=−4+5=1,y = -\dfrac{2}{3} \times 6 + 5 = -4 + 5 = 1\text{,}y=−32×6+5=−4+5=1, which matches (6,1).{(6, 1)\text{.}}(6,1).
Wrong. A line passes through (0,1){(0, 1)}(0,1) and (2,7),{(2, 7)\text{,}}(2,7), so its equation is y=2x+7.{y = 2x + 7\text{.}}y=2x+7.
Right. An equation must fit every point, and y=2x+7{y = 2x + 7}y=2x+7 does not fit (0,1).{(0, 1)\text{.}}(0,1). Here m=7−12−0=3{m = \dfrac{7 - 1}{2 - 0} = 3}m=2−07−1=3 and c=1,{c = 1\text{,}}c=1, so y=3x+1,{y = 3x + 1\text{,}}y=3x+1, which fits both points.
Find a line's equation from two points or a point and a gradient
Without a graph, find m{m}m if it is not given, then substitute one point into y=mx+c{y = mx + c}y=mx+c and solve for c.{c\text{.}}c.
The y{y}y-intercept is 3, found by substituting, not 4, the y{y}y-coordinate of (2,4).{(2, 4)\text{.}}(2,4).
A point and a gradient
Find the equation of the line with gradient −4{-4}−4 that passes through (3,2).{(3, 2)\text{.}}(3,2).
- Substituting x=3{x = 3}x=3 and y=2{y = 2}y=2 into y=−4x+c{y = -4x + c}y=−4x+c gives 2=−4×3+c=−12+c{2 = -4 \times 3 + c = -12 + c}2=−4×3+c=−12+c.
- Adding 12 to both sides gives c=14,{c = 14\text{,}}c=14, so the equation is y=−4x+14.{y = -4x + 14\text{.}}y=−4x+14.
Find an equation for L{L}L asks for a rule linking x{x}x and y,{y\text{,}}y, so write y=…,{y = \ldots\mathclose{\text{,}}}y=…, not L=….{L = \ldots\mathclose{\text{.}}}L=…. Any correct equation scores in full unless a form such as y=mx+c{y = mx + c}y=mx+c is asked for.
Use a line's equation to find where two lines meet or a point on it (Higher)
Where two lines meet, both equations give the same y{y}y for the same x,{x\text{,}}x, so set the two expressions for y{y}y equal.
The coordinates of P{P}P come from the two equations, not from reading the graph.
In a longer problem:
- List what is given and needed, and assume no right angle that is not stated.
- Find each line's gradient, then its equation.
- Set two expressions for y{y}y equal, or substitute a known coordinate.
Where two lines meet
L1{L_1}L1 passes through A(1,7){A(1, 7)}A(1,7) and B(4,1),{B(4, 1)\text{,}}B(4,1), and L2{L_2}L2 is y=x+3.{y = x + 3\text{.}}y=x+3. Find the point P{P}P where they meet, and the point C{C}C on L1{L_1}L1 where x=6.{x = 6\text{.}}x=6.
- The gradient of L1{L_1}L1 is 1−74−1=−63=−2.{\dfrac{1 - 7}{4 - 1} = \dfrac{-6}{3} = -2\text{.}}4−11−7=3−6=−2.
- Substituting A(1,7){A(1, 7)}A(1,7) into y=−2x+c{y = -2x + c}y=−2x+c gives 7=−2×1+c,{7 = -2 \times 1 + c\text{,}}7=−2×1+c, so c=9{c = 9}c=9 and L1{L_1}L1 is y=−2x+9.{y = -2x + 9\text{.}}y=−2x+9.
- At P,{P\text{,}}P, −2x+9=x+3,{-2x + 9 = x + 3\text{,}}−2x+9=x+3, so 6=3x{6 = 3x}6=3x and x=2.{x = 2\text{.}}x=2. Then y=2+3=5,{y = 2 + 3 = 5\text{,}}y=2+3=5, so P{P}P is (2,5).{(2, 5)\text{.}}(2,5).
- At C,{C\text{,}}C, y=−2×6+9=−3,{y = -2 \times 6 + 9 = -3\text{,}}y=−2×6+9=−3, so C{C}C is (6,−3).{(6, -3)\text{.}}(6,−3).
Label each result, such as P(2,5),{P(2, 5)\text{,}}P(2,5), since later method marks can follow from a clearly labelled wrong value.
Check your understanding of the equation of a line
- Why is one point not enough to find an equation of a line?
- How can you tell from a graph whether a gradient is positive or negative?
What is an equation of the line that crosses the x{x}x-axis at (2,0){(2, 0)}(2,0) and the y{y}y-axis at (0,6)?{(0, 6)\text{?}}(0,6)?
Solution
y=−3x+6{y = -3x + 6}y=−3x+6
Where does the line 2y=8x−6{2y = 8x - 6}2y=8x−6 cross the y{y}y-axis?
Solution
(0,−3){(0, -3)}(0,−3)