Numbers and algebra

Function

A function is a dependable assignment: every permitted input receives exactly one output, although different inputs may share that output.

Common notationy = f(x)

In one sentence

What is Function?

A function is a dependable assignment: every permitted input receives exactly one output, although different inputs may share that output.

One idea, three depths

Understand Function at your level

Explain it to a 5-year-old

Build the intuition

A function is a machine: put something in, follow one rule and get one answer out.

Explain it to a 15-year-old

Use the mathematics

A function maps each input in its domain to exactly one output in its codomain; tables, formulas, graphs and programs can describe the same mapping.

College level

Make it precise

A function f:A→B is a relation in which each element of A occurs exactly once as a first component. Injectivity, surjectivity, composition and invertibility describe deeper mapping behaviour.

Try the idea

Interactive concept laboratory

Runs locally
Input3
Rulef(x)=2x+1
Output7

Composition: f(f(3)) = f(7) = 15.

Where this fits

When should you learn Function?

The first encounter is not the final level. Many ideas begin visually, become computational in high school and become formal in college.

  1. 1Pre-high schoolUsually introduced
  2. 2High schoolGreater depth
  3. 3CollegeGreater depth
  4. 4AdvancedGreater depth
Typical subjects
  • Patterns
  • Algebra
  • Precalculus
  • Calculus
  • Programming
Know first
  • Arithmetic
  • Variables
  • Coordinates
  • Equations
What it unlocks
  • Graphs
  • Composition
  • Inverse functions
  • Calculus
  • Differential equations
Zero-to-QM pathCore

Wavefunctions, operators and physical models all depend on understanding functions and mappings.

Open the Zero-to-QM path

Now you do it

Practice Function one level at a time

Work each problem by hand first. Use the linked calculator or lab to check examples, then reveal the short worked solution to inspect your reasoning.

Pre-high school

Build the idea with concrete examples.

Problem 1

A number machine doubles its input and then adds 3. What comes out when 4 goes in?

Check with the labSet x=4, m=2 and b=3 in the function machine.
Show answer and worked solution

Answer: 11

Reasoning: Start with 4. Doubling gives 8, and adding 3 gives 11. The rule is f(x)=2x+3, so f(4)=2(4)+3=11.

Problem 2

The rule is f(x)=x+5. Complete the outputs for x=0, x=2 and x=10.

Check with the labUse m=1 and b=5, then try each input.
Show answer and worked solution

Answer: 5, 7 and 15

Reasoning: Add 5 to each input: f(0)=5, f(2)=7 and f(10)=15. Each input receives exactly one output.

High school

Apply notation and calculation rules.

Problem 1

For f(x)=3x²−2x+1, calculate f(−2).

Check with calculatorEnter a=3, b=−2, c=1 and x=−2.
Show answer and worked solution

Answer: 17

Reasoning: Keep the negative input inside parentheses: 3(−2)²−2(−2)+1=3(4)+4+1=17.

Problem 2

State the domain of h(x)=1/(x−5).

Check with calculatorPlot 1/(x−5) and inspect the break at x=5.
Show answer and worked solution

Answer: All real numbers except x=5

Reasoning: Division by zero is undefined. The denominator x−5 becomes zero only when x=5, so every other real input is permitted.

College

Connect definitions and justify each step.

Problem 1

Let f(x)=x+2 and g(x)=x². Find (g∘f)(3) and (f∘g)(3). Are they equal?

Check with the labUse the lab to test each linear step, then square the required intermediate value.
Show answer and worked solution

Answer: (g∘f)(3)=25 and (f∘g)(3)=11; they are not equal

Reasoning: For g∘f, first find f(3)=5 and then g(5)=25. For f∘g, first find g(3)=9 and then f(9)=11. Composition generally depends on order.

Problem 2

Find the inverse of f(x)=(3x−4)/5 and verify the result by composition.

Check with calculatorTest matching input-output pairs in the linear-function calculator.
Show answer and worked solution

