The domain of a function is the set of all allowed inputs. The range is the set of all possible outputs. At GCSE Higher you need to state domains and ranges using inequality notation, identify values excluded from the domain, and read them from graphs.

What do domain and range mean precisely?

A function f takes an input x and produces an output f(x). Think of it as a machine:

  • Domain: the set of x-values you are allowed to put in
  • Range: the set of f(x) values that come out

The domain is controlled by what makes the function defined (no division by zero, no square root of a negative). The range depends on what values the function can actually produce.

Example: For the function f(x) = x², every real number can be squared, so the domain is all real numbers. But x² is always non-negative, so f(x) ≥ 0 — the range is f(x) ≥ 0.

What values are excluded from the domain?

Two main situations cause values to be excluded:

Division by zero

If the function has a denominator containing x, any value of x that makes the denominator zero is excluded.

Example: f(x) = 1/(x − 3)

When x = 3, the denominator is 0. So x = 3 is excluded. Domain: x ∈ ℝ, x ≠ 3 (which means all real numbers except 3)

Square root of a negative number

Square roots of negative numbers are not real, so any x that makes the expression under the root negative is excluded.

Example: f(x) = √(2x − 4)

We need 2x − 4 ≥ 0, so x ≥ 2. Domain: x ≥ 2

How do you find the range?

The range depends on the function's behaviour. Some strategies:

  • Sketch the graph and read off the y-values the curve covers.
  • Use the shape of the function — a parabola y = x² + 1 has a minimum at y = 1, so range: f(x) ≥ 1.
  • Solve for x in terms of y — if you can write x = g(y), substitute the domain restriction on x to find the restriction on y.

Key domain and range summary table

Function Domain Range
f(x) = x² All real numbers f(x) ≥ 0
f(x) = x² + 3 All real numbers f(x) ≥ 3
f(x) = (x − 2)² + 5 All real numbers f(x) ≥ 5
f(x) = √x x ≥ 0 f(x) ≥ 0
f(x) = 1/x x ≠ 0 f(x) ≠ 0
f(x) = 1/(x + 2) x ≠ −2 f(x) ≠ 0
f(x) = sin x All real numbers −1 ≤ f(x) ≤ 1

Worked examples

Example 1: Find the domain and range of f(x) = √(9 − x²).

Domain: We need 9 − x² ≥ 0, so x² ≤ 9, meaning −3 ≤ x ≤ 3. Domain: −3 ≤ x ≤ 3.

Range: When x = 0, f(0) = 3 (maximum). When x = ±3, f(±3) = 0 (minimum). The function is always non-negative. Range: 0 ≤ f(x) ≤ 3.

Example 2: Find the domain of f(x) = 1/√(x − 5).

We need x − 5 > 0 (strictly greater, not ≥, because the denominator cannot be zero). So x > 5. Domain: x > 5.

How do you read domain and range from a graph?

  • Domain: project the graph down onto the x-axis. The domain is the set of x-values for which the graph exists.
  • Range: project the graph sideways onto the y-axis. The range is the set of y-values the graph reaches.

Look for:

  • Gaps or holes in the graph (isolated excluded points)
  • Asymptotes (horizontal lines the graph approaches but never touches — these y-values are excluded from the range)
  • Minimum or maximum y-values (turning points of a parabola, for instance)

Frequently asked questions

What is the difference between domain and codomain?

At GCSE, you will almost always meet the word range, not codomain. The codomain is the set of possible outputs declared at the outset; the range is the set of outputs actually produced. For GCSE purposes, treat "range" as the set of y-values the function actually takes.

How do I write the domain when two values are excluded?

Use separate inequality statements joined with "and." For example, if x = 2 and x = −1 are both excluded: "x ∈ ℝ, x ≠ 2, x ≠ −1." Alternatively some textbooks write {x : x ∈ ℝ, x ≠ 2, x ≠ −1}.

Does domain and range appear at Foundation tier?

Domain and range as named concepts are a Higher tier topic. Foundation students need to understand function notation and evaluate functions, but formal domain and range notation is tested mainly at Higher.

Why is the range of 1/x not including 0?

No matter how large or small x is (positive or negative), 1/x can never equal 0 — you cannot divide 1 by any finite number and get zero. As x → ∞, f(x) → 0 but never reaches it. This is why the horizontal asymptote y = 0 represents a value excluded from the range.

Explore domain and range with guided questions from Professor Pi at aitutors.me.