Domain and Range
The domain tells us which input values are allowed. The range tells us which output values are possible. This lesson develops the idea from graphs, formulae and the parent functions used in IB AA HL.
On this page
- Domain and range as inputs and outputs
- Reading domain and range from a graph
- Endpoint notation and interval notation
- Finding domain and range from formulae
- IB AA HL parent functions reference
- Worked examples
- Practice with expandable solutions
1. What do domain and range mean?
If a function is written as \(y=f(x)\), the domain is the set of possible input values, usually the possible \(x\)-values. The range is the set of possible output values, usually the possible \(y\)-values.
A useful way to think about this is to imagine the function as a machine:
Input
The value you put into the function. This is usually \(x\).
Function rule
The operation performed by the function, for example squaring, taking a square root, or taking a logarithm.
Output
The value produced by the function. This is usually \(y\) or \(f(x)\).
For example, if \(f(x)=x^2\), then every real input is allowed. But the output can never be negative, because a square is always non-negative.
2. Reading domain and range from a graph
When a graph is given, do not try to read only isolated points. Imagine the whole curve being projected onto the axes.
- To read the domain, project the curve onto the \(x\)-axis.
- To read the range, project the curve onto the \(y\)-axis.
This graph is deliberately labelled: the left endpoint is filled, so \(x=-3\) is included. The right endpoint is open, so \(x=4\) is not included. The lowest and highest \(y\)-values are both reached, so they are both included in the range.
3. Endpoint notation and interval notation
IB students should be comfortable moving between inequalities and interval notation.
| Graph feature | Inequality notation | Interval notation | Meaning |
|---|---|---|---|
| Filled left endpoint, filled right endpoint | \(a\le x\le b\) | \([a,b]\) | Both endpoints included. |
| Filled left endpoint, open right endpoint | \(a\le x\lt b\) | \([a,b)\) | Left included, right not included. |
| Open left endpoint, filled right endpoint | \(a\lt x\le b\) | \((a,b]\) | Left not included, right included. |
| Open left endpoint, open right endpoint | \(a\lt x\lt b\) | \((a,b)\) | Neither endpoint included. |
| Continues forever to the right | \(x\ge a\) or \(x\gt a\) | \([a,\infty)\) or \((a,\infty)\) | Infinity is never included. |
Important notation warning
Never write square brackets around infinity. Use \((\infty\) or \(-\infty)\) with a round bracket because infinity is not a number that can be reached.
4. Finding the domain from a formula
When a formula is given, start with the largest possible set of inputs and then remove values that would break the rule.
Restrictions to check
- Fractions: denominators cannot be zero.
- Even roots: the expression inside the root must be non-negative.
- Logarithms: the argument of the logarithm must be positive.
- Trigonometric functions: tangent is undefined at odd multiples of \(\frac{\pi}{2}\).
- Inverse trigonometric functions: the domain and range are deliberately restricted so they are functions.
Worked example 1: square-root restriction
Find the domain of \(f(x)=\sqrt{5-2x}\).
The expression inside the square root must be non-negative:
Solving gives \(-2x\ge -5\), so \(x\le \frac{5}{2}\).
Worked example 2: denominator restriction
Find the domain of \(g(x)=\frac{3}{x-4}+2\).
The denominator cannot be zero, so \(x-4\ne 0\). Therefore \(x\ne 4\).
Worked example 3: logarithmic restriction
Find the domain of \(h(x)=\log_2(x+3)\).
The logarithm only accepts positive inputs, so the argument must be positive:
Therefore \(x\gt -3\).
5. IB AA HL parent functions: domain and range reference
The following parent functions are the standard graphs students should recognise quickly. This reference has been rebuilt as a checked section: the formulae are rendered as stable text, and each sketch is drawn from the actual parent function rather than as a rough placeholder.
For IB AA HL, knowing these base domains and ranges helps enormously when transforming graphs. When a parent graph is translated, stretched, reflected or restricted, the domain and/or range must be updated accordingly.
Linear
- Domain
- ℝ
- Range
- ℝ
Quadratic
- Domain
- ℝ
- Range
- [0, ∞)
Cubic
- Domain
- ℝ
- Range
- ℝ
Modulus
- Domain
- ℝ
- Range
- [0, ∞)
Square root
- Domain
- [0, ∞)
- Range
- [0, ∞)
Reciprocal
- Domain
- ℝ \ {0}
- Range
- ℝ \ {0}
Vertical asymptote: x = 0. Horizontal asymptote: y = 0.
Exponential
- Domain
- ℝ
- Range
- (0, ∞)
For 0 < b < 1 the graph decreases, but the domain and range are the same.
Logarithmic
- Domain
- (0, ∞)
- Range
- ℝ
Vertical asymptote: x = 0.
Sine
- Domain
- ℝ
- Range
- [-1, 1]
Period: 2π.
Cosine
- Domain
- ℝ
- Range
- [-1, 1]
Period: 2π.
Tangent
- Domain
- ℝ \ {π/2 + kπ : k ∈ ℤ}
- Range
- ℝ
Vertical asymptotes: x = π/2 + kπ.
Inverse sine
- Domain
- [-1, 1]
- Range
- [-π/2, π/2]
Inverse cosine
- Domain
- [-1, 1]
- Range
- [0, π]
Inverse tangent
- Domain
- ℝ
- Range
- (-π/2, π/2)
Horizontal asymptotes: y = ±π/2.
How to use this table
Do not memorise the domain and range separately from the graph. Instead, connect each statement to the sketch: the domain is the horizontal spread of the curve and the range is the vertical spread of the curve.
6. Worked examples
Worked example 4: transformed square-root function
Find the domain and range of \(f(x)=2\sqrt{x+1}-3\).
The square root requires \(x+1\ge0\), so \(x\ge-1\). Therefore the domain is \([-1,\infty)\).
Since \(\sqrt{x+1}\ge0\), we have \(2\sqrt{x+1}\ge0\), and therefore \(2\sqrt{x+1}-3\ge-3\).
The transformed square-root graph begins at \((-1,-3)\), then continues to the right and upward.
Worked example 5: reciprocal transformation
Find the domain and range of \(g(x)=\frac{3}{x-4}+2\).
The denominator cannot be zero, so \(x\ne4\). This gives a vertical asymptote at \(x=4\).
The graph is a reciprocal graph shifted up by 2, so it has horizontal asymptote \(y=2\). The function can get close to \(2\), but never equals \(2\).
The vertical asymptote removes \(x=4\) from the domain. The horizontal asymptote removes \(y=2\) from the range.
Worked example 6: trigonometric range
Find the range of \(y=3\sin x-1\).
We know that \(-1\le\sin x\le1\). Multiplying by 3 gives \(-3\le3\sin x\le3\). Subtracting 1 gives:
Therefore the range is \([-4,2]\).
7. Practice with solutions
- State the domain and range of \(y=(x-2)^2+1\).
Show solution
This is \(y=x^2\) translated 2 units right and 1 unit up. The domain remains \(\mathbb{R}\). The minimum value is \(1\), so the range is \([1,\infty)\).
- Find the domain of \(f(x)=\sqrt{7-x}\).
Show solution
Require \(7-x\ge0\), so \(x\le7\). The domain is \((-\infty,7]\).
- Find the domain of \(g(x)=\frac{1}{x^2-9}\).
Show solution
The denominator cannot equal zero. Since \(x^2-9=(x-3)(x+3)\), exclude \(x=3\) and \(x=-3\). The domain is \(\mathbb{R}\setminus\{-3,3\}\).
- State the domain and range of \(y=\sin x\).
Show solution
The sine function is defined for all real values of \(x\), so the domain is \(\mathbb{R}\). Its outputs lie between \(-1\) and \(1\), so the range is \([-1,1]\).
- State the domain and range of \(y=\tan^{-1}x\).
Show solution
The inverse tangent function accepts every real input, so its domain is \(\mathbb{R}\). Its horizontal asymptotes are \(y=-\frac{\pi}{2}\) and \(y=\frac{\pi}{2}\), so its range is \((-\frac{\pi}{2},\frac{\pi}{2})\).
Video note
I have not embedded an unverified video on this page. Exact-topic Radford Mathematics videos should be added here after the video audit confirms a domain-and-range or parent-functions video. This avoids the earlier issue of placing unrelated videos on the wrong pages.