Worked examples — Concept of a function — input, output, mapping
This page is the stress test for the idea from Concept of a function — input, output, mapping. The parent note built the machine — one input, exactly one output. Here we drop every kind of thing into that machine and watch what happens, so no exam question can surprise you.
Read the parent first if any word below feels new. Everything you meet here — domain, codomain, range, the vertical line test — was defined there.
The scenario matrix
Think of each row as a type of question. Each worked example is tagged with the cell it lives in, so you can see the whole map get filled.
| Cell | Scenario class | What could go wrong | Example |
|---|---|---|---|
| A | Positive / negative inputs, same rule | forgetting a sign | Ex 1 |
| B | Zero as input | dividing by 0, or 0 being fine | Ex 2 |
| C | Degenerate input (not in domain) | machine has no output — undefined | Ex 3 |
| D | Two inputs → same output (allowed) | thinking it breaks the rule | Ex 4 |
| E | One input → two outputs (forbidden) | mistaking a relation for a function | Ex 5 |
| F | Piecewise rule, boundary point | using the wrong branch | Ex 6 |
| G | Limiting behaviour (input → ∞ or → a bad point) | thinking "undefined" means "no pattern" | Ex 7 |
| H | Real-world word problem | forgetting the natural domain | Ex 8 |
| I | Exam-style twist (find domain from a formula) | missing a hidden restriction | Ex 9 |
We now walk cells A → I in order.
Cell A — Positive and negative inputs
Forecast: Guess now — will and be equal or opposite? Write your guess before reading.
- Compute . Apply the rule: . Why this step? A function is just "obey the rule". The rule says square the input, so we square 3.
- Compute . Apply the rule: . Why this step? A negative times a negative is positive — the sign of the input disappears when we square. This is exactly the "sign case" the matrix warns about.
- Observe. Both inputs gave 9. Different inputs, same output. Why this step? The parent note allows this. The rule forbids one input giving two outputs; it never forbids two inputs sharing an output.
Verify: Plug back — is , consistent with the range of being . And ✓.
Look at the figure: the two red inputs and on the number line both arrow into the single point .

Cell B — Zero as input
Forecast: Guess — does zero behave the same in both machines?
- Compute . . Why this step? Zero is an ordinary real number; squaring it is perfectly legal and gives one clean answer.
- Try . . Why this step? Now zero is the input to a division. Division asks "how many times does 0 fit into 1?" — no number works, so there is no output.
- Conclusion. is a valid input for (output 0), but a forbidden input for . Why this step? Zero is not automatically good or bad — it depends on the rule. This is the whole point of the "zero" cell.
Verify: For : ✓. For : there is no with , so is undefined — the domain of must exclude 0.
Cell C — Degenerate input (breaks the domain)
Forecast: Guess — is there a real number whose square is ?
- Compute . We need a number whose square is 4 and is . That's , so . Why this step? asks "what non-negative number squared gives this?" For 4, the answer exists and is single: 2.
- Try . We need a real number whose square is . Why this step? Any real number squared is (Example 1 showed squares are never negative). So no real number qualifies.
- Conclusion. is not in the domain of . The machine produces nothing — is undefined over . Why this step? "Not a function" is different from "input outside the domain". Here is a valid function; we simply fed it something it doesn't accept.
Verify: ✓, so . And solving over the reals has no solution, so domain ✓.
Cell D — Two inputs, same output (this is fine)
Forecast: Guess how many inputs give 25 — one, or more?
- Set up the question. We want every with . Why this step? We're reversing the machine — asking "what went in?" This is allowed as a question even though the machine itself only goes forward.
- Solve. or . Why this step? Both and square to 25 (Cell A logic). Two distinct inputs, one shared output.
- Confirm it's still a function. Going forward, and — each input still has exactly one output. Why this step? The rule "one output per input" is about the forward direction. It says nothing about how many inputs land on the same spot.
Verify: and ✓. Forward, each of 5 and −5 has a single image, so is a function ✓.
Cell E — One input, two outputs (this is NOT a function)
Forecast: Guess — how many -values sit above on a circle?
- Substitute . . Why this step? We fix one input and ask what outputs the relation allows.
- Solve for . or (top and bottom of the circle). Why this step? The input produces two outputs. That directly violates "exactly one output".
- Conclusion. The full circle is not a function of . Why this step? The vertical line test from the parent note: the line hits the circle twice.
Look at the figure — the vertical red dashed line at pierces the circle at two green dots.

