Functions

Stage 10 of 23 Strand 1 of 9 23 lessons

23 illustrated lessons, each teaching the why before the how.

Revise Functions with flashcards →

Jump to a lesson

Function Notation

f(4) means put 4 in, not f times 4.

A function is a machine that turns each input into exactly one output

f(x) names a rule. Whatever goes in, the rule says what comes out.

f(4) does not mean f times 4. It means put 4 in where the x is.

Plot every input against its output and the rule becomes a picture.

Now you

f(x) = 5x + 1. What is f(8)?

f(x) = 5x + 6. What is f(5)?

Domain and Range

What may go in, and what can come out.

The domain is what you are allowed to put in and the range is what can come out

Square anything you like: every number is allowed in. That input set is the domain.

But nothing below zero ever comes out. The range stops at 0.

Here x cannot be zero at all, because dividing by zero has no answer.

And a square root needs what is inside to be 0 or more, so its domain starts at 0.

Now you

f(x) = 1 / (x − 6). Which input is not allowed?

f(x) = x² + 9. What is the smallest output?

Piecewise Functions

One rule for some inputs, another for the rest.

A piecewise function gives a different rule on each stretch of its domain

One function can carry two rules, each with the inputs it governs.

To evaluate, first ask which stretch the input falls in — then use that rule.

x = 8 lies in the other stretch, so the second rule is the one that answers.

The boundary belongs to whichever rule carries the "or equal to".

Now you

f(x) = 4x + 1 for x < 5, and 14 − x for x ≥ 5. What is f(5)?

f(x) = 3x + 1 for x < 2, and 10 − x for x ≥ 2. What is f(4)?

Graphing a Piecewise Function

Filled where the point is in, hollow where not.

Each rule is drawn only over its own stretch, and the endpoints say which piece owns the boundary

Two rules again, and this time they disagree about x = 2.

Draw each rule only across the inputs it owns, and the graph breaks at x = 2.

A hollow dot marks a point that is not there; a filled dot marks one that is.

The strict < leaves that end open; the closes the other one.

Change the second rule to 5 − x and both give 3 at x = 2, so the break closes.

Now you

f(x) = x + 1 for x < 2, and 7 − x for x ≥ 2. Does the graph break at x = 2?

f(x) = x + 1 for x < 3, and 8 − x for x ≥ 3. What is the filled endpoint?

Making a Piecewise Function Continuous

Choose the constant that closes the jump.

The two pieces join without a jump exactly when both rules agree at the boundary

f(x) = 2x below 2 and x + 4 above it: a step of 2 sits at the boundary.

Keep the k in the second rule unknown, and ask which value closes the step.

Work out both rules at the boundary: one gives 4, the other gives 2 + k.

Set the two equal, and one value of k is left: k = 2.

With k = 2 both rules give 4 at x = 2, so the graph runs through unbroken.

Now you

f(x) = 3x for x < 2, and x + k for x ≥ 2. Which k joins the pieces?

f(x) = 5x for x < 5, and x + k for x ≥ 5. Which k joins the pieces?

Composite Functions

One machine fed into the next, right to left.

Feeding one function into another makes a composite, and the order changes the answer

Two machines: one adds 3, the other doubles.

gf means do f first: 4 becomes 7, then doubling gives 14.

The other way round gives 11. Order matters, so read right to left.

Now you

f(x) = x + 2, g(x) = 3x. What is gf(4)?

f(x) = x + 6, g(x) = 4x. What is gf(3)?

Inverse Functions

Reverse the steps, and reverse each one.

The inverse undoes a function by running every step backwards

Read the rule as steps in order: multiply by 3, then add 1.

To undo it, reverse the order of the steps and swap each step for its opposite.

The inverse is the original reflected in the line y = x.

Now you

f(x) = 4x + 7. What is the inverse?

f(x) = 3x + 8. What is the inverse?

Transforming Graphs

Outside the bracket moves it the way you expect.

Changing a function outside the bracket moves the graph and inside moves it the other way

Start with y = x², sitting with its lowest point at the origin.

Add 3 outside the function and every point lifts 3 up.

Put the 3 inside the bracket and it slides the other way, to the right.

