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.

FunctionsIB AA HL / IGCSEParent functionsIndependent study lesson

On this page

  1. Domain and range as inputs and outputs
  2. Reading domain and range from a graph
  3. Endpoint notation and interval notation
  4. Finding domain and range from formulae
  5. IB AA HL parent functions reference
  6. Worked examples
  7. 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.

\[\operatorname{dom} f=\mathbb{R}, \qquad \operatorname{range} f=[0,\infty).\]

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.
x y −3 0 4 −2 0 3 domain: −3 ≤ x < 4 range: −2 ≤ y ≤ 3 (−3, −2) open endpoint highest y-value: 3

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.

\[\operatorname{domain}=[-3,4), \qquad \operatorname{range}=[-2,3].\]

3. Endpoint notation and interval notation

IB students should be comfortable moving between inequalities and interval notation.

Graph featureInequality notationInterval notationMeaning
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:

\[5-2x\ge 0.\]

Solving gives \(-2x\ge -5\), so \(x\le \frac{5}{2}\).

\[\operatorname{dom} f=(-\infty,\tfrac{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\).

\[\operatorname{dom} g=\mathbb{R}\setminus\{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:

\[x+3\gt 0.\]

Therefore \(x\gt -3\).

\[\operatorname{dom} h=(-3,\infty).\]

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

y = x
Domain
Range

Quadratic

y = x²
Domain
Range
[0, ∞)

Cubic

y = x³
Domain
Range

Modulus

y = |x|
Domain
Range
[0, ∞)

Square root

y = √x
Domain
[0, ∞)
Range
[0, ∞)

Reciprocal

y = 1/x
Domain
ℝ \ {0}
Range
ℝ \ {0}

Vertical asymptote: x = 0. Horizontal asymptote: y = 0.

Exponential

y = bˣ, b > 0, b ≠ 1
Domain
Range
(0, ∞)

For 0 < b < 1 the graph decreases, but the domain and range are the same.

Logarithmic

y = logb x, b > 0, b ≠ 1
Domain
(0, ∞)
Range

Vertical asymptote: x = 0.

Sine

y = sin x
Domain
Range
[-1, 1]

Period: 2π.

Cosine

y = cos x
Domain
Range
[-1, 1]

Period: 2π.

Tangent

y = tan x
Domain
ℝ \ {π/2 + kπ : k ∈ ℤ}
Range

Vertical asymptotes: x = π/2 + kπ.

Inverse sine

y = sin⁻¹ x
Domain
[-1, 1]
Range
[-π/2, π/2]

Inverse cosine

y = cos⁻¹ x
Domain
[-1, 1]
Range
[0, π]

Inverse tangent

y = tan⁻¹ x
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\).

\[\operatorname{dom} f=[-1,\infty), \qquad \operatorname{range} f=[-3,\infty).\]
xy(−1, −3)domain starts at x = −1minimum y = −3y = 2√(x+1) − 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\).

\[\operatorname{dom} g=\mathbb{R}\setminus\{4\}, \qquad \operatorname{range} g=\mathbb{R}\setminus\{2\}.\]
-6-4-22468101214-6-4-2246810 x y x = 4 y = 2 y = 3/(x−4)+2 (5,5) (3,−1)

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:

\[-4\le 3\sin x-1\le2.\]

Therefore the range is \([-4,2]\).

7. Practice with solutions

  1. 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)\).

  2. Find the domain of \(f(x)=\sqrt{7-x}\).
    Show solution

    Require \(7-x\ge0\), so \(x\le7\). The domain is \((-\infty,7]\).

  3. 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\}\).

  4. 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]\).

  5. 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.