Mathematics & Logic · Algebra & functions
What a function is, and why it can't always run backward
A function is a rule that gives each input exactly one output. See why two inputs can share an output, where a formula stops applying, and why working back from an output can fail.

What you will learn
- Recognize that a function gives each allowed input exactly one output
- Explain why different inputs can share an output
- Evaluate a function by substituting an input into its rule
- Tell the inputs a formula can compute from the inputs a model actually covers
Lesson 1 of 4 · 4 min
What makes a rule a function?
Picture a gym list that gives each member a locker number. You look up your name and get one definite number. If the list gave you two, you wouldn't know where your bag was.
A lookup like that is called a function. Each allowed input has exactly one output. Here the input is a member and the output is a locker number.
A function doesn't need a formula. The calendar is one. Put in March and you get 31 days, and no algebra produces that 31. The input can be a name, a month or a number.
Say the list puts Ana in locker 12 and Bo in locker 15. Each name leads to one number, so the list is a function from members to locker numbers.
Now say the list gives Ana both locker 12 and locker 18. Look her up and you get two answers. One input has two outputs, so the list has stopped being a function.
A locker that changes by the day could still work. But then the input has to be the member and the day together.
Put Ana and Bo both in locker 12. Look each of them up. Ana gets one number and so does Bo. Each input still has one output, so the list is still a function.
Whether two bags fit in one locker is a practical question. The definition only looks one way, from input to output. It doesn't require different inputs to get different outputs.
Numbers do the same thing. Take the rule "square the input," which means multiply it by itself. The input 3 gives 9. The input negative 3 also gives 9, because a negative times a negative is positive.
Squaring is still a function, because each input has one square. A function whose different inputs always give different outputs has an extra property called one-to-one. Squaring doesn't have it, and neither does the shared-locker list.
Try to recallWhy is squaring still a function, even though 3 and negative 3 both give 9?
Each input gives exactly one output. A function allows different inputs to share an output.
To test any rule, take one input at a time and ask whether it leads to one definite output. One input with two outputs breaks a function. Two inputs that share an output don't.
Lessons in this topic
What makes a rule a function?
A function gives each allowed input exactly one output. See what breaks that requirement, and why two inputs sharing an output doesn't.
How to read a formula, and where it stops applying
Work out a simple cost function by substitution, then see why a formula can return a number for an input its model doesn't cover.
Can you run a function backward?
Knowing a rule is a function doesn't let you work back from an output to its input. See when the reverse fails and how restricting the inputs repairs it.
When one rule feeds another, order matters
Chain two functions so one output becomes the next input, then see why order and hidden domain limits matter.
Three quick stories from this topic
The sub-zero sprint
A published trend line for Olympic 100-meter times dips below zero seconds around 2636
In 2004 a paper in Nature fitted straight lines to Olympic winning times and had women outrunning men at the 2156 Games. A letter in reply followed the same lines further. A formula returns a number for any input, even where it describes nothing.
What the paper did
The authors drew one best-fit straight line through the men's winning times and another through the women's. Extended forward, the two lines crossed at the 2156 Olympics.
Why the lines can't be trusted that far
A function's domain is the set of inputs it covers. Past the races the lines were fitted to, each prediction assumes the trend continues, and a time below zero shows it can't.
Coupon before or after shipping
A 20% coupon takes more off your bill when the shop applies it after adding shipping
Say the goods cost 10 euros and shipping costs 4. Coupon first, then shipping, comes to 12 euros. Shipping first, then coupon, comes to 11.20. The steps are the same, but the 20% comes off a bigger amount.
Each step is a function
Adding 4 euros is one rule and keeping 80% is another. Feeding one rule's output into the next is called composition.
Order is part of the rule
Composing two functions in the opposite order usually gives a different function. Here one order works out as 0.8 × c + 4 and the other as 0.8 × (c + 4).
Two square roots, one symbol
Every positive number has two square roots, but the square root symbol means only one
Both 3 and negative 3 square to 9. The symbol is defined as the nonnegative root, so the square root of 9 is 3 alone. That choice gives each input exactly one output, which is what makes the square root a function.
Squaring loses the sign
Squaring sends 3 and negative 3 to the same output. Working back from 9, nothing in the output says which of the two you started with.
The fix is a restriction
Allow only zero and the positive numbers as inputs, and each square comes from one input. The reverse rule then has a single answer.
Sources
- 3.1 Functions and Function Notation - College Algebra 2e, OpenStax
- 3.2 Domain and Range - College Algebra 2e, OpenStax
- Momentous sprint at the 2156 Olympics?, Nature (Tatem, Guerra, Atkinson and Hay, 2004)
- Sprint research runs into a credibility gap, Nature (Kenneth Rice, correspondence, 2004)
- 3.4 Composition of Functions - College Algebra 2e, OpenStax
- 1.3 Radicals and Rational Exponents - College Algebra 2e, OpenStax




