2.2.2Functions

Domain, codomain, range

2,089 words9 min readdifficulty · medium6 backlinks
Figure — Domain, codomain, range

Definitions & Derivation

Why codomain ≠ range?

  • Codomain is what we declare as the target set (like "my function outputs real numbers")
  • Range is what actually happens (maybe only positive reals come out)
  • Range \subseteq Codomain always, but equality holds only if ff is onto

Derivation from scratch:

  • Start with the definition: a value yy is in the range if and only if the equation f(x)=yf(x) = y has at least one solution xx in the domain
  • This gives us the existence condition xA\exists x \in A
  • Convert it to a solvability problem: invert the function symbolically, then check which yy make xx land in AA

Worked Examples


Common Mistakes


Active Recall Practice

Recall Explain to a 12-Year-Old

Imagine you have a juice machine. Domain = which fruits you're allowed to put in (apples, oranges, but NOT rocks or toys)

Codomain = all types of drinks the machine could make (apple juice, orange juice, grape juice, mango juice...)

Range = drinks that actually come out when you use only your allowed fruits. If you only put in apples and oranges, you'll never get grape juice, even though the machine could make it if you had grapes.

So: Range (actual outputs) ⊆ Codomain (possible outputs), and Domain (allowed inputs) tells you what you can safely use.


Connections

  • Function Basics - prerequisite: what makes something a function
  • Injective Functions - uses range: one-to-one means distinct inputs → distinct outputs
  • Surjective Functions - directly uses: onto ⟺ range equals codomain
  • Inverse Functions - need range = codomain of ff to be domain of f1f^{-1}
  • Composite Functions - range of ff must fit in domain of gg for gfg \circ f
  • Graphing Functions - domain determines x-axis extent, range determines y-axis extent

#flashcards/maths

What is the domain of a function?
The set of all valid input values that the function accepts (the set from which we choose x values).
What is the codomain of a function?
The target set into which the function maps; the set B in notation f: A → B. It contains all possible outputs we declare.
What is the range of a function?
The set of all actual output values that the function produces; range = {f(x) : x ∈ Domain}. Always a subset of the codomain.
How does range relate to codomain?
Range ⊆ Codomain always. They are equal if and only if the function is onto (surjective).
For f(x) = x², domain = ℝ, what is the range?
[0, ∞), because x² is never negative for real x, and every y ≥ 0 is achieved by x = √y.
What's the domain of f(x) = 1/(x-3)?
ℝ \ {3}, because the denominator x - 3 cannot equal zero (division by zero is undefined).
For f: [0, 4] → ℝ, f(x) = x², what is the range?
[0,16], because x² increases on [0,4], minimum at x=0 gives 0, maximum at x=4 gives 16.
How to find the range of a function algebraically?
(1) Write y = f(x), (2) Solve for x in terms of y, (3) Apply domain constraints on x to find which y values are valid.
For f(x) = (2x+1)/(x-1), x ≠ 1, what value is NOT in the range?
y = 2. Setting y = (2x+1)/(x-1) and solving gives x = (y+1)/(y-2). When y=2, denominator is zero (no solution exists).
True or False: The notation f: A → B means range = B
False. It means codomain = B. The range is the subset of B that is actually achieved and may be smaller than B.

Concept Map

accepts inputs from

maps into

actual outputs form

requires

subset of

equals codomain only if

restricts

derived from

produces

determines

D=Reals, C=Reals gives

not equal to codomain so

Function f: A to B

Domain A

Codomain B

Range / Image

Exactly one output per input

Solve y = f x for x

Constraints on y

Onto / Surjective

Example f x = x squared

Range = 0 to infinity

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, function ek machine hai jo input leta hai aur output deta hai. Lekin teen important sets hain:

Domain wo sabhi inputs hain jo tumhara function accept karta hai. Jaise agar f(x) = √x hai, toh negative numbers nahi de sakte kyunki square root real nahi hoga. Toh domain sirf non-negative numbers hai. Isko aisa samjho ki machine ke instructions mein likha hai "sirf yeh chezein dalo."

Codomain wo target set hai jahan outputs ja sakte hain, jo tum declare karte ho jab function likhte ho (jaise f: A→B mein B). Yeh wo sabhi possible outcomes hain jo machine theoretically de sakti hai. Lekin practically, sab kuch achieve nahi hota.

Range wo actual outputs hain jo really nikalte hain jab tum domain ke har element ko function mein daalte ho. Range hamesha codomain ka subset hota hai (chota ya barabar). Agar range = codomain, toh function ko "onto" kehte hain, matlab har possible output actually mil raha hai. Example: f(x)=x² with domain ℝ ka range [0,∞) hai, negative numbers kabhi output nahi ate chahe codomain ℝ ho. Yeh distinction bahut zaroori hai kyunki injectivity aur surjectivity check karne mein, aur inverse functions bane mein yeh concepts direct use hote hain.

Go deeper — visual, from zero

Test yourself — Functions

Connections