Practice Linear functions

A linear function has the form f(x) = mx + b, with constant slope m and vertical intercept b.

Its graph is a straight line.

Exercises with solutions

A linear function has the form y = mx + b. b is the y-intercept; m is the change in y for each unit increase in x. Calculate two points and draw the straight line. When b = 0, the relationship is proportional.

xy012135y = 2x + 1
The line y = 2x + 1 contains (0, 1), (1, 3) and (2, 5). One step right means two steps up.

Exercise 1

For y = 2x + 1, find y when x = 0, 1 and 2.

Show solution and working

1, 3, 5

Substitute: 2 × 0 + 1 = 1, 2 × 1 + 1 = 3 and 2 × 2 + 1 = 5. These points lie on the plotted line.

Exercise 2

Find the slope and y-intercept of y = −3x + 4.

Show solution and working

m = −3; b = 4

The coefficient of x is the slope. The constant 4 is the y-intercept. Each step right reduces y by 3.

Exercise 3

A line passes through (0, 2) and (3, 8). Find its equation.

Show solution and working

y = 2x + 2

The slope is (8 − 2) ÷ (3 − 0) = 2. At x = 0, y = 2, so b = 2.

Exercise 4

A taxi charges €4 plus €2 per kilometre. Write its cost function. Is it proportional?

Show solution and working

K(x) = 2x + 4; not proportional

x is the distance in kilometres and K(x) is the fare in euros. The fixed fee gives b = 4, so the line does not pass through the origin.

Common mistake

Do not swap m and b. Slope is the change in y divided by the change in x. A straight-line relationship is proportional only when b = 0.

Keep learning with MatheJump

Create a free account and explore math practice. Choose from the available exercises to suit your learning needs.

Area: FunctionsFrom grade 7 · Grades follow the North Rhine-Westphalia curriculum; other German states may introduce topics at different times.
Back to all topics