x must be 3 bigger before the square sees its old input, so the curve arrives later.

Now you

y = x² + 5. Which way does the curve move?

y = (x − 2)². Which way does the curve move?

Stretching a Graph Vertically

Outside the bracket, every height multiplies.

Multiplying a function from outside the bracket multiplies every height by the same factor

y = 2x² doubles every height, so the curve is pulled away from the axis.

At x = 2 the height goes 4 to 8. The heights double; no point moves sideways.

A factor below 1 flattens it toward the axis, by the very same rule.

A negative factor sends every height to the other side: y = −x² is the flip.

Points already on the axis have height 0, so they stay put while the rest fan out.

Now you

y = f(x) has a lowest value of 9. What is the lowest value of y = 2f(x)?

(1, 6) is on y = f(x). Where is it on y = 2f(x)?

Stretching a Graph Horizontally

Inside the bracket, the widths divide instead.

Replacing x by ax inside the bracket squashes the graph toward the y-axis by that factor

Start from y = x² − 4, which meets the x-axis at −2 and at 2.

Replace x by 2x and the bracket reaches its old value at half the x.

So y = (2x)² − 4 crosses at −1 and 1: the curve is squashed toward the axis.

Halving x inside stretches it the other way instead, out to −4 and 4.

Outside the bracket multiplies the height; inside it divides the width.

Now you

y = f(x) crosses the x-axis at x = 9. Where does y = f(3x) cross?

Which one squashes the graph of y = f(x) toward the y-axis?

Exponentials and Logarithms

A log asks what power the base was raised to.

A logarithm asks what power the base was raised to, so it undoes an exponential

y = 2ˣ doubles every step, so it climbs slowly then very fast.

The same fact, read the other way: what power of 2 gives 32?

The graph of y = log₂ x is the reflection of y = 2ˣ across the line y = x: the domain and range change places.

Now you

What is log base 10 of 10000?

What is log base 2 of 16?

Exponential Growth

Multiplying by the same factor every step.

Exponential growth multiplies by the same factor every step, so it accelerates

Doubling each step: 1, 2, 4, 8, 16. Each jump is as big as everything before it.

Adding the same amount each time gives a line. Multiplying gives this curve.

So after n steps the count is the start times 2ⁿ — with ×3 each step, times 3ⁿ.

Now you

3 multiplied by 2, 4 times over

3 multiplied by 2, 3 times over

Exponential Decay

The same rule with a factor below one.

The same rule with a factor below one shrinks toward zero without reaching it

Halving each step: 80, 40, 20, 10, 5. The same rule, with a factor below 1.

The curve falls steeply, then flattens as there is less left to halve.

It closes in on zero forever without reaching it — half of something is never zero.

Now you

64 halved 3 times

48 halved 2 times

Growth and Decay Problems

Doubling colonies and half-lives, one rule twice.

Repeated doubling and half-lives are the two exponential shapes at work

Doubling each hour is exponential growth: after n hours, 100 has become 100 × 2ⁿ.

A half-life of 3 days: 9 days is three halvings, so 80 g drops to 40, 20, then 10.

A savings account grows this way, a cooling coffee cools this way — the same two shapes.

Now you

After n half-lives, what fraction of a sample remains?

A colony of 100 bacteria doubles every hour. How many after 3 hours?

Logistic Growth and Carrying Capacity

Growth that slows as the room runs out.

A logistic model grows like an exponential at first and then flattens onto the largest size the space allows

Exponential growth never lets up. Doubling forever would need unlimited room.

A real population flattens onto a ceiling instead: the carrying capacity.

As t grows the exponential fades to nothing, so P closes on L and stops.

At the start the same formula hands back the starting size, L over 1 + A.

Growth is fastest halfway up, then slows as the remaining room runs out.

Now you

Which model stops growing at a ceiling?

P = 125/(1 + 4e⁻ᵗ). What is the carrying capacity?

The Laws of Logarithms

A log turns multiplying into adding.

A logarithm turns multiplying into adding, which is what makes it useful

The law of exponents: multiplying powers of one base adds the exponents, 2³ × 2⁴ = 2⁷.

