IB Mathematics: Applications and Interpretation · Topic 2 · Functions
2.1 Straight lines
Find the equation of a straight line, interpret its gradient and intercepts, plot it, and test whether two lines are parallel or perpendicular.
1/5Gradient measures how steeply a line rises
Part 1 of 5: Gradient measures how steeply a line rises
Compare two ramps. One rises 1 cm for every 4 cm across. The other rises 1 cm for every 2 cm, so it is steeper. The gradient measures this steepness as the vertical change divided by the horizontal change.
For points and , the gradient is . Any two points on the same line give the same value.
- Positive gradient: the line rises from left to right.
- Negative gradient: the line falls from left to right.
- Zero gradient: the line is horizontal.
- Undefined gradient: the line is vertical.
A steeper line has a gradient with a larger size, ignoring the sign.
Worked example
Calculate a gradient
- Use .
- Substitute: .
Answer: The gradient is .
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 can be written in three standard forms
With the gradient known, you can write the equation of the line. Three forms are common.
- Gradient–intercept form:
- Point–gradient form:
- General form:
The form you choose depends on the information given. Rearranging between forms is a routine skill.
In , the constant gives the y-intercept, the point where the line crosses the vertical axis. The x-intercept is where the line crosses the horizontal axis. Find it by setting .
Worked example
Find an equation
- Use : .
- Expand: .
- Rearrange: .
Answer: , or
Key terms · tap one for its definition
y-intercept
The y-intercept of a line is the -coordinate of the point where it crosses the vertical axis, where .
x-intercept
The x-intercept of a line is the -coordinate of the point where it crosses the horizontal axis, where .

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: B · Worked explanation
Part 3 of 5: Gradient and intercepts carry meaning in context
A line often models a real situation, so each number needs a meaning. Suppose a taxi charges a fixed fee plus a rate for each kilometre. The cost in euros for a journey of km is .
The gradient is . Each extra kilometre adds 1.50 euros. The -intercept is 4.00 euros, the fixed fee before any distance.
Not every intercept is meaningful. Here the -intercept would be a negative distance. The model applies only for .
Worked example
Use a linear model
- Cost of 12 km: .
- Distance for 31 euros: , so .
- Divide: .
Answer: The 12 km journey costs 22 euros, and 31 euros pays for 18 km.
Part 4 of 5: Two points are enough to plot a straight line
To draw a line from its equation, you need only two points on it. The intercepts are usually the easiest to find.
- Set to find the -intercept.
- Set to find the -intercept.
- Plot both points.
- Join them with a ruler and extend the line.
Worked example
Plot a line
- Set : , so .
- Set : , so .
- The line passes through and .
Answer: The -intercept is and the -intercept is .
The line slopes downward because its gradient is negative. Each step of 3 to the right takes the line down by 2.
A third point makes a good check. If it lies off your line, one of the intercepts is wrong.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 5 of 5: Parallel and perpendicular lines have linked gradients
Gradients also show how two lines sit relative to each other. Two lines are parallel when they have equal gradients, , and never meet. Two lines are perpendicular when they meet at a right angle.
For perpendicular lines, . So the perpendicular gradient is the negative reciprocal, .
Find a negative reciprocal by flipping the fraction and changing its sign. For example, becomes . Equal gradients with equal intercepts give the same line.
Worked example
Find a perpendicular line
- The given gradient is 2, so .
- Use : .
- Expand: .
Answer:
Key terms · tap one for its definition
parallel
Parallel lines have equal gradients, , and never meet unless they are the same line.
perpendicular
Perpendicular lines meet at a right angle, and their gradients satisfy when neither line is vertical.
Check your recall[14 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 into correctly
- 1 mark for obtaining
- 2.Determine[3 marks]
Determine the equation of the line with gradient -2 through the point . Give it in the form .
Show mark schemeHide mark scheme
Model answer
, so . Hence .
- 1 mark for using with the given values
- 1 mark for expanding the brackets correctly
- 1 mark for obtaining
- 3.State[2 marks]
State the coordinates of the -intercept and the -intercept of .
Show mark schemeHide mark scheme
Model answer
Setting gives , so the -intercept is . Setting gives , so the -intercept is .
- 1 mark for giving the -intercept
- 1 mark for giving the -intercept
- 4.Explain[2 marks]
The monthly cost in euros of a gym is , where is the number of months. Explain the meaning of the numbers 18 and 30.
Show mark schemeHide mark scheme
Model answer
The gradient 18 means the cost rises by 18 euros for each extra month. The -intercept 30 is the fixed cost, in euros, at , before any months are paid.
- 1 mark for interpreting the gradient 18 as the cost increase of 18 euros per month
- 1 mark for interpreting 30 as the fixed cost at the start
- 5.Determine[2 marks]
Determine whether the lines and are parallel.
Show mark schemeHide mark scheme
Model answer
The first line is , with gradient 2. The second line also has gradient 2 and a different intercept, so the lines are parallel.
- 1 mark for rearranging the first line to find gradient 2
- 1 mark for stating that the gradients are equal, so the lines are parallel
- 6.Determine[3 marks]
Determine the equation of the line perpendicular to that passes through . Give it in the form .
Show mark schemeHide mark scheme
Model answer
The perpendicular gradient is -2. Then , so .
- 1 mark for finding the perpendicular gradient -2
- 1 mark for using with
- 1 mark for obtaining

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
MediumCalculate[1 mark]
Show answer and explanation
Answer: C · Worked explanation
MediumDetermine[2 marks]
Show answer and explanation
Answer: B · Worked explanation
MediumExplain[1 mark]
Show answer and explanation
Answer: A · Worked explanation
MediumIdentify[1 mark]
Show answer and explanation
Answer: D · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: C · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: B · Worked explanation
HardDeduce[2 marks]
Show answer and explanation
Answer: A · Worked explanation