Equation of a straight line
Studying this course? Keep your progress in one place.
Key facts
- The gradient through two points is , using the same order top and bottom.
- A line with gradient and -intercept is .
- Given a point and a gradient, use .
- Given two points, find first, then use either point.
- In the general form , the gradient is .
Gradient and y = mx + c
The gradient is rise over run, and a line with gradient and -intercept has equation .
The gradient between and is . Through and : .
A positive gradient rises left to right, a negative one falls, and a horizontal line has . A vertical line has no gradient: write . The -intercept is where .
What is the gradient of the line through and ?
Point and gradient
With gradient through , the equation is .
This is the quickest route when you are given a point and a gradient. Rearrange to only if the question asks.
- Point and gradient
Worked example
Find the equation of the line with gradient through .
- 1
Substitute into : .
- 2
Expand: .
- 3
Add 5 to both sides.
Which is the equation of the line with gradient through ?
Line through two points
Find , then use with either point.
Equivalently, use the two-point form .
Either point gives the same line, so use whichever has simpler numbers.
Worked example
Find the equation of the line through and .
- 1
Gradient: .
- 2
Use : .
The line through and has equation:
The form ax + by + c = 0
Clear fractions and move every term to one side, so , and are integers.
Many questions ask for general form with integer , , . Any integer multiple of the equation is also correct.
Rearrange to to read off the gradient: for it is and the -intercept is .
- Gradient
- y-intercept
Worked example
Write in the form with integer coefficients.
- 1
Multiply by 4: .
- 2
Expand: .
- 3
Move everything to the left.
What is the gradient of ?
Intercepts and midpoints
A line meets the -axis where and the -axis where ; the midpoint averages the coordinates.
For the intercepts are and . The triangle they form with the origin has area .
The midpoint is often needed to build a line.
- Midpoint of and
What is the midpoint of and ?
Try an exam question
The line passes through and . Find an equation for in the form , where , and are integers.
[4 marks]
- [1]Finds the gradient .
- [1]Uses (or equivalent with ).
- [1]Clears the fraction: .
- [1]Obtains .
That's the notes covered.
Carry on to the next subtopic.
Try a question
Find the gradient of .
1 mark, marked against the mark scheme
Find the gradient of .
1 mark, marked against the mark scheme