So log(ab) = log a + log b, in any base — so long as it is one base throughout.

And log(xⁿ) = n log x: a power is repeated multiplying, so the n comes to the front.

And log(a / b) = log a − log b: dividing inside becomes subtracting outside.

Now you

log 20 − log 4 = log ?

log 4 + log 5 = log ?

The Change of Base Rule

Any log is a quotient of logs you can compute.

One rule turns any logarithm into a quotient of logs the calculator has

This x is log₂ N: applying the common logarithm isolates it, through the change-of-base identity.

So log₂ N is log N / log 2 — and any base converts the same way.

A calculator offers only log₁₀ and ln — this rule reaches every base from those two.

So log₅ 30 is 2.113 — and 5 to that power really does come back to 30.

Now you

Which quotient computes log₇ 20?

What is log₄ 8, exactly?

The Natural Logarithm

The log with base e, partner of e to the x.

ln is the logarithm with base e, and it obeys every law the others do

ln is the log with base e ≈ 2.718 — why e is special waits for calculus.

ln eˣ = x: whatever power e was raised to, ln hands it straight back.

The other way round too: e^(ln x) = x. Each machine undoes the other.

Every law of logarithms carries over unchanged — ln is a log like any other.

Now you

ln undoes which function?

What is ln e³?

Solving Exponential Equations

Take logs and the power comes down.

Taking logs of both sides brings the unknown power down where you can reach it

The unknown is an exponent, so no amount of dividing will free it.

Take the log of both sides, and the power law brings the x down from the exponent.

Now it is an ordinary division. Check it: 2 to the 5 really is 32.

And here counting could never have got there: 40 is not any whole power of 2.

Now you

3^x = 27. What is x?

2^x = 40. Which expression gives x?

Logarithmic Graphs

The exponential reflected in y = x.

The log graph is the exponential reflected in the line y equals x

y = 2ˣ climbs away steeply and never dips below the x-axis.

Undoing swaps input and output, and swapping x with y reflects a graph in y = x.

So y = log₂x is y = 2ˣ reflected in that line: every (a, b) becomes (b, a).

So it dives at 0 and never reaches it: no power of 2 will ever give zero.

Now you

What is log₂ 8?

What is log₁₀ 1000?

Straightening Growth with Logarithms

Take logs and the curve becomes a readable line.

Taking logs turns an exponential law into a straight line whose rule can be read

y = 3 × 2ˣ sweeps up in a curve — its 3 and its 2 are hard to read off the picture.

Take logs of both sides: log y = log a + x · log b — a straight line in x.

Plot log y instead of y and the curve straightens: same data, now a line.

Undo the logs: the gradient gives b = 2 and the intercept a = 3 — the rule is recovered.

Now you

Why take logs of growth data at all?

On the log plot of y = a · bˣ, what does the slope give?

Straightening a Power Law

On log-log axes the slope is n itself.

A power law straightens on log-log axes, and the slope is n itself

y = 2x³ sweeps up in a curve — is the power 2, 3 or 4? The picture will not say.

Take logs: log y = log a + n · log x — a straight line in log x, not in x.

Plot log y against log x and it straightens — same data, and the slope is n itself.

Read the rule off: n = 3 from the slope, and 10 to the intercept gives a = 2.

Now you

A log-log line has slope 2 and intercept 0.7. Which model fits?

On the log-log plot of y = a · xⁿ, what does the slope give?

Fitting a Logarithmic Model

Rising for ever, by less and less each step.

A logarithmic model y = a + b ln x keeps rising while each extra unit of x adds less than the last

Scores climb with practice, but each extra trial adds less than the one before.

A logarithmic model y = a + b ln x bends that way: it rises without a ceiling.

Plot the same scores against ln x and the bend straightens into a line.

Read a off as the intercept of that line and b off as its gradient.

Put a value in and the model predicts: twenty trials gives a score near 17.

Which axis you take logs of is what picks the family of model.

Now you

Plotted against ln x the data give the line y = 5·(ln x) + 6. What is the model?

Values rise forever, but each extra unit of x adds less. Which model?

Continue your journey in the app — save your progress