# Functions, function notation, domain and range

Canonical: https://duckyhelper.com/learn/algebra-1/functions/
Updated: 2026-10-01

A function is a rule that gives exactly one output for each input. In function notation, \(f(x)\) means the output of the function f when the input is x, so \(f(3)\) means "put 3 in for x." The domain is every input you are allowed to use, and the range is every output you can get. A graph is a function if no vertical line crosses it twice.

## The key idea

Think of a function as a machine. You drop in an input, it follows its rule, and one output comes out. The name of the machine is f, and \(f(x)\) is read "f of x." It does **not** mean f times x.

$$
f(x) = 2x^2 - 3 \quad\Longrightarrow\quad f(-2) = 2(-2)^2 - 3 = 5
$$

**The words you need**

| Word | Meaning | Example for \(f(x) = \sqrt{x}\) |
| --- | --- | --- |
| input | the x value you put in | 9 |
| output | the value that comes out, \(f(x)\) or y | \(f(9) = 3\) |
| domain | all allowed inputs | \(x \ge 0\), because you cannot take the square root of a negative number |
| range | all possible outputs | \(y \ge 0\), because a square root is never negative |

In Algebra 1, two things shrink a domain: you cannot divide by zero, and you cannot take the square root of a negative number. If neither shows up, the domain is all real numbers. In a word problem, the situation can limit it too, like not having a negative number of tickets.

## Worked examples

**Example 1: evaluate a function**

Problem: If \(f(x) = x^2 - 4x + 1\), find \(f(-3)\).

1. Replace every x with \((-3)\), in parentheses. Then follow the order of operations.

   $$
   (-3)^2 - 4(-3) + 1 = 9 + 12 + 1 = 22
   $$
2. The parentheses matter: \((-3)^2 = 9\), while \(-3^2\) would mean \(-(3^2) = -9\).

Answer: \(f(-3) = 22\)

**Example 2: find the input that gives an output**

Problem: If \(g(x) = 3x - 7\), for what value of x is \(g(x) = 11\)?

1. This time the output is given. Set the rule equal to 11.

   $$
   3x - 7 = 11
   $$
2. Add 7.

   $$
   3x = 18
   $$
3. Divide by 3.

   $$
   x = 6
   $$
4. Check: \(g(6) = 18 - 7 = 11\).

Answer: \(x = 6\)

**Example 3: domain and range from an equation**

Problem: Find the domain and range of \(h(x) = \sqrt{x - 5}\).

1. The expression under the square root cannot be negative.

   $$
   x - 5 \ge 0
   $$
2. Add 5. That is the domain.

   $$
   x \ge 5
   $$
3. The smallest output is \(h(5) = \sqrt{0} = 0\). As x grows, the square root grows without limit, and it is never negative. So the range is \(y \ge 0\).

Answer: Domain: \(x \ge 5\). Range: \(y \ge 0\).

**Example 4 (test-hard): an expression as the input**

Problem: If \(f(x) = x^2 + 2x\), find and simplify \(f(t - 1)\).

1. Replace every x with \((t - 1)\), then expand and combine like terms.

   $$
   (t - 1)^2 + 2(t - 1) = t^2 - 2t + 1 + 2t - 2 = t^2 - 1
   $$
2. Check with a number. If \(t = 3\), then \(f(2) = 4 + 4 = 8\), and \(3^2 - 1 = 8\). They agree.

Answer: \(f(t - 1) = t^2 - 1\)

## Common mistakes

- **Reading f(x) as multiplication.** \(f(3)\) is the output when the input is 3. It is not \(f \cdot 3\).
- **Leaving out parentheses for a negative input.** \(f(-3)\) for \(x^2\) is \((-3)^2 = 9\). Typing \(-3^2\) into a calculator gives \(-9\).
- **Mixing up f(3) and f(x) = 3.** The first gives you the input and asks for the output. The second gives you the output and asks for the input.
- **Calling the x values the range.** Domain is inputs (x). Range is outputs (y).
- **Thinking a repeated output breaks the rule.** \(\{(1, 2), (2, 2)\}\) is a function. Only a repeated **input** with two different outputs, like \((0, 5)\) and \((0, 7)\), is not.

## Quick methods

> **Tip: The vertical line test**
>
> Imagine sliding a vertical line across a graph. If it ever touches the graph in two places, one input has two outputs, so it is not a function. A parabola opening up passes. A circle fails.

> **Note: Reading domain and range off a graph**
>
> For the domain, look left to right: which x values does the graph cover? For the range, look bottom to top: which y values does it cover? Closed dots include an endpoint, open dots leave it out, and arrows mean the graph keeps going.

## Practice

**5 practice questions**

1. If \(f(x) = 5 - 2x\), what is \(f(-4)\)?
   A. \(-3\)
   B. \(13\)
   C. \(-13\)
   D. \(22\)

   Answer: \(13\). \(f(-4) = 5 - 2(-4) = 5 + 8 = 13\). The answer \(-3\) comes from using 4 instead of \(-4\).

2. Which set of ordered pairs is NOT a function?
   A. \(\{(1, 2), (2, 2), (3, 2)\}\)
   B. \(\{(0, 5), (1, 6), (0, 7)\}\)
   C. \(\{(-1, 1), (1, 1), (2, 4)\}\)
   D. \(\{(4, 0), (5, 1), (6, 2)\}\)

   Answer: \(\{(0, 5), (1, 6), (0, 7)\}\). The input 0 gives two different outputs, 5 and 7, so it breaks the one-output rule. The other sets repeat some outputs, which is allowed.

3. What is the domain of \(g(x) = \frac{1}{x - 3}\)?
   A. all real numbers
   B. all real numbers except 3
   C. all real numbers except \(-3\)
   D. \(x > 3\)

   Answer: all real numbers except 3. The denominator is 0 when \(x = 3\), and you cannot divide by zero. Every other number works, including numbers less than 3, so \(x > 3\) is too strict.

4. If \(f(x) = x^2 - 3x\), which value of x makes \(f(x) = 10\)?
   A. \(2\)
   B. \(5\)
   C. \(10\)
   D. \(70\)

   Answer: \(5\). Test it: \(f(5) = 25 - 15 = 10\). The trap answer 70 is \(f(10)\): it treats 10 as the input instead of the output. (The equation also has a second solution, \(x = -2\), which is not listed.)

5. What is the range of \(h(x) = x^2 + 1\)?
   A. all real numbers
   B. \(y \ge 0\)
   C. \(y \ge 1\)
   D. \(y > 1\)

   Answer: \(y \ge 1\). \(x^2\) is never negative, so the smallest output is \(0 + 1 = 1\), reached at \(x = 0\). Every larger value is reached too. \(y > 1\) wrongly leaves out 1 itself.

## Frequently asked questions

### What does f(x) mean?

It means "the output of the function f when the input is x." The letter f names the function, and whatever is in the parentheses is the input. So \(f(4)\) is the output when you put in 4. It is a label, not multiplication.

### How do I find the domain of a function?

Start with all real numbers, then remove anything that breaks a rule. Remove inputs that make a denominator zero. Keep only inputs that make the expression under a square root zero or positive. In a word problem, also remove values that make no sense, like negative times.

### What is the difference between domain and range?

The domain is the set of inputs, the x values. The range is the set of outputs, the y values. A memory trick: d comes before r in the alphabet, just as x comes before y in the pair \((x, y)\).

### How do I know if a graph is a function?

Use the vertical line test. If any vertical line touches the graph more than once, some input has two outputs, so it is not a function. If every vertical line touches it at most once, it is a function.

## Related

- [Slope-intercept form and how to write the equation of a line](https://duckyhelper.com/learn/algebra-1/slope-intercept-form/)
- [Functions and function notation on the SAT](https://duckyhelper.com/learn/sat-math/functions/)
- [Transformations of functions](https://duckyhelper.com/learn/algebra-2/function-transformations/)
- [Algebra 1 study guides](https://duckyhelper.com/learn/algebra-1/)

## Try asking Ducky

- "What does f(x) = 10 mean compared to f(10)?"
- "Find the domain and range of the graph on my screen with me."
- "I put -3 into x squared and got -9. Why is that wrong?"

## Get DuckyHelper

Free to start. The web app works in any browser, Chromebooks included; the Mac app can also draw on your real screen. [Try it free in your browser](https://app.duckyhelper.com/?utm_source=duckyhelper.com&utm_medium=learn) or [Get the Mac app](https://duckyhelper.com/download/)
