Exercises — Concept of a function — input, output, mapping
Level 1 — Recognition
Goal: just decide "is this a function?" and read off pieces.
L1.1 — Spot the function from arrows
Let and . Which of these mappings is a function from to ?
- (i) , ,
- (ii) , , ,
- (iii) ,
Look at the picture — each column is one input, each arrow is one assignment.

Recall Solution
The golden rule has two halves: every input must fire (no input left blank) and each input fires exactly once (no input with two arrows).
- (i) Every input (1,2,3) has exactly one arrow. ✓ Function.
- (ii) Input sends arrows to both and — two outputs for one input. ✗ Not a function. (Look at the two arrows leaving "2" in the middle panel.)
- (iii) Input has no arrow at all — it is left blank. ✗ Not a function, because the domain contains and every element of the domain must map somewhere.
Answer: only (i).
L1.2 — Read the value
For , , compute , , .
Recall Solution
"Apply the rule" means replace every by the input, then simplify.
Answers: .
Level 2 — Application
Goal: use the rule on trickier inputs, including piecewise rules.
L2.1 — Feed an expression, not a number
For , find , , and .
Recall Solution
- — different input, same output. Allowed! The rule only forbids one input giving two outputs, not two inputs sharing an output.
- : replace the whole by :
Answers: .
L2.2 — Choose the right branch
For the piecewise machine find , , .
Recall Solution
A piecewise rule is one machine with a switch: check which condition your input satisfies first, then use only that branch.
- : , top branch .
- : , bottom branch .
- : (the is in the top branch), so top .
Notice appears in exactly one branch — that is on purpose, so stays single-valued.
Answers: .
L2.3 — Largest allowed domain
What is the biggest set of real inputs for ?
Recall Solution
The only thing forbidden is dividing by zero. The denominator is zero when . Every other real number is fine.
Domain (all reals except ).
Level 3 — Analysis
Goal: reason about domain, range, and the vertical line test.
L3.1 — Find the range
For , , find the range (the set of outputs actually produced).
Recall Solution
We ask: what values can come out? Complete the square to see the lowest point. A square is always , and it hits when . So the smallest output is , and outputs grow without bound above that.
Range . (Domain is all of — don't confuse the two: you may input any real, but outputs start at 3.)
L3.2 — Vertical line test
The unit circle is drawn. Is a function of ? If not, repair it.

Recall Solution
A vertical line collects all points sharing that input . If it crosses the curve more than once, that single input has several outputs — no function.
Draw : it meets the circle at and . Two outputs for input . ✗ Not a function.
Repair: keep only the top half, . Now every vertical line for hits exactly one point. ✓ Function, with domain and range .
L3.3 — Domain of a square root
Find the domain of .
Recall Solution
A real square root needs its inside (negatives have no real root). So require Domain .
Level 4 — Synthesis
Goal: combine ideas — build functions, split multi-valued relations, use notation carefully.
L4.1 — Split a relation into functions
The relation (a sideways parabola) is not a function of . Write it as two functions and give each domain and range.
Recall Solution
Solving for gives — the is exactly the "two outputs" that ruins single-valuedness. Split the sign:
- , domain (need ), range .
- , domain , range .
Each is single-valued on its own; together their graphs recreate the whole sideways parabola. Check: at , and — the two branches.
L4.2 — Build a function to a rule
Define a function that gives the distance of a number from . Compute , , and state its range.
Recall Solution
Distance is never negative, and "distance from 10" is captured by absolute value:
Since a distance is and can be as small as (at ) or arbitrarily large, range .
L4.3 — Two rules must agree at the join
For find so the two pieces meet (equal value) at .
Recall Solution
"Meet at " means both branches give the same output as we approach . The top branch owns : value . The bottom branch approaches . Set equal: Answer: . With the machine has no sudden jump at .
Level 5 — Mastery
Goal: prove, generalise, and handle degenerate/edge cases.
L5.1 — Prove different inputs may share an output, but not the reverse
Give a function where with , and explain precisely why the reverse situation (one input, two outputs) is impossible for any function.
Recall Solution
Sharing an output is fine: take . Then with . The definition never says outputs must be unique to their input.
Two outputs for one input is impossible by definition: suppose and with . The definition of a function says assigns to each input exactly one value. "Exactly one" and " both assigned" directly contradict each other. Hence no such function exists — the very word function forbids it.
This asymmetry is the heart of the concept: many-to-one is allowed, one-to-many is banned.
L5.2 — A constant function is still a function
Is (for all real ) a function? Find its domain and range, and test it against the vertical line test.
Recall Solution
- Function? Yes. Every input has exactly one output — the output just never changes. "Same output every time" is more deterministic, not less.
- Domain: (you may input any real).
- Range: — a single-element set, because only 7 ever comes out.
- Vertical line test: the graph is a horizontal line at height 7. Any vertical line meets it exactly once. ✓
Degenerate but perfectly valid.
L5.3 — Empty domain edge case
Consider (the empty domain — no inputs at all). Argue whether this is a function.
Recall Solution
The rule "every input has exactly one output" must hold for every element of the domain. If there are no inputs, there is nothing that could break the rule — no input exists to have zero or two outputs. So the condition is satisfied vacuously (true because there is nothing to check).
Yes, it is a (trivial) function, called the empty function. This is the limiting case at the "no inputs" end and shows the definition is watertight even when pushed to emptiness.
L5.4 — Count all functions between finite sets
How many functions are there from to ?
Recall Solution
Each input must choose exactly one output. Input has choices ( or ); independently input has choices; input has choices. Multiply the independent choices: In general, from a domain of size to a codomain of size there are functions.
Answer: .
Recall Quick self-test (cloze)
A function forbids one input mapping to two outputs but allows two inputs mapping to one output. The domain of is ::: The range of is ::: Number of functions from a 3-set to a 2-set :::
Where to go next
- Types of Functions — now classify these as one-one / onto / bijective.
- Inverse Functions — which of the above can be reversed?
- Composition of Functions — chain two machines together.
- Graphs of Functions — more vertical-line-test practice.
- Real-world Applications — distance, cost, and temperature functions in the wild.