EngineeringRise

The number of onto functions from a set with 5 elements to a set with 3 elements is

Answer: (B) 150 Status: Verified (T1). Checked by code and independent solves on 2026-11-20.

  1. 243
  2. 150
  3. 60
  4. 120

Solution

  1. All functions: 3⁵ = 243.
  2. Functions missing at least one image: 3 x 2⁵ - 3 x 1⁵ + 0 = 96 - 3 = 93 (inclusion-exclusion).
  3. Onto functions = 243 - 93 = 150.

Fast method

Onto functions = 3! x S(5,3) = 6 x 25 = 150, where S(5,3) = 25 counts the ways to split 5 items into 3 non-empty groups.

Expected time: about 130 seconds. Difficulty: medium.

Topic page: Functions: one-one, onto and composition

Test your answers now

Report an error

Think the question, answer or a step is wrong? One tap tells us. We check it and publish the correction.