Domain, Codomain and Range

LESSON 3 OF 27See the unit map ↗

Distinguish inputs, declared outputs and attained outputs.

The bigger question: What does a function tell us—and what can it hide?

On this page

Idea

Domain, codomain and range answer different questions: what inputs are allowed, where outputs are declared to live, and which outputs are actually reached. The codomain is part of the function specification.

Method

For f:A→Bf:A\to B, the range is f(A)={f(x):x∈A}⊆Bf(A)=\{f(x):x\in A\}\subseteq B. Restricting the domain can shrink the range. Enlarging the codomain alone does not change any computed value.

Worked example

For f:[−2,3]→Rf:[-2,3]\to\mathbb R, f(x)=x2f(x)=x^2, the minimum is 00 at x=0x=0 and the maximum is 99 at x=3x=3. The range is [0,9][0,9], not [4,9][4,9]: squaring only the endpoints misses the interior minimum. With domain [1,3][1,3], the same rule has range [1,9][1,9].

Common mistake

The codomain cannot be inferred uniquely from the formula. State it explicitly when asking whether a function is onto.

Check your understanding

Find the range of g:[−1,2]→Rg:[-1,2]\to\mathbb R, g(x)=x+4g(x)=x+4.

Show answer

[3,6][3,6], because the linear function is increasing.

Explore

Domain and range

Try this. Switch functions and compare allowed inputs and outputs. Open circles exclude endpoints; filled circles include them.

Domain and range-6-6-4-4-2-2224466xy
y = x² · Domain: all real x · Range: y ≥ 0
PAUSE & THINKA quick check, not a grade

Try it yourself.

Choose an answer and explain your reasoning to yourself. Use a hint if you get stuck.

For f: ℝ → ℝ with f(x)=x², which is the range?

Hint 1 · Find a starting point

The codomain names allowed outputs; the range names actual outputs.

Hint 2 · Take the next step

Squares are nonnegative, and zero is attained.

Show the reasoning

Answer: [0, ∞)

Every nonnegative real is a square, and no negative real is.

Before moving on: what would make one of the other answers wrong? Saying why is part of understanding.

MAKE IT YOURS

Pause before the next idea.

Can you explain how the visualization connects to this lesson’s goal? If a step still feels uncertain, put this lesson on your review list and try the check again another day.

Optional marks, not a grade. Saved in this browser only. Open notebook →