Numbers and algebra
Function
A function is a dependable assignment: every permitted input receives exactly one output, although different inputs may share that output.
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
Build the intuition
A function is a machine: put something in, follow one rule and get one answer out.
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.
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
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.
- 1Pre-high schoolUsually introduced
- 2High schoolGreater depth
- 3CollegeGreater depth
- 4AdvancedGreater depth
- Patterns
- Algebra
- Precalculus
- Calculus
- Programming
- Arithmetic
- Variables
- Coordinates
- Equations
- Graphs
- Composition
- Inverse functions
- Calculus
- Differential equations
Wavefunctions, operators and physical models all depend on understanding functions and mappings.
Open the Zero-to-QM pathNow 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.
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?
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.
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.
Apply notation and calculation rules.
Problem 1
For f(x)=3x²−2x+1, calculate f(−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).
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.
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?
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.
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.
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.
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
dom(f)Every input the function accepts. A formula may impose restrictions, such as x≠0 for f(x)=1/x.
f:A→BThe codomain is the declared target set B; the range is the part of B actually reached.
(g∘f)(x)=g(f(x))The output of f becomes the input of g. Order matters: g∘f usually differs from f∘g.
f⁻¹(f(x))=xAn inverse reverses a one-to-one correspondence. The symbol does not mean reciprocal.
Δy/ΔxFunctions connect changing quantities; calculus studies their instantaneous and accumulated change.
y=a·f(b(x−h))+kScaling and shifting the input or output reshapes a graph without changing its underlying family.
From question to conclusion
Worked reasoning
For f(x)=3x−2, find f(5).
Substitute the input: f(5)=3(5)−2=13.
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.
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
A pure function receives arguments and returns a value; composition builds larger programs from smaller transformations.
Derivatives and integrals describe local change and accumulated output of functions.
Models map features to predictions, while databases and charts repeatedly transform one representation into another.
Wavefunctions assign amplitudes to positions or states, and operators map state functions to new state functions.
Questions worth keeping
The surprising edge
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₂.
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.
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.