Answer: f⁻¹(x)=(5x+4)/3

Reasoning: Write y=(3x−4)/5, swap x and y, and solve: 5x=3y−4, so y=(5x+4)/3. Substitution gives f⁻¹(f(x))=(5((3x−4)/5)+4)/3=x.

Advanced

Prove, generalise and test the limits.

Problem 1

Explain why a function has a two-sided inverse exactly when it is bijective.

Show answer and worked solution

Answer: A two-sided inverse exists if and only if the function is both injective and surjective

Reasoning: If g∘f is the identity, equal outputs under f must have equal inputs, so f is injective. If f∘g is the identity, every codomain element is reached, so f is surjective. Conversely, a bijection gives each output one unique preimage; assigning that preimage defines the inverse.

Problem 2

Give a function that is continuous at every nonzero real number but discontinuous at zero, and state why.

Check with calculatorPlot sin(1/x) and zoom toward x=0.
Show answer and worked solution

Answer: One example is f(x)=sin(1/x) for x≠0 with any assigned value at x=0

Reasoning: As x approaches zero, 1/x grows without bound and sin(1/x) oscillates between −1 and 1 without approaching one limit. Away from zero it is a composition of continuous functions.

Build the vocabulary

Six core ideas

Domaindom(f)

Every input the function accepts. A formula may impose restrictions, such as x≠0 for f(x)=1/x.

Codomain and rangef:A→B

The codomain is the declared target set B; the range is the part of B actually reached.

Composition(g∘f)(x)=g(f(x))

The output of f becomes the input of g. Order matters: g∘f usually differs from f∘g.

Inversef⁻¹(f(x))=x

An inverse reverses a one-to-one correspondence. The symbol does not mean reciprocal.

Rate of changeΔy/Δx

Functions connect changing quantities; calculus studies their instantaneous and accumulated change.

Transformationy=a·f(b(x−h))+k

Scaling and shifting the input or output reshapes a graph without changing its underlying family.

From question to conclusion

Worked reasoning

Evaluate

For f(x)=3x−2, find f(5).

Substitute the input: f(5)=3(5)−2=13.

Compose

Let f(x)=x+1 and g(x)=x². Find (g∘f)(3).

f(3)=4, then g(4)=16; therefore (g∘f)(3)=16.

Invert

Find the inverse of f(x)=2x+7.

Write y=2x+7, swap x and y, then solve: f⁻¹(x)=(x−7)/2.

Why it matters

Connections across mathematics and beyond

Programming

A pure function receives arguments and returns a value; composition builds larger programs from smaller transformations.

Calculus

Derivatives and integrals describe local change and accumulated output of functions.

Data

Models map features to predictions, while databases and charts repeatedly transform one representation into another.

Quantum mechanics

Wavefunctions assign amplitudes to positions or states, and operators map state functions to new state functions.

Questions worth keeping

The surprising edge

Think about it

Can one input have two outputs?

Not in a function. A relation may contain both (x,y₁) and (x,y₂), but it fails the function rule when y₁≠y₂.

Think about it

Can two inputs share one output?

Yes. f(x)=x² sends both −2 and 2 to 4; this makes it non-injective on the real numbers.

Think about it

Is a graph the function?

It is one representation of the same abstract mapping, just as a table, formula or algorithm can be another.

Clear answers

Questions about Function

What is Function in simple terms?

A function is a machine: put something in, follow one rule and get one answer out.

When should students learn Function?

Function is usually introduced at the pre-high school level and revisited with greater depth later. Typical subjects include Patterns, Algebra, Precalculus, Calculus, Programming.

Why is Function important?

A function is a dependable assignment: every permitted input receives exactly one output, although different inputs may share that output.

What should I know before studying Function?

Useful prerequisites are Arithmetic, Variables, Coordinates, Equations.

Is Function needed for quantum mathematics?

Core: Wavefunctions, operators and physical models all depend on understanding functions and mappings.

MW SysArc Certified