IB Mathematics: Analysis and Approaches · Topic 2 · Functions
2.1 Equations of straight lines
Find the equation of a straight line, read its gradient and intercept, test for parallel or perpendicular lines, and find where two lines meet.
1/5The gradient measures how steeply a line rises
- The gradient measures how steeply a line rises
- A line’s equation can show its gradient and intercept directly
- A point and a gradient fix exactly one line
- Gradients tell you if two lines are parallel or perpendicular
- Two lines meet where both equations give the same point
- Check your recall
- Practice: 10 questions
Part 1 of 5: The gradient measures how steeply a line rises
A ramp that rises 1 m for every 4 m along the ground has a steady slope. A straight line works the same way. Its steepness is the gradient, and it is the same everywhere on the line.
To find it, choose two points on the line. Divide the change in by the change in , so that . A positive gradient rises to the right, and a negative gradient falls. A horizontal line has gradient 0.
Worked example
Find a gradient
- Label the points: and .
- Substitute: .
- Simplify: .
Answer: The gradient is 2.
Key term
gradient
The gradient of a line is the change in divided by the change in between any two points on it.
Part 2 of 5: A line’s equation can show its gradient and intercept directly
Now that the gradient has a name, look for it in an equation. Most lines are written as . Here is the gradient and is the y-intercept.
The y-intercept is where the line crosses the -axis, so there. For , the gradient is 3. The line crosses the -axis at . Putting into the equation gives the same point.
Equations are not always arranged this way. For , make the subject first.
Worked example
Read a gradient and intercept
- Subtract from both sides: .
- Divide every term by 3: .
- Compare with .
Answer: The gradient is and the -intercept is 2.
Key term
y-intercept
The y-intercept is the -coordinate of the point where a line crosses the -axis.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: B · Worked explanation
Part 3 of 5: A point and a gradient fix exactly one line
Often you know a gradient and one point, not the intercept. Suppose a line has gradient and passes through . Its equation is .
This works because every point on the line must give the same gradient with . Expanding and rearranging gives . Some questions ask for the form , where , and are integers.
If you are given two points instead, first find from them. Then use either point in the same formula. The final equation does not depend on which point you choose.
Worked example
Equation from a point and gradient
- Use with and .
- Substitute: .
- Expand: .
- Add 5 to both sides: .
Answer: The equation is .
Part 4 of 5: Gradients tell you if two lines are parallel or perpendicular
Think of the two rails of a railway track. They run side by side and never meet. Parallel lines have equal gradients, so .
Two lines at a right angle are different. Perpendicular lines meet at . Their gradients satisfy , so . Flip the fraction and change the sign.
For example, gradients 3 and give a product of -1. Those two lines are perpendicular. Vertical lines have no gradient, so these rules do not cover them. A vertical line is perpendicular to a horizontal line.
Worked example
Perpendicular line through a point
- The given gradient is 2, so the perpendicular gradient is .
- Use : .
- Expand: .
- Add 3: .
Answer: The equation is .
Key terms · tap one for its definition
parallel lines
Parallel lines are lines in the same plane that never meet; non-vertical parallel lines have equal gradients.
perpendicular lines
Perpendicular lines meet at a right angle; if neither is vertical, their gradients multiply to give -1.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: C · Worked explanation
Part 5 of 5: Two lines meet where both equations give the same point
Two lines that are not parallel cross at exactly one place. At that place, both equations share the same and . Where two graphs cross, the crossing places are called intersection points.
For two lines written as , set the right-hand sides equal. Solve for . Then substitute back into either equation to find . The pair of values you obtain is the intersection point.
Worked example
Intersection of two lines
- Set the expressions for equal: .
- Add to both sides: .
- Subtract 1 and divide by 3: .
- Substitute into : .
Answer: The lines meet at .
If the gradients are equal and the intercepts differ, the lines are parallel and never meet. If both equations describe the same line, every point is shared. Check by substituting and into the other equation.
Key term
intersection points
Intersection points are points where two curves have the same - and -coordinates.
Check your recall[16 marks]
6 written questions. Answer each one in your head or on paper, then open the mark scheme.
- 1.Calculate[2 marks]
Calculate the gradient of the line through and .
Show mark schemeHide mark scheme
Model answer
.
- 1 mark for substituting the coordinates into
- 1 mark for obtaining a gradient of -2
- 2.Determine[3 marks]
Determine the equation of the line with gradient 3 that passes through . Give your answer in the form .
Show mark schemeHide mark scheme
Model answer
, so and .
- 1 mark for using with the given values
- 1 mark for expanding correctly
- 1 mark for obtaining
- 3.Determine[3 marks]
Determine the gradient and -intercept of the line .
Show mark schemeHide mark scheme
Model answer
Rearranging gives , so . The gradient is and the -intercept is 3.
- 1 mark for rearranging to make the subject
- 1 mark for stating the gradient
- 1 mark for stating the -intercept 3
- 4.Deduce[3 marks]
Deduce whether the lines and are perpendicular.
Show mark schemeHide mark scheme
Model answer
The first gradient is 3. Rearranging the second gives , so its gradient is . The product is , so the lines are perpendicular.
- 1 mark for finding the gradient 3 of the first line
- 1 mark for rearranging the second line to find gradient
- 1 mark for showing the product is -1 and concluding the lines are perpendicular
- 5.Determine[3 marks]
Determine the intersection point of and .
Show mark schemeHide mark scheme
Model answer
Set , so and . Then . The intersection point is .
- 1 mark for equating the two expressions for
- 1 mark for solving to obtain
- 1 mark for substituting to obtain
- 6.Explain[2 marks]
Explain why two different parallel lines have no intersection point.
Show mark schemeHide mark scheme
Model answer
Parallel lines have equal gradients but different intercepts. They stay the same distance apart, so no point satisfies both equations.
- 1 mark for stating that parallel lines have equal gradients and different intercepts
- 1 mark for explaining that no and satisfy both equations, so the lines never meet

Practice this topic
10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)
0 right0 of 10 answered
Includes the 2 quick checks in the note above.
EasyState[1 mark]
Show answer and explanation
Answer: D · Worked explanation
MediumDetermine[2 marks]
Show answer and explanation
Answer: A · Worked explanation
MediumDetermine[2 marks]
Show answer and explanation
Answer: B · Worked explanation
MediumDetermine[1 mark]
Show answer and explanation
Answer: C · Worked explanation
MediumDetermine[2 marks]
Show answer and explanation
Answer: D · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: C · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: D · Worked explanation