Which Is an Example of a Function? Math Explained
What Is a Function in Math?
A function is a relationship where each input has exactly one output. That's the whole definition. You feed something in, and the function gives you exactly one thing back. No ambiguity. No multiple answers for the same input.
Think of it like a vending machine. You press the button for chips, you get chips. Every time. Not sometimes chips, sometimes a soda. The machine is consistent.
If you put in the same number and get different results, it's not a function. Plain and simple.
Function Notation: The Basics
When you see f(x), that's function notation. The f is the name of the function. The x inside the parentheses is what you're putting in.
So f(x) = 2x + 3 means "the function named f takes an input called x and gives back 2 times x plus 3."
You might also see g(x), h(x), or any letter. The letter doesn't matter. It's just a name.
Reading Function Notation
- f(2) means "what is f when x equals 2?"
- If f(x) = x², then f(2) = 4
- The notation tells you exactly what to calculate
Real Examples of Functions
Example 1: f(x) = x + 5
This is a linear function. Simple, straight line.
- f(1) = 1 + 5 = 6
- f(10) = 10 + 5 = 15
- Every input gives one output
Example 2: f(x) = x²
This is a quadratic function. It squares whatever you put in.
- f(3) = 9
- f(-3) = 9
- Notice: different inputs can give the same output. That's fine. A function just can't give multiple outputs for ONE input.
Example 3: f(x) = 2x - 1
Another linear function:
- f(0) = -1
- f(4) = 7
- Consistent. Predictable. That's a function.
Example 4: f(x) = √x
The square root function. It only accepts non-negative inputs (in real numbers).
- f(9) = 3
- f(25) = 5
- √9 doesn't give you both 3 and -3. It gives you the principal (positive) root only. One answer.
What Is NOT a Function?
Here's where people get confused. These relationships look similar but fail the function test:
The Vertical Line Test
For graphs: if you can draw a vertical line that touches the graph in more than one place, it's not a function. Because that vertical line represents one x-value producing multiple y-values.
A circle? Not a function. A vertical line cuts it in two places.
Example: x = y²
Solve for y: y = ±√x
For x = 4, you get y = 2 AND y = -2. Two outputs for one input. Not a function.
But if you write y = √x (principal square root only), then it's a function. The ± makes the difference.
Domain and Range
Domain = all the possible inputs. What x-values can you use?
Range = all the possible outputs. What y-values can you get?
Common Domain Restrictions
- f(x) = 1/x → domain excludes x = 0
- f(x) = √x → domain is x ≥ 0
- f(x) = ln(x) → domain is x > 0
- Polynomials → domain is all real numbers
Common Types of Functions
| Type | Form | Example |
|---|---|---|
| Linear | f(x) = mx + b | f(x) = 3x - 7 |
| Quadratic | f(x) = ax² + bx + c | f(x) = x² - 4x + 3 |
| Polynomial | Sum of powers | f(x) = x³ + 2x² - x + 5 |
| Exponential | f(x) = a^x | f(x) = 2^x |
| Logarithmic | f(x) = log(x) | f(x) = ln(x) |
| Absolute Value | f(x) = |x| | f(x) = |x - 3| |
How to Identify a Function: Step by Step
You have an equation or graph. You need to know if it's a function. Here's how:
For an Equation
- Solve for y if needed
- Check if any x-value produces multiple y-values
- Look for ± symbols—if they make multiple outputs for one input, not a function
- If each x gives exactly one y, it's a function
For a Graph
- Draw vertical lines through the graph
- If any vertical line hits more than once, not a function
- If every vertical line hits exactly once (or zero times), it's a function
For a Table
- Check if any x-value appears more than once
- If x = 2 gives y = 5 AND y = 7, not a function
- If each x-value is unique or maps to the same y, it's a function
Practical Examples You Already Know
Functions aren't just abstract math. You've used them:
- Area of a circle: A = πr² — radius is input, area is output. Function.
- Tip calculation: tip = 0.2 × bill — bill amount is input, tip is output. Function.
- Converting temperature: F = 9/5 C + 32 — Celsius is input, Fahrenheit is output. Function.
- Distance over time at constant speed: d = 60t — time is input, distance is output. Function.
Anything where you have a clear rule turning one quantity into another is a function.
Function Composition
You can chain functions together. f(g(x)) means you put x into g first, then put that result into f.
Example:
f(x) = x + 2
g(x) = 3x
f(g(4)) = f(12) = 14
You calculated g(4) = 12 first, then added 2. That's function composition.
One-to-One Functions
Some functions are one-to-one. That means different inputs always give different outputs.
- f(x) = 2x is one-to-one. f(3) = 6, f(4) = 8. No repeats.
- f(x) = x² is NOT one-to-one. f(2) = 4 and f(-2) = 4. Same output, different inputs.
One-to-one functions pass both the function test AND a horizontal line test (no horizontal line hits twice).
Inverse Functions
An inverse function f⁻¹(x) does the opposite of f(x). If f takes you from x to y, f⁻¹ takes you from y back to x.
Example:
f(x) = 3x + 1
f⁻¹(x) = (x - 1)/3
Verify: f(5) = 16. f⁻¹(16) = 5. ✓
Only one-to-one functions have inverses that are also functions.
Quick Reference: Function Checklist
- ✓ Every input has exactly one output
- ✓ Same input always gives same output
- ✓ Different inputs can give same output (that's allowed)
- ✗ One input giving multiple outputs = NOT a function
The Bottom Line
A function is just a rule. One in, one out. That's it. The complexity comes from what the rule is—linear, quadratic, exponential, whatever—but the concept stays simple.
Master the definition. Everything else in functions builds from that single idea.