What Is a Function?

A function is a rule with no ambiguity: one input, exactly one output. That is the whole definition.

Press B4 on a vending machine and a packet of crisps drops out. Press B4 again tomorrow — crisps again.

press B4 and you always get the same snack B4 A3 A4 B3 B4 C3 C4 D3 D4 collect here one button in, one snack out — every single time

That reliability is the whole point of the machine. A machine that gave crisps sometimes and a drink other times would be useless, and nobody would put money in it.

Notice what is allowed, though. B4 and C2 might both give crisps. Two buttons, one snack — that is fine.

What is never allowed is one button giving two different things.

A function is exactly that machine: each input gives exactly one output. Repeats on the output side are fine; a repeated input with different outputs breaks it.

A function machine multiplying by three then adding two 4 input x ×3, then +2 f(x) = 3x + 2 the rule 14 output y one input in, exactly one output out — that is what makes it a function

The test for a function

Ask one question of every input: does it have more than one output? If yes, not a function. If no, it is one.

The input 2 may not go to both 5 and 9. But two different inputs may share an output — that is perfectly allowed.

A vending machine is the image to hold: press B4 and you get the same thing every time.

Repeats are fine on the output side

{(1, 4), (2, 4), (3, 4)} is a function. {(1, 4), (1, 9)} is not. Look for a repeated input, nothing else.

The vertical line test

On a graph, slide an imaginary vertical line across. If it ever touches the curve twice at once, that x has two y values, so it is not a function.

Straight lines pass, except vertical ones. Parabolas pass. Circles fail.

It is the same test as before, drawn instead of listed.

Use the edge of a ruler

Lay a ruler vertically on the graph and slide it. Two crossings anywhere means not a function. Physically doing it is faster than reasoning about it.

Function notation

f(x) is a name for the output, not multiplication. f(x) = 3x + 1 and y = 3x + 1 say the same thing.

f(4) means substitute 4 for x: f(4) = 3(4) + 1 = 13.

Going the other way, "f(x) = 13, find x" means solve 3x + 1 = 13, giving x = 4.

f(4) is not f × 4

The brackets mean "evaluate at". If f(x) = x2 then f(3) = 9, not 3f.

Linear or not

A function is linear if its graph is a straight line — equivalently, if equal steps in x give equal steps in y.

In a table, take the differences between consecutive y values. Constant differences mean linear.

y = x2 gives differences 1, 3, 5, 7 — not constant, so not linear. y = 3x gives 3, 3, 3 — linear.

Check the x steps too

Constant y differences only prove linearity if the x values also step evenly. Check both columns.

Describing a graph in words

Say where it increases, where it decreases, and where it is flat. Say whether it is linear or curved.

Name the intercepts if they matter, and any maximum or minimum.

These qualitative descriptions are worth real marks and need no calculation at all.

Worked examples

Is it a function?

Is {(2, 5), (4, 9), (2, 7), (6, 1)} a function?

  1. List the inputs: 2, 4, 2, 6 Only the inputs matter for this test.
  2. The input 2 appears twice, going to 5 and to 7. One input, two different outputs.
  3. So it is not a function. The definition is broken by that one pair.

No — the input 2 has two outputs

Evaluating

If f(x) = 2x2 - 5, find f(-3).

  1. Replace every x with -3: f(-3) = 2(-3)2 - 5 Substitute with brackets around the negative.
  2. (-3)2 = 9 Square first: a negative squared is positive.
  3. 2(9) - 5 = 18 - 5 = 13 Then multiply, then subtract.

f(-3) = 13

Linear from a table

Is this linear? x: 1, 2, 3, 4 and y: 5, 8, 11, 14.

  1. x steps: +1, +1, +1 — even. Check the inputs first.
  2. y differences: 3, 3, 3 8 - 5 = 3, 11 - 8 = 3, 14 - 11 = 3.
  3. Constant, so linear with slope 3. At x = 1, y = 5, so b = 2: the rule is y = 3x + 2.

Yes — linear, y = 3x + 2

Words to know

Function
A relationship where each input gives exactly one output.
Input / output
What goes in (x) and what comes out (y).
Domain
The set of allowed inputs.
Range
The set of outputs that actually occur.
Function notation
f(3) = 7 means: feed in 3, get out 7.

Mistakes to watch for

Rejecting a function because an output repeats. {(1, 4), (2, 4), (3, 4)} is a perfectly good function — three buttons, same snack. Only a repeated input with different outputs disqualifies it.

Reading f(x) as f times x. The brackets mean "evaluate at," so f(3) is the output when the input is 3. If f(x) = x2 then f(3) = 9, not 3f.

Forgetting brackets around a negative. f(-3) with f(x) = x2 means (-3)2 = 9. Typing -32 gives -9, because then the exponent only attaches to the 3.

Calling a table linear from the y column alone. Constant differences only mean linear if the x values also step evenly. Check both columns, or a table that jumps 1, 2, 4 in x will fool you.

The notation f(x) was introduced by Leonhard Euler in 1734. He also gave us e, π as we write it, i, and the summation sign Sigma.

Euler went blind in his sixties and still produced roughly half of his total work afterwards, dictating it to his sons.

He is often called the most prolific mathematician in history; it took a society of editors more than a century just to publish his collected papers.

Browse all courses