Lower and upper secondary

Linear functions – understand y = kx + m

A function describes a relationship. For a straight line, k gives the slope and m gives where the line crosses the y-axis.

Try six questions

3.1The concept of a function

A function is a rule that takes a value and returns one particular value. Think of a machine: you put in a number x, and the machine returns the number f(x).

x input f function f(x) output

For example, if f(x) = 2x + 3, then:

  • f(0) = 2·0 + 3 = 3
  • f(1) = 2·1 + 3 = 5
  • f(5) = 2·5 + 3 = 13

For each x there is one and only one value f(x).

The vertical line test

function ✓ not a function ✗

Draw a vertical line through the graph:

  • If it crosses the graph at at most one point for any x value → it is a function.
  • If it crosses at two or more points → it is not a function.

A circle, for example, is not a function, because a vertical line crosses it at two points.

Domain and range

Two important concepts when discussing functions:

  • The domain (Df): all the x values the function can take.
  • The range (Vf): all the y values the function returns.
Example: For f(x) = √x, we need x ≥ 0, so Df = [0, →⟩ and Vf = [0, →⟩. For g(x) = 1/x, x cannot be 0, so Dg = all numbers except 0.

The graph of a function

x y (1, 5) f(x)=2x+3

The graph consists of all the points (x, f(x)) plotted on coordinate axes.

To read the graph:

  • Choose an x value on the x-axis.
  • Go straight up (or down) to the graph.
  • Go horizontally to the y-axis — that is f(x).

Example: at x = 1, f(1) = 5, so the point (1, 5) lies on the graph.

Table of values

A table of values shows a selection of (x, f(x)) pairs. Example for f(x) = x² − 2:

x−2−1012
f(x)2−1−2−12
Tip: A table of values is useful when drawing a graph by hand. Choose 5–7 sensible x values around 0.

3.3Linear functions

A linear function has a straight-line graph. General form:

f(x) = a·x + b
  • a = slope (how steep the line is)
  • b = constant term (intersection with the y-axis)
x y b Δx Δy a = Δy/Δx

The slope between two points (x₁, y₁) and (x₂, y₂):

a = (y₂ − y₁) / (x₂ − x₁)
  • a > 0: the line rises
  • a < 0: the line falls
  • a = 0: horizontal line

Point–slope form

If you know one point (x₁, y₁) and the slope a:

y − y₁ = a · (x − x₁)

Example: find the line through (1, 2) and (3, 8)

Find the slope a. a = (8 − 2) / (3 − 1) = 6/2 = 3
Use point–slope form. With (1, 2) as the known point. y − 2 = 3·(x − 1)
Simplify. y = 3x − 3 + 2 = 3x − 1
Answer: the line is y = 3x − 1.

Linear growth models

Use a linear function when something increases or decreases by the same amount per unit of time (constant change). Examples: a car travelling at a constant speed, a pool filling at a constant rate, a monthly fee.

3.2Intersections

Intersections are points where the graph crosses an axis or where two graphs cross each other.

Intersection with the y-axis

x y (0, f(0))

Set x = 0 in the function expression. This gives the y coordinate where the graph crosses the y-axis.

Intersection with the y-axis = (0, f(0))

Example: f(x) = 3x − 6 ⇒ f(0) = −6. The graph crosses the y-axis at (0, −6).

Intersections with the x-axis (roots)

x y x = −2 x = 2

Set f(x) = 0 and solve for x. These x values are called roots.

Intersections with the x-axis: solve f(x) = 0

Example: f(x) = x² − 4 ⇒ x² − 4 = 0 ⇒ x = ±2. The roots are at (−2, 0) and (2, 0).

Not every graph has roots! For f(x) = x² + 1, we get x² = −1, which has no solution among the real numbers. The graph lies entirely above the x-axis and never crosses it. That is perfectly valid — it simply means that f has no roots.

Intersections between two graphs

(a, b)

Two graphs meet where f(x) = g(x). Solve the equation for x, then find the y value by substituting x into either function.

Intersection of f and g: solve f(x) = g(x)

Example: f(x) = 2x + 1 and g(x) = −x + 4. Set them equal: 2x + 1 = −x + 4 ⇒ 3x = 3 ⇒ x = 1. Then y = f(1) = 3. They intersect at (1, 3).

Ready to try it yourself?

Try six questions at your own pace and get tips on which section to start with. No account needed.

Try six questions

Selected explanations for practice and revision. Levels may vary between examples.