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

Real Examples of Functions

Example 1: f(x) = x + 5

This is a linear function. Simple, straight line.

Example 2: f(x) = x²

This is a quadratic function. It squares whatever you put in.

Example 3: f(x) = 2x - 1

Another linear function:

Example 4: f(x) = √x

The square root function. It only accepts non-negative inputs (in real numbers).

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

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

  1. Solve for y if needed
  2. Check if any x-value produces multiple y-values
  3. Look for ± symbols—if they make multiple outputs for one input, not a function
  4. If each x gives exactly one y, it's a function

For a Graph

  1. Draw vertical lines through the graph
  2. If any vertical line hits more than once, not a function
  3. If every vertical line hits exactly once (or zero times), it's a function

For a Table

  1. Check if any x-value appears more than once
  2. If x = 2 gives y = 5 AND y = 7, not a function
  3. 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:

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.

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

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.