Straight Lines AA SL
A straight line is fixed by its gradient and one point on it. This page shows how to find the equation of a line from two points or from a gradient and a point, how to move between the three forms of an equation, and how to use the gradient conditions for parallel and perpendicular lines, with worked examples and exam-style questions.
Formulas at a glance
The three forms of the equation of a line, and the gradient formula are in the formula booklet. The conditions for parallel and perpendicular lines are not, so learn them. The midpoint and distance formulas are in its prior learning section.
Gradient-intercept form
In the bookletGeneral form
In the bookletPoint-gradient form
In the bookletParallel line condition
Not in the bookletPerpendicular line condition
Not in the bookletGradient between two points
In the bookletWhich form to use
Pick the form of the equation from the information you are given and the form the answer needs.
| You are given or asked for | Use | Notes |
|---|---|---|
| The gradient and the -intercept | The gradient and the intercept can be read off directly | |
| The gradient and one point | Substitute the gradient and the coordinates of the point, then rearrange if the answer needs another form | |
| Two points | The gradient , then the point-gradient form | Take the differences in the same order on the top and the bottom. Either point gives the same line |
| The answer in the form | Rearrange so that all the terms are on one side | Multiply through to clear fractions so that , and are integers |
| The intercepts of a line | Put for the -intercept and for the -intercept | Works from any form of the equation, including |
| The gradient from | Rearrange into | The gradient is , not |
| A line parallel to a given line | The same gradient, | Then use the point-gradient form with the point the new line must pass through |
| A line perpendicular to a given line | The negative reciprocal gradient, | Find the gradient of the given line first, rearranging if necessary |
| The perpendicular bisector of a segment | The midpoint, then the perpendicular gradient | It passes through the midpoint of the segment at right angles to it |
Section 1 of 2 SL2.1
Equation of a straight line
A straight line has a constant gradient , and its equation can be written as , or . To find an equation, work out the gradient from two points or use the one given, then substitute a point to complete it. Rearranging between forms lets you read off the gradient and the intercepts.
The forms you need
None of these need memorising as such - they're really the same line, written three ways.
Key terms
How do you calculate a gradient from two points?
Divide the change in by the change in : . Subtract the coordinates in the same order on the top and the bottom.
e.g. For and , .
What does the -intercept tell you?
In , the constant is the value of where the line crosses the -axis, at the point . It is the value of when .
e.g. crosses the -axis at .
How do you use point-gradient form?
Substitute the gradient and the coordinates of one point into , then rearrange if a different form is required.
e.g. A line with gradient through has , which rearranges to .
How do you find the intercepts from general form?
Put to find the -intercept, and put to find the -intercept.
e.g. For , gives and gives , so the intercepts are and .
Worked example, step by step
The question No calculator needed [5 marks]
A line passes through the points and . Find the equation of the line, giving your answer in the form , where , and are integers.
Worked solution: worked example
Answer: .
Step 1 - Find the gradient.
M1 - Substitute into the gradient formula A1 -
Why? Two points give you the gradient first. Subtract the coordinates in the same order on the top and the bottom, and put the negative -coordinate in brackets so the sign is not lost.
Step 2 - Use the point-gradient form.
Use the point and : M1 - Use the point-gradient form with a point and the gradient
Why? Once you have the gradient and one point, gives the equation straight away. You can use either point, so choose the one with the easier numbers.
Step 3 - Rearrange into gradient-intercept form.
Expand the bracket: , so A1 -
Why? Writing first makes the gradient and the -intercept easy to see, and it is a safe midway point before you reach the form the question asks for.
Step 4 - Write the answer in the required form.
Move every term to one side: The coefficients , and are integers, so this is in the form . A1 - , with integer coefficients
Why? The question asked for with integer coefficients, so do not leave the answer as . If the equation had fractions, multiply every term by the same number to clear them.
Step 5 - Check.
Substitute the other point : . The point lies on the line.
Why? A line through two points must contain both of them. Substituting the point you did not use in step 2 checks the gradient and the rearranging in one go.
M1 Substitute into the gradient formula
A1
M1 Use the point-gradient form with a point and the gradient
A1
A1 , with integer coefficients
Now you try: enter your answers to be marked
These are real practice questions. Type your answer in each box and press Mark it. The worked solution and mark scheme appear straight away, and your first attempt is the one that counts. Use the keyboard for powers, roots and trig, and the working box for your notes.
Worked solution: practice question 1
Worked solution: practice question 2
Determine the equation of this line.
Worked solution: practice question 3
Your score so far: 0 out of 11 marks
Common mistakes
- Reading the gradient straight off general form without rearranging. In , the gradient is , not - the minus sign only appears once you rearrange into .
- Forgetting to expand the bracket in point-gradient form. is only a finished answer if the question asks for that form specifically - most of the time you still need to multiply out and collect terms to reach .
- Mixing up which coordinate is and which is . Substituting a point as instead of the other way round silently flips the whole equation.
Section 2 of 2 SL2.1
Parallel and perpendicular lines
Two lines are parallel when their gradients are equal, , and perpendicular when the product of their gradients is , . To use these conditions, rearrange each equation into , read off the gradients and compare them. Then build a new line from the required gradient and a given point.
The two gradient conditions
Neither condition is in the formula booklet, so learn both. The job in an exam is spotting which one a question actually wants and applying it to the right gradient.
Key terms
What is a negative reciprocal?
To find the negative reciprocal of a number, turn it upside down and change its sign. A line perpendicular to a line with gradient has gradient equal to the negative reciprocal of .
e.g. The negative reciprocal of is , since . The negative reciprocal of is .
How do you find the gradient of a line from its equation?
Rearrange the equation into form. The gradient is the coefficient of .
e.g. rearranges to , so the gradient is .
How do you find a line parallel to a given line?
Use the same gradient as the given line, then substitute the coordinates of the required point to find the rest of the equation.
e.g. A line parallel to through has , so .
What is a perpendicular bisector?
The perpendicular bisector of a line segment passes through its midpoint at right angles. Its gradient is the negative reciprocal of the gradient of the segment.
e.g. For the segment from to , the midpoint is and the gradient is . The bisector has gradient , so , which gives .
Worked example, step by step
The question No calculator needed [6 marks]
The line has equation . The line is perpendicular to and passes through the point . Find the equation of , giving your answer in the form .
Worked solution: worked example
Answer: .
Step 1 - Find the gradient of the first line.
Rearrange to make the subject: , so The gradient of is . M1 - Rearrange to find the gradient A1 -
Why? You can only read a gradient from . In general form it is , which here is , but rearranging is the safer route.
Step 2 - Find the perpendicular gradient.
For perpendicular lines , so M1 - Use (negative reciprocal) A1 -
Why? Perpendicular gradients are negative reciprocals: turn the fraction upside down and change the sign. Check that .
Step 3 - Use the point-gradient form.
has gradient and passes through : M1 - Use the point-gradient form with and the perpendicular gradient
Why? A gradient and a point are all you need for the point-gradient form. Take care with the double negative: is .
Step 4 - Rearrange into gradient-intercept form.
, so A1 -
Why? Multiplying out gives . Then subtract from both sides to finish. The question asked for , so stop here.
Step 5 - Check.
Put into the answer: . The line passes through .
Why? Checking that the line goes through the given point catches a sign slip in the last two steps. The perpendicular gradient was checked in step 2.
M1 Rearrange to find the gradient
A1
M1 Use (negative reciprocal)
A1
M1 Use the point-gradient form with and the perpendicular gradient
A1
Now you try: enter your answers to be marked
Find
Worked solution: practice question 1
Find
Worked solution: practice question 2
Find
Worked solution: practice question 3
Your score so far: 0 out of 9 marks
Common mistakes
- Assuming parallel lines are identical. only guarantees the lines never meet - they can still have different -intercepts and so be distinct, non-overlapping lines.
- Forgetting the negative reciprocal for perpendicular gradients. A gradient of gives a perpendicular gradient of , not - both the sign and the flip matter.
- Comparing gradients before rearranging into . If a line is given as , its gradient is , not - always isolate before reading off and applying either condition.
Syllabus content covered
| Code | Syllabus content |
|---|---|
| SL2.1 | Different forms of the equation of a straight line. (gradient-intercept form). (general form). (point-gradient form). Gradient; intercepts. Parallel lines . Perpendicular lines . |
Official IB source: Mathematics: analysis and approaches subject brief (PDF, ibo.org).
Quick questions
What forms can the equation of a straight line take?
Gradient-intercept form , general form , and point-gradient form when you know the gradient and one point on the line.
How do I know if two lines are parallel?
Two lines are parallel exactly when their gradients are equal, . They can still have different -intercepts and so never actually touch.
How do I find the gradient from the general form ?
Rearrange into first. The gradient is , not - the sign flips because you divide the term by when isolating .
How do I find the gradient of a line perpendicular to a given one?
Take the negative reciprocal of the given gradient, since perpendicular gradients satisfy . A gradient of gives a perpendicular gradient of .
How do I find the equation of a line through two points?
Find the gradient first, then substitute it and one of the points into . For and , and , so .
How do I show that two lines are perpendicular?
Find both gradients and multiply them. If the product is , the lines are perpendicular. For and , the gradients are and , and their product is .
How do I write in general form?
Move every term to one side, which gives . Multiplying every term by the same non-zero number gives an equivalent equation, such as .
How do the gradient rules work for horizontal and vertical lines?
A horizontal line has gradient and a vertical line has no defined gradient, so the product rule cannot be used. Every vertical line is perpendicular to every horizontal line.
How do I check whether a point lies on a line?
Substitute its coordinates into the equation. If both sides are equal, the point lies on the line. For , the point lies on the line because .
How do I find the line through perpendicular to ?
The perpendicular gradient is , so . Expanding gives .
Ready to practise properly?
Practice questions on every section, marked instantly like the real exam.