Intuition What's the Big Idea?
A function is like a machine that transforms inputs into outputs. But not every machine accepts every input (you can't put diesel in a petrol car), and not every possible output actually comes out (a vending machine might have slots for 50 items but only stock 20).
Domain : ALL inputs the machine accepts
Codomain : ALL outputs the machine could possibly produce (the "target set")
Range : Outputs that actually come out (subset of codomain)
Why this matters : Without knowing the domain, we can't tell if f ( x ) = x f(x) = \sqrt{x} f ( x ) = x works at x = − 3 x = -3 x = − 3 . Without distinguishing range from codomain, we can't tell if a function is onto (surjective).
Definition Function Notation
A function f : A → B f: A \to B f : A → B means:
A A A is the domain (set of all valid inputs)
B B B is the codomain (set we're mapping into )
For each x ∈ A x \in A x ∈ A , there exists exactly one y ∈ B y \in B y ∈ B such that f ( x ) = y f(x) = y f ( x ) = y
The range (or image ) is Range ( f ) = { f ( x ) : x ∈ A } ⊆ B \text{Range}(f) = \{f(x) : x \in A\} \subseteq B Range ( f ) = { f ( x ) : x ∈ A } ⊆ B
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 f f f is onto
Derivation from scratch :
Start with the definition: a value y y y is in the range if and only if the equation f ( x ) = y f(x) = y f ( x ) = y has at least one solution x x x in the domain
This gives us the existence condition ∃ x ∈ A \exists x \in A ∃ x ∈ A
Convert it to a solvability problem: invert the function symbolically, then check which y y y make x x x land in A A A
Worked example Example 1: Square Function
Let f : R → R f: \mathbb{R} \to \mathbb{R} f : R → R defined by f ( x ) = x 2 f(x) = x^2 f ( x ) = x 2
Find domain, codomain, range :
Domain : R \mathbb{R} R (given in notation f : R → … f: \mathbb{R} \to \ldots f : R → … )
Why ? We declared the function accepts all real numbers
Codomain : R \mathbb{R} R (given in notation … → R \ldots \to \mathbb{R} … → R )
Range : Find which y ∈ R y \in \mathbb{R} y ∈ R are achievable
Set y = x 2 y = x^2 y = x 2
Solve for x x x : x = ± y x = \pm\sqrt{y} x = ± y
Why this step? We need to check if for a given y y y , an x x x exists in the domain
For real x x x to exist, we need y ≥ 0 y \geq 0 y ≥ 0
Why? Square root of negative numbers isn't real
Also, for any y ≥ 0 y \geq 0 y ≥ 0 , we can pick x = y ∈ R x = \sqrt{y} \in \mathbb{R} x = y ∈ R and get f ( x ) = y f(x) = y f ( x ) = y
Range = [ 0 , ∞ ) = { y ∈ R : y ≥ 0 } [0, \infty) = \{y \in \mathbb{R} : y \geq 0\} [ 0 , ∞ ) = { y ∈ R : y ≥ 0 }
Key insight : Range ≠ \neq = Codomain here! The function is not onto R \mathbb{R} R because negative numbers are never outputs.
Worked example Example 2: Restricted Square Function
Let g : [ 0 , 5 ] → R g: [0, 5] \to \mathbb{R} g : [ 0 , 5 ] → R defined by g ( x ) = x 2 g(x) = x^2 g ( x ) = x 2
Same formula, different domain—what changes?
Domain : [ 0 , 5 ] [0, 5] [ 0 , 5 ] (only non-negative inputs up to 5)
Codomain : R \mathbb{R} R (still mapping into all reals)
Range :
For x ∈ [ 0 , 5 ] x \in [0, 5] x ∈ [ 0 , 5 ] , what values does x 2 x^2 x 2 take?
Since g ( x ) = x 2 g(x) = x^2 g ( x ) = x 2 is increasing on [ 0 , 5 ] [0, 5] [ 0 , 5 ] :
Minimum: g ( 0 ) = 0 g(0) = 0 g ( 0 ) = 0
Maximum: g ( 5 ) = 25 g(5) = 25 g ( 5 ) = 25
Why this step? On a closed interval, continuous functions achieve all values between min and max
Range = [ 0 , 25 ] [0, 25] [ 0 , 25 ]
Notice : Restricting the domain restricted the range !
Worked example Example 3: Rational Function
Let h : R ∖ { 2 } → R h: \mathbb{R} \setminus \{2\} \to \mathbb{R} h : R ∖ { 2 } → R defined by h ( x ) = x + 1 x − 2 h(x) = \frac{x+1}{x-2} h ( x ) = x − 2 x + 1
Domain : R ∖ { 2 } \mathbb{R} \setminus \{2\} R ∖ { 2 } (all reals except 2)
Why exclude 2? Division by zero at x = 2 x=2 x = 2 is undefined
How to find this? Set denominator ≠ 0 \neq 0 = 0 : x − 2 ≠ 0 ⇒ x ≠ 2 x - 2 \neq 0 \Rightarrow x \neq 2 x − 2 = 0 ⇒ x = 2
Codomain : R \mathbb{R} R
Range : Which y y y can we hit?
Set y = x + 1 x − 2 y = \frac{x+1}{x-2} y = x − 2 x + 1
Solve for x x x :
y ( x − 2 ) = x + 1 y(x-2) = x+1 y ( x − 2 ) = x + 1
y x − 2 y = x + 1 yx - 2y = x + 1 y x − 2 y = x + 1
y x − x = 2 y + 1 yx - x = 2y + 1 y x − x = 2 y + 1
x ( y − 1 ) = 2 y + 1 x(y-1) = 2y+1 x ( y − 1 ) = 2 y + 1
Why this step? We're inverting to see which y y y have corresponding x x x
If y ≠ 1 y \neq 1 y = 1 : x = 2 y + 1 y − 1 x = \frac{2y+1}{y-1} x = y − 1 2 y + 1
This x x x must be in domain, so x ≠ 2 x \neq 2 x = 2 :
2 y + 1 y − 1 ≠ 2 \frac{2y+1}{y-1} \neq 2 y − 1 2 y + 1 = 2
2 y + 1 ≠ 2 ( y − 1 ) 2y+1 \neq 2(y-1) 2 y + 1 = 2 ( y − 1 )
2 y + 1 ≠ 2 y − 2 2y+1 \neq 2y - 2 2 y + 1 = 2 y − 2
1 ≠ − 2 ✓ 1 \neq -2 \quad \checkmark 1 = − 2 ✓
Why check this? To ensure our inverted x x x doesn't violate domain restrictions
So any y ≠ 1 y \neq 1 y = 1 works!
What if y = 1 y = 1 y = 1 ? Then x ( y − 1 ) = 0 x(y-1) = 0 x ( y − 1 ) = 0 forces 0 = 2 y + 1 = 3 0 = 2y+1 = 3 0 = 2 y + 1 = 3 , contradiction
Range = R ∖ { 1 } \mathbb{R} \setminus \{1\} R ∖ { 1 }
Key insight : The function "misses" exactly one value (y = 1 y=1 y = 1 ) in the codomain.
Common mistake Mistake 1: Confusing Codomain with Range
Wrong thinking : "If f : A → B f: A \to B f : A → B , then range must equal B B B "
Why it feels right : The notation → B \to B → B suggests we're hitting all of B B B
The fix :
Codomain is the target set (where we could land)
Range is where we actually land
Range ⊆ \subseteq ⊆ Codomain, but equality needs proof (surjectivity)
Example : f : R → R , f ( x ) = x 2 f: \mathbb{R} \to \mathbb{R}, f(x) = x^2 f : R → R , f ( x ) = x 2 has codomain R \mathbb{R} R but range [ 0 , ∞ ) [0,\infty) [ 0 , ∞ )
Common mistake Mistake 2: Forgetting Domain Restrictions When Finding Range
Wrong approach : For f ( x ) = 4 − x 2 f(x) = \sqrt{4-x^2} f ( x ) = 4 − x 2 , just solve y = 4 − x 2 y = \sqrt{4-x^2} y = 4 − x 2 to get x = ± 4 − y 2 x = \pm\sqrt{4-y^2} x = ± 4 − y 2 , so "any y ≥ 0 y \geq 0 y ≥ 0 works"
Why it feels right : We correctly inverted the function
The fix : After inverting, check that x x x stays in the original domain !
Domain: 4 − x 2 ≥ 0 ⇒ x 2 ≤ 4 ⇒ x ∈ [ − 2 , 2 ] 4 - x^2 \geq 0 \Rightarrow x^2 \leq 4 \Rightarrow x \in [-2, 2] 4 − x 2 ≥ 0 ⇒ x 2 ≤ 4 ⇒ x ∈ [ − 2 , 2 ]
From y = 4 − x 2 y = \sqrt{4-x^2} y = 4 − x 2 and x ∈ [ − 2 , 2 ] x \in [-2,2] x ∈ [ − 2 , 2 ] :
Max y y y : when x = 0 x=0 x = 0 , y = 2 y = 2 y = 2
Min y y y : when x = ± 2 x = \pm 2 x = ± 2 , y = 0 y = 0 y = 0
Correct range : [ 0 , 2 ] [0, 2] [ 0 , 2 ] , not [ 0 , ∞ ) [0, \infty) [ 0 , ∞ )
Common mistake Mistake 3: Writing Domain as a Single Number
Wrong : "Domain of f ( x ) = 1 x f(x) = \frac{1}{x} f ( x ) = x 1 is x ≠ 0 x \neq 0 x = 0 "
Why it feels right : We're identifying the excluded point
The fix : Domain is a set , not a condition
Correct : Domain = R ∖ { 0 } = \mathbb{R} \setminus \{0\} = R ∖ { 0 } or ( − ∞ , 0 ) ∪ ( 0 , ∞ ) (-\infty, 0) \cup (0, \infty) ( − ∞ , 0 ) ∪ ( 0 , ∞ )
The condition x ≠ 0 x \neq 0 x = 0 describes the domain but isn't the domain itself
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.
Mnemonic Memory Aid: DCR = "Doctor"
D omain: D ata goes in
C odomain: C ould come out
R ange: R eally comes out
Or: D on't C onfuse R ange! (Domain → Codomain ⊇ Range)
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 f f f to be domain of f − 1 f^{-1} f − 1
Composite Functions - range of f f f must fit in domain of g g g for g ∘ f g \circ f g ∘ 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.
Exactly one output per input
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.