Functions – Domain, Range and Types of Functions (One-One, Onto, Bijective)
Quantitative Aptitude › Set Theory, Functions and Graphs · Topic 23.3
A function assigns to each element of a set A, called the domain, exactly one element of a set B. The set of values actually taken is the range, and a function is one-one if different inputs give different outputs, onto if every element of B is an output, and bijective if it is both.
5 min read · Quantitative Aptitude · Set Theory, Functions and Graphs
Quick Answer
A function assigns to each element of a set A, called the domain, exactly one element of a set B. The set of values actually taken is the range, and a function is one-one if different inputs give different outputs, onto if every element of B is an output, and bijective if it is both.
At a Glance
- Domain Allowed inputs
- Range Outputs actually obtained
- One-one Distinct inputs, distinct outputs
- Onto Range equals codomain
- Bijective One-one and onto
Where Does It Fit?
This topic builds on Set Theory – Union, Intersection, Complement and Venn Diagram Problems. It leads to Composite Functions and Inverse Functions and Graphs of Linear, Quadratic and Modulus Functions, and the algebra uses Linear Equations in One and Two Variables.
What Are the Domain, Codomain and Range?
In short: a function f from A to B takes each input in A to exactly one output in B. A is the domain, B is the codomain, and the set of outputs actually reached is the range.
| Function | Domain | Range |
|---|---|---|
| f(x) = x² | All real numbers | y ≥ 0 |
| f(x) = √(x – 2) | x ≥ 2 | y ≥ 0 |
| f(x) = 1/(x – 3) | x ≠ 3 | y ≠ 0 |
| f(x) = |x| | All real numbers | y ≥ 0 |
| f(x) = 2x + 3 | All real numbers | All real numbers |
Restrictions on the domain come from division by zero and square roots of negative numbers.
What Are One-One, Onto and Bijective Functions?
In short: test whether two different inputs can give the same output, and whether every codomain value is reached.
| Type | Test | Example |
|---|---|---|
| One-one | f(a) = f(b) implies a = b | f(x) = 2x + 3 |
| Many-one | Two inputs give one output | f(x) = x² on all reals |
| Onto | Range = codomain | f(x) = 2x + 3 from R to R |
| Into | Range is smaller than the codomain | f(x) = x² from R to R |
| Bijective | One-one and onto | f(x) = x³ from R to R |
How Do You Count Functions Between Finite Sets?
In short: if A has m elements and B has n elements, the counts follow from the multiplication rule.
Counting formulas
- All functions from A to B: nᵐ.
- One-one functions (n ≥ m): n × (n – 1) × … × (n – m + 1).
- Onto functions from 3 elements onto 2: 2³ – 2 = 6.
- Bijective functions need m = n and number n!.
The counting rule is explained in Fundamental Principle of Counting (Addition and Multiplication Rules).
Solved Examples
Example 1
Question: Find the domain and range of f(x) = √(x – 2).
- The square root needs x – 2 ≥ 0, so x ≥ 2.
- Outputs of a square root are non-negative and take every non-negative value.
Answer: Domain x ≥ 2 and range y ≥ 0.
Example 2
Question: Find the domain and range of f(x) = 1/(x – 3).
- The denominator cannot be zero, so x ≠ 3.
- The value 0 can never be obtained, since 1 divided by a number is never 0.
Answer: Domain x ≠ 3 and range y ≠ 0.
Example 3
Question: Is f(x) = x² from R to R one-one or onto?
- f(2) = f(-2) = 4, so it is not one-one.
- Negative numbers are never outputs, so it is not onto.
Answer: It is neither one-one nor onto.
Example 4
Question: Show that f(x) = 2x + 3 is bijective from R to R.
- If 2a + 3 = 2b + 3 then a = b, so it is one-one.
- For any y, x = (y – 3)/2 gives f(x) = y, so it is onto.
Answer: It is one-one and onto, so it is bijective.
Example 5
Question: A has 3 elements and B has 5 elements. Find the number of functions and the number of one-one functions from A to B.
- All functions = 5³ = 125.
- One-one functions = 5 × 4 × 3 = 60.
Answer: There are 125 functions, of which 60 are one-one.
Shortcuts and Tricks
- For domain, check denominators and square roots first.
- A function is many-one if you can find two inputs with the same output.
- A strictly increasing or decreasing function is always one-one.
- For counting, one-one functions use falling products; all functions use powers.
- If the codomain is not given, take it equal to the range.
Common Mistakes
- Confusing codomain with range.
- Treating an odd root like a square root when finding the domain.
- Assuming f(x) = x² is one-one on all reals.
- Counting nᵐ and mⁿ in the wrong order.
- Forgetting that a function gives exactly one output for each input.
Practice Questions
- Find the domain of √(9 – x²).
- Find the range of x² + 1.
- Find the number of one-one functions from a 2-element set to a 4-element set.
- Find the number of functions from a 4-element set to a 2-element set.
- Find the range of |x|.
- Is f(x) = x³ from R to R bijective?
Answers: 1) -3 ≤ x ≤ 3; 2) y ≥ 1; 3) 12; 4) 16; 5) y ≥ 0; 6) yes.
Why Is This Topic Important?
- Foundation Functions are the language of graphs and algebra.
- Exam use Domain and counting questions appear in CAT.
- Link They lead to composition in Composite Functions and Inverse Functions.
What Comes Next?
The next topic is Composite Functions and Inverse Functions, which combines functions and finds their inverses.
Key Terms and Formulas
- Domain The set of allowed inputs
- Codomain The set in which outputs are allowed to lie
- Range The set of outputs actually obtained
- Bijective One-one and onto
Related Topics
- Set Theory Problems Involving Three Overlapping Sets
- Composite Functions and Inverse Functions
- Set Theory – Union, Intersection, Complement and Venn Diagram Problems
- Graphs of Linear, Quadratic and Modulus Functions
Exam Corner
Points to Remember
- Domain = inputs; range = outputs actually reached.
- One-one: distinct inputs give distinct outputs.
- Onto: range equals codomain.
- Number of functions from A to B = n(B) raised to n(A).
Do Not Confuse With
- Codomain vs range The range is only the outputs actually reached.
- One-one vs onto One-one concerns inputs; onto concerns outputs.
- Function vs relation A function gives exactly one output for each input.
Memory Hook
One-one is about inputs, onto is about outputs.
GS Relevance
Frequently Asked Questions
What are the domain and range of a function?
The domain of a function is the set of all allowed inputs, and the range is the set of outputs actually obtained. For f of x equal to the square root of x minus 2, the domain is x at least 2 and the range is y at least 0.
What is a one-one function?
A one-one function gives different outputs for different inputs, so f of a equal to f of b implies a equals b. The function 2x plus 3 is one-one, while x squared on all real numbers is not, because 2 and minus 2 both map to 4.
What is an onto function?
An onto function is one whose range equals its codomain, so every element of the codomain is the output of at least one input. The function 2x plus 3 from reals to reals is onto, while x squared from reals to reals is not, because negatives are never obtained.
What is a bijective function?
A bijective function is both one-one and onto, so every input has a distinct output and every codomain element is reached exactly once. Such a function has an inverse, and the function x cubed from real numbers to real numbers is an example of a bijection.
How many functions are there from a set of 3 elements to a set of 5 elements?
There are 125 functions, because each of the 3 elements of the domain can be sent to any of the 5 elements of the codomain, giving 5 times 5 times 5. Of these, 5 times 4 times 3, which is 60, are one-one.
PYQ Practice — Statement Analysis
1 The function f(x) = x² from R to R is one-one.
f(2) = f(-2).
2 The function f(x) = 2x + 3 from R to R is bijective.
It is both one-one and onto.
3 The number of functions from a 3-element set to a 5-element set is 125.
5³ = 125.
4 The range of f(x) = 1/(x - 3) includes 0.
1 divided by a number is never 0.
Related Topics
Browse the full Quantitative Aptitude index