Domain and Range
Two terms come up constantly when you work with functions: domain and range. They describe the boundaries of what a function can take in and what it can put out.
What Is the Domain?
The domain of a function is the set of all valid inputs — every value you're allowed to plug in. For most simple algebraic functions, the domain is all real numbers, because there's nothing that would break the function.
Take \(f(x) = 2x + 1\). What can you plug in for \(x\)? Anything. Negative numbers, zero, fractions, billion-digit decimals — they all produce a valid output. The domain is all real numbers.

Visually, that's a line that stretches forever in both horizontal directions. There's no \(x\)-value that the line fails to cover.
Common Domain Restrictions
A few situations break a function and force you to exclude certain inputs from the domain.
Division by Zero
The most common culprit. Consider:
$$y = \frac{3}{x - 1}$$
For almost every \(x\), this works fine. But what happens at \(x = 1\)? The denominator becomes zero, and \(\frac{3}{0}\) is undefined. So \(x = 1\) is excluded from the domain. The domain is all real numbers except \(x = 1\).
When looking for domain restrictions, the first thing to check is whether any \(x\)-value makes a denominator equal to zero. Those values get tossed out.
Square Roots of Negative Numbers
In the real numbers, you can't take the square root of a negative. So if a variable appears inside a square root (or any even-indexed radical), the expression underneath must be zero or positive.
Example: Find the domain of \(f(x) = \sqrt{x - 2}\).
The expression inside the radical, \(x - 2\), must be \(\geq 0\). That gives \(x \geq 2\). The domain is all real numbers greater than or equal to 2.
Other Restrictions
Inverse trig functions have built-in restrictions: since the output of \(\sin x\) is always between \(-1\) and \(1\), the input of \(\arcsin x\) is also restricted to that interval. Logarithms only accept positive inputs. These come up later in algebra and precalculus, but the same general idea applies — identify any input that "breaks" the function, and exclude it.
When asked to find the domain, the standard checklist is: any denominators that could equal zero, any radicals that could go negative, and any other operation that has a built-in input restriction.
What Is the Range?
The range is the set of all possible outputs — every value of \(y\) (or \(f(x)\)) the function can produce.
For most simple linear functions, the range is also all real numbers. A line like \(y = 3x\) extends forever in both vertical directions:

There's no \(y\)-value the line fails to hit, so the range is all real numbers.
The clear exception is a horizontal line. The function \(y = 3\) produces only one output (the number 3), no matter what \(x\) is:

The range of \(y = 3\) is just \({3}\). One output and only one output.
Functions with Limited Ranges
Functions with restricted ranges are much more common than functions with restricted domains. Two examples:

The blue parabola is \(y = x^2 - 2\). Because \(x^2\) is always zero or positive, the smallest value of \(y\) is \(-2\) (reached at \(x = 0\)). The function never produces an output below \(-2\), so the range is \(y \geq -2\).
The red curve is \(y = \sin x\). Sine oscillates between \(-1\) and \(1\) forever, never reaching beyond. The range is \(-1 \leq y \leq 1\).
When checking the range of a function, two approaches work. Looking at the graph and reading off the lowest and highest \(y\)-values is the fastest visual check. Algebraically, watch for operations that constrain the output: even powers (\(x^2\), \(x^4\)) always produce non-negative results, absolute values are always non-negative, and trigonometric functions have built-in bounds.
Summary
The domain is all the possible inputs the function will accept; the range is all the possible outputs it produces.

Most algebraic functions have a domain of all real numbers unless a denominator could be zero or a radical could go negative. Most functions have a more restricted range, especially anything involving squares, absolute values, or trigonometric operations.
To check the domain and range of any function you enter, try the Domain and Range Calculator — it walks through the restrictions step by step and reports both sets in interval notation.
Practice Problems
1. Find the domain of \(f(x) = \dfrac{5}{x + 3}\). Show answerThe denominator is zero when \(x = -3\), so that value is excluded. Domain: all real numbers except \(x = -3\).
2. Find the domain of \(g(x) = \sqrt{x + 4}\). Show answerThe expression under the radical must be non-negative: \(x + 4 \geq 0\), so \(x \geq -4\). Domain: \(x \geq -4\).
3. Find the domain of \(h(x) = \dfrac{x}{x^2 - 9}\). Show answerFactor the denominator: \(x^2 - 9 = (x-3)(x+3)\). This is zero at \(x = 3\) and \(x = -3\), so both are excluded. Domain: all real numbers except \(x = \pm 3\).
4. What is the range of \(y = x^2 + 1\)? Show answer\(x^2\) is always \(\geq 0\), so \(x^2 + 1\) is always \(\geq 1\). Range: \(y \geq 1\).
5. What is the range of \(y = -|x|\)? Show answer\(|x|\) is always \(\geq 0\), so \(-|x|\) is always \(\leq 0\). Range: \(y \leq 0\).
6. What is the domain and range of \(y = 7\)? Show answerAny \(x\) is valid, so the domain is all real numbers. The output is always 7, so the range is \({7}\).