JEE Main 2026 · 4 April · morning · Single correct · +4 / −1

The number of functions f:{1,2,3,4}→ {a,b,c}, which are not onto, is :

  1. (a) 48
  2. (b) 45
  3. (c) 51
  4. (d) 35
Answer and solution

Answer (b) 45

Solution

Maths sir · 4 steps

Count all functions, count the onto ones, and subtract. The not-onto ones are what is left.

  1. All functions. Each of the 4 inputs can go to any of the 3 outputs. So the total number of functions is 3⁴ = 81.
  2. Not onto means. A function is not onto when at least one of a, b, c is never hit. Count these with inclusion-exclusion.

    C(3, 1) × 2⁴ₘᵢₛₛₒₙₑₗₑₜₜₑᵣ - C(3, 2) × 1⁴_(miss two letters) = 48 - 3 = 45

  3. Why subtract 3. A constant function like f ≡ a misses both b and c. It gets counted once under "miss b" and once under "miss c". There are 3 such functions, so 3 is removed to count each one only once.
  4. So. There are 45 functions that are not onto. As a check, the onto ones number 81 - 45 = 36, which matches 3! × 6 = 36.

The idea to keep. For "not onto", count functions that miss at least one output using inclusion-exclusion. Always check the overlap where two outputs are missed at once, or you will double count.

Answer from the NTA final answer key. Solution by PrepWiser.

Study Relations & Functions (Basic)

Asked about 140 times in JEE Main since 2020. This question is from 2026.