The domain is every input a function accepts. The range is every output it can produce. For most functions in algebra, the domain is easy once you know what to look for, and the range takes a little more thought.
Finding the domain
Start by assuming every real number works. Then throw out the x values that break something. In algebra and precalculus, only three things break a function:
- Dividing by zero. Set the denominator equal to zero and remove those x values.
- An even root of a negative number. What’s under a square root (or fourth root) must be ≥ 0.
- A log of zero or a negative number. What’s inside a log must be > 0.
If none of those three appear, the domain is all real numbers. That covers every polynomial, every cube root and every exponential.
Example f(x) = 1/(x − 4)
x − 4 = 0 at x = 4. Domain: every real number except 4.
Example f(x) = √(2x − 6)
2x − 6 ≥ 0, so x ≥ 3. Domain: x ≥ 3.
Example f(x) = (x + 3)/(x² − x − 6)
- The denominator factors to (x − 3)(x + 2).
- It’s zero at x = 3 and x = −2.
- Domain: every real number except 3 and −2.
Don’t cancel anything before finding the domain. Even if a factor cancels from the top and bottom, the original function still can’t take that x value. That’s where a hole comes from.
Example f(x) = √(x − 1)/(x − 5)
- The root needs x − 1 ≥ 0, so x ≥ 1.
- The denominator needs x ≠ 5.
- Domain: x ≥ 1, but not 5.
Example f(x) = 1/√(9 − x²)
- The root needs 9 − x² ≥ 0.
- It’s also in a denominator, so it can’t be zero either. That makes it 9 − x² > 0.
- x² < 9, so −3 < x < 3.
Example f(x) = log(x + 2)
x + 2 > 0, so x > −2.
Interval notation
Domains and ranges are usually written as intervals. A bracket includes the endpoint. A parenthesis leaves it out. Infinity always gets a parenthesis, since you can never reach it.
| Inequality | Interval notation |
|---|---|
| x ≥ 3 | [3, ∞) |
| x > −2 | (−2, ∞) |
| −3 < x < 3 | (−3, 3) |
| −1 ≤ x < 4 | [−1, 4) |
| x ≠ 4 | (−∞, 4) ∪ (4, ∞) |
| all real numbers | (−∞, ∞) |
The ∪ symbol means “or,” joining two pieces. “Every real number except 3 and −2” becomes (−∞, −2) ∪ (−2, 3) ∪ (3, ∞).
Finding the range
There’s no single checklist for the range. These four approaches cover almost everything you’ll see.
1. Read it from the graph
Look at how low and how high the graph goes. Squash the graph flat onto the y-axis. Whatever part of the axis gets covered is the range. Watch for open dots (not included) and closed dots (included).
2. Use the vertex for a parabola
A parabola has one turning point, so its range starts or stops there.
Example y = x² − 4x + 1
- Vertex x = −b/(2a) = 4/2 = 2.
- y = 4 − 8 + 1 = −3.
- It opens up, so the range is y ≥ −3, or [−3, ∞).
Example y = −2(x + 1)² + 5
It’s already in vertex form, with vertex (−1, 5). It opens down, so the range is y ≤ 5, or (−∞, 5].
3. Think about what the pieces can output
Example y = √(x − 3) + 2
A square root is never negative, so √(x − 3) ≥ 0. Adding 2 means y ≥ 2. Range: [2, ∞).
Example y = 2x + 1
2x is always positive and never reaches 0. So y is always more than 1. Range: (1, ∞).
Example y = 1/(x − 4)
A fraction with 1 on top can never equal 0. It can be any other number. Range: every real number except 0.
4. Solve for x
Write y = f(x), solve for x, and see which y values cause trouble. This is the same algebra as finding an inverse function, and for a good reason: the range of f is the domain of its inverse.
Example y = (2x + 1)/(x − 3)
- y(x − 3) = 2x + 1
- xy − 3y = 2x + 1
- xy − 2x = 3y + 1
- x = (3y + 1)/(y − 2)
- This breaks only when y = 2. Range: every real number except 2.
Domains from real situations
A word problem can limit the domain more than the formula does. If C(n) = 12n + 30 is the cost of n concert tickets, n has to be a whole number, and there’s probably a maximum number you can buy. If h(t) is the height of a thrown ball, t only makes sense from launch until it lands.
When a question asks for the “reasonable domain,” that’s what it wants: the inputs that make sense for the situation.
Writing the range from x values
For y = (x − 2)², it’s tempting to say the range starts at 2, because the graph sits at x = 2. The vertex is (2, 0), so the range is y ≥ 0. The range is about y.
Brackets on infinity
[3, ∞] is wrong. Infinity is not a number you can include, so it always takes a parenthesis: [3, ∞).
Check yourself
Find the domain of f(x) = 5/(x + 7).
Show answer
All real numbers except −7: (−∞, −7) ∪ (−7, ∞).
Find the domain of f(x) = √(10 − 2x).
Show answer
10 − 2x ≥ 0, so x ≤ 5: (−∞, 5].
Find the domain of f(x) = x/(x² − 16).
Show answer
All real numbers except 4 and −4.
Find the domain of f(x) = ln(3 − x).
Show answer
x < 3: (−∞, 3).
Find the domain of f(x) = x³ − 2x + 9.
Show answer
All real numbers. It’s a polynomial.
Find the range of y = x² + 6x + 4.
Show answer
Vertex at x = −3, y = 9 − 18 + 4 = −5. Range [−5, ∞).
Find the range of y = −√x + 4.
Show answer
−√x ≤ 0, so y ≤ 4: (−∞, 4].
Find the range of y = (x + 5)/(x − 1).
Show answer
Solving for x gives x = (y + 5)/(y − 1), so every real number except 1.