Fix (make it a function): keep only the top half, . Now gives only .
Verify: For the circle at : — two outputs, fails ✓. For the top half at : , single output ✓.
Cell F — Piecewise rule at the boundary
Forecast: Guess which branch uses — is it the top or the bottom?
- Compute . Since , use the top branch: . Why this step? A piecewise function is one machine with a routing rule. We check the condition first, then apply the matching formula.
- Compute — the boundary. The condition holds (the is included), so use the bottom branch: . Why this step? This is the trap. The boundary value belongs to whichever branch owns the equals sign. Here owns it, so we do not use .
- Compute . Since , bottom branch: . Why this step? Confirms the machine still gives one output per input even with two rules.
Verify: , , . Each input picks exactly one branch, so exactly one output ✓.

Notice in the figure the jump at : the top piece approaches height but the actual value snaps to (filled dot) — the boundary belongs to the lower branch.
Cell G — Limiting behaviour
Forecast: Guess — as gets tiny and positive, does the output shrink or explode?
- Feed in shrinking positive inputs. , , , . Why this step? Dividing 1 by a smaller and smaller positive number gives a bigger and bigger result. The output explodes toward .
- Feed in growing inputs. , , . Why this step? Dividing 1 by a huge number gives a tiny positive result. The output shrinks toward 0 but never reaches it.
- Interpret. Near the machine has no finite output (undefined at 0, but with a clear runaway pattern approaching it). For huge , outputs approach 0. Why this step? "Undefined at a point" does not mean "no pattern near it". The trend is precise even where the value doesn't exist.
Verify: and ✓ — the pattern is exactly "reciprocal", confirming the runaway toward near 0 and toward 0 near .

Cell H — Real-world word problem
Forecast: Guess whether km should be allowed as an input.
- Build the rule. Fixed part ₹50, variable part ₹12 per km, so . Why this step? "Cost depends on distance" is a function: one distance → one fare. We translate the words into a formula.
- Compute . . Why this step? Zero distance still costs the base fare — the zero-input case (Cell B) makes physical sense here.
- Compute . , i.e. ₹110. Why this step? A concrete positive input, the everyday case.
- State the domain. Distance can't be negative, so domain is . Why this step? The natural domain — real-world limits shrink the mathematical domain. is meaningless, so it's excluded even though computes.
Verify: ✓ (base fare), ✓. Domain matches "distance ≥ 0" ✓.
Cell I — Exam-style twist (find the domain)
Forecast: Guess how many separate restrictions this single formula hides.
- Restriction from the square root. We need , i.e. . Why this step? A real square root needs a non-negative inside (Cell C). This bans everything below 1.
- Restriction from the denominator. We need , i.e. . Why this step? Division by zero has no output (Cell B). So 4 is a single forbidden point punched out.
- Combine. Domain . Why this step? Both conditions must hold at once — the input must survive every restriction the formula imposes.
Verify: Test : , defined ✓. Test : denominator , undefined ✓. Test : not real, excluded ✓. Domain confirmed.
Recall
Recall Which cells forbid an output entirely?
Cell B (zero into a reciprocal), Cell C (negative into a real square root), and Cell I's excluded points — the input is simply not in the domain, so the machine gives nothing. Undefined input ::: Input not in the domain — the rule produces no valid output there.
Recall Why does the circle fail but "two inputs share an output" is fine?
The circle gives one input two outputs (forbidden). Sharing gives two inputs one output (allowed). Only the forward "one output per input" direction is protected. Forbidden vs allowed ::: One input → two outputs is forbidden; two inputs → one output is allowed.
Connections
- Concept of a function — input, output, mapping (parent)
- Types of Functions
- Inverse Functions
- Composition of Functions
- Graphs of Functions
- Real-world Applications