Quantitative Aptitude · Sets, Relations and Functions, Limits and Continuity
Functions and Their Types for CA Foundation
Updated 1 October 2026 · Fact-checked
A function assigns each input in a set exactly one output. To solve questions, find the domain from restrictions (denominators, even roots, logs), then test the type: one-one if different inputs give different outputs, onto if the range equals the codomain. For composite functions work inside out; for inverse, swap x and y and solve.
Understand Functions and Their Types
A function is a rule that takes each element of one set and gives exactly one element of another set. Think of a vending machine: each button gives one item. Two buttons can give the same item, but one button cannot give two items. We write f: A → B.
The set A is the domain (allowed inputs). The set B is the codomain (the set where outputs are allowed to lie). The range is the set of outputs that actually occur. Range is always a subset of the codomain. Students mix these up often.
Types by mapping: a function is one-one (injective) if different inputs always give different outputs. It is many-one if at least two inputs give the same output. It is onto (surjective) if every element of the codomain is an output, so range = codomain. It is into if some codomain element is never an output. A function that is both one-one and onto is bijective, and only a bijective function has an inverse.
Other types: a constant function gives the same output for every input. The identity function has f(x) = x. A function is even if f(−x) = f(x) (graph symmetric about the y-axis) and odd if f(−x) = −f(x) (symmetric about the origin). Many functions are neither.
Two operations matter in exams. The composite (f∘g)(x) = f(g(x)) means apply g first, then f. The inverse f⁻¹ undoes f: if f(a) = b then f⁻¹(b) = a.
Key formulas to remember
- Domain restrictions
- Denominator ≠ 0; expression under an even root ≥ 0; argument of log > 0
- Apply every restriction together and take the common values of x.
- One-one test
- f(a) = f(b) ⇒ a = b
- If you can find two different inputs with the same output, it is many-one. Example: x² on all real numbers.
- Onto test
- Range = Codomain
- Always check what the codomain is. The same rule can be onto for one codomain and into for another.
- Composite function
- (f∘g)(x) = f(g(x))
- Work inside out. In general f∘g ≠ g∘f.
- Inverse function
- f⁻¹(f(x)) = x and f(f⁻¹(y)) = y
- Exists only if f is one-one and onto. f⁻¹(x) is not 1 ÷ f(x).
- Inverse of a linear function
- If f(x) = ax + b (a ≠ 0), then f⁻¹(x) = (x − b) ÷ a
- Swap x and y, then solve for y.
- Even function
- f(−x) = f(x)
- Examples: x², |x|, constant.
- Odd function
- f(−x) = −f(x)
- Examples: x, x³. If 0 is in the domain, an odd function has f(0) = 0.
- Counting functions
- If A has m elements and B has n elements: total functions = nᵐ; one-one functions = n(n−1)…(n−m+1), needs n ≥ m; bijections (m = n) = n!
- Useful for quick MCQs on the number of functions.
- Even and odd combinations
- even ± even = even; odd ± odd = odd; even × even = even; odd × odd = even; even × odd = odd
- Use these to classify a function without calculation.
How to solve Functions and Their Types questions
Use this order for almost any question on functions.
- 1Read what is asked: domain, range, type, composite value, or inverse.
- 2For domain, list every restriction (denominator, even root, log) and keep only x values that satisfy all of them.
- 3To test one-one, assume f(a) = f(b) and see if a = b is forced, or try two inputs that might clash.
- 4To test onto, compare the range with the stated codomain. Solve y = f(x) for x and check which y values give a valid x.
- 5For composite functions, evaluate the inner function first and put its result into the outer one. Check the order carefully.
- 6For inverse, write y = f(x), solve for x in terms of y, then swap the letters. Confirm that f is one-one and onto first.
- 7For even or odd, compute f(−x) and compare with f(x) and −f(x).
- 8Check that your answer respects the domain and that the option matches the exact wording.
Quickest way: Plug in numbers and eliminate options
When to use it: Use this for MCQs on composite, inverse, even or odd functions, and domain questions with options.
- For even or odd, test one pair like x = 1 and x = −1 (and x = 2 if needed). If f(1) = f(−1) it may be even; if f(−1) = −f(1) it may be odd. If neither holds, it is neither.
- For a composite value, skip finding the formula. Compute the inner value, then the outer value.
- For f⁻¹(k), do not find the full inverse. Solve f(x) = k directly. The x you get is the answer.
- For domain, test the boundary values from the options in the original expression. Zero under a root is allowed; zero in a denominator is not.
- For counting, use nᵐ for all functions and nPm for one-one functions.
- If a question needs long algebra and you cannot see the route in 30 seconds, mark it and move on. Each wrong answer costs 0.25 marks.
Common mistakes in Functions and Their Types
Reversing the order in a composite function, computing f(g(x)) as g(f(x)).
The notation f∘g is read left to right, but g is applied first.
Fix: Always say 'inner first'. In f(g(x)), g sits inside the bracket, so it is done first.
Writing f⁻¹(x) = 1 ÷ f(x).
The −1 looks like a power, as in x⁻¹.
Fix: f⁻¹ means the inverse function. Swap x and y and solve. Check with f(f⁻¹(x)) = x.
Confusing range with codomain and calling a function onto without checking.
Students assume every listed output set is fully used.
Fix: Find the actual range by solving y = f(x), then compare it with the given codomain.
Calling f(x) = x² one-one on all real numbers.
Students test only positive values.
Fix: Check f(2) = f(−2) = 4. This shows it is many-one. It is one-one only if the domain is restricted to non-negative numbers.
Saying every function is either even or odd.
Students over-generalise from x² and x³.
Fix: Compute f(−x). For f(x) = x² + x, f(−x) = x² − x, which equals neither f(x) nor −f(x), so it is neither.
Excluding the value that makes a root zero, or including the value that makes a denominator zero.
Both conditions are applied with the same inequality sign.
Fix: For √(expression) use ≥ 0. For a denominator use ≠ 0. For a log argument use > 0.
Worked examples
Example 1
The domain of f(x) = √(x − 2) ÷ (x − 5) is: (a) x ≥ 2 (b) x > 2, x ≠ 5 (c) x ≥ 2, x ≠ 5 (d) all real numbers except 5
Show the solution
- Root condition: x − 2 ≥ 0, so x ≥ 2. At x = 2 the root is 0, which is allowed.
- Denominator condition: x − 5 ≠ 0, so x ≠ 5.
- Combine both: x ≥ 2 and x ≠ 5.
- Option (a) allows x = 5. Option (b) wrongly drops x = 2. Option (d) allows x < 2, where the root is undefined.
Answer: (c) x ≥ 2, x ≠ 5
Example 2
If f(x) = 2x + 3 and g(x) = x² − 1, then (f∘g)(3) equals: (a) 19 (b) 80 (c) 17 (d) 24
Show the solution
- (f∘g)(3) = f(g(3)). Do g first.
- g(3) = 3² − 1 = 9 − 1 = 8.
- f(8) = 2 × 8 + 3 = 19.
- Check the trap: (g∘f)(3) = g(9) = 81 − 1 = 80, which is option (b) and is wrong here.
Answer: (a) 19
Example 3
If f(x) = 3x + 5 is a function from the real numbers to the real numbers, then f⁻¹(14) equals: (a) 3 (b) 19 (c) 9 (d) 1/3
Show the solution
- f is linear with non-zero slope, so it is one-one and onto, and the inverse exists.
- f⁻¹(14) is the x for which f(x) = 14.
- Solve 3x + 5 = 14, so 3x = 9 and x = 3.
- Check with the formula: f⁻¹(x) = (x − 5) ÷ 3, so f⁻¹(14) = 9 ÷ 3 = 3.
- Option (b) is f(14) − ... not needed; 19 comes from 14 + 5, and 1/3 from using 1 ÷ f, both wrong.
Answer: (a) 3
Exam tips
- Questions are mostly direct: domain, composite value, inverse value, even/odd, or counting functions. Practise each type until it takes under a minute.
- Always test options with simple values like 0, 1 and −1 before doing algebra.
- Read the codomain carefully in onto and into questions. The answer can change with it.
- In composite questions, check the order in the wording. Examiners often include the reversed result as a wrong option.
- If the domain has both a root and a denominator, apply both conditions. Missing one is the most common loss of marks.
Practice questions from Sets, Relations and Functions, Limits and Continuity
- Let f(x) = 2x + 3 and g(x) = x². What is the value of (g∘f)(2), that is g(f(2))?
- Consider the function f(x) = (x² - 9)/(x - 3) for x ≠ 3. What is the limit of f(x) as x approaches 3?
- A relation R is defined on the set of natural numbers as R = {(x, y) : x divides y}. Which of the following ordered pairs does NOT belong to…
- The domain of the real function f(x) = (2x − 3)/(x² − 5x + 6) is:
- Let A = {1, 2, 3} and R = {(1,1), (2,2), (3,3), (1,2), (2,1)} be a relation on A. Which statement about R is correct?
Functions and Their Types: frequently asked questions
What is the difference between one-one and onto functions?
One-one means no two different inputs share an output. Onto means every element of the codomain is an output of some input. A function can be one of them without the other. For example, f(x) = 2x from natural numbers to natural numbers is one-one but not onto.
How do I find the domain and range of a function?
For the domain, list restrictions: denominators not zero, expressions under even roots at least zero, log arguments positive. For the range, write y = f(x), solve for x in terms of y, and find which y values give a valid x.
When does an inverse function exist?
An inverse exists only when the function is both one-one and onto (bijective). To find it, write y = f(x), solve for x, then swap x and y. Check that f(f⁻¹(x)) = x.
Is f∘g the same as g∘f?
No, not in general. f∘g applies g first and f second, while g∘f does the opposite. Compute both for a simple number to see the difference.
How many functions are possible from a set with m elements to a set with n elements?
There are nᵐ functions in total, because each of the m inputs has n choices. If n ≥ m, the number of one-one functions is n(n−1)…(n−m+1). For example, from a 3-element set to a 4-element set there are 64 functions and 24 one-one functions.