Question:

Let $A$ and $B$ be two sets having $m$ and $n$ elements respectively, then total number of functions from $A$ to $B$ are

Show Hint

Always remember the structure: $\text{Total Functions} = (\text{Size of Codomain})^{(\text{Size of Domain})}$.
Here, codomain $B$ has $n$ elements and domain $A$ has $m$ elements, so the answer is $n^m$.
Updated On: Jul 29, 2026
  • $m^n$
  • $n^m$
  • $m$
  • $n$
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Concept
A function $f: A \to B$ is a rule that assigns to each element $x$ in the domain $A$ exactly one element $y$ in the codomain $B$.

Step 2: Key Formulas and Approach

To form a well-defined function $f: A \to B$, every element $a \in A$ must be mapped to an element $b \in B$.
If $|A| = m$ and $|B| = n$: - For the first element $a_1 \in A$, there are $n$ available choices in $B$. - For the second element $a_2 \in A$, there are $n$ available choices in $B$. - Continuing this process for all $m$ elements of $A$, the total number of functions is obtained by the Fundamental Counting Principle.

Step 3: Step-by-step Explanation


• Let $A = \{a_1, a_2, \dots, a_m\}$ and $B = \{b_1, b_2, \dots, b_n\}$.

• Assigning an image $f(a_1)$ can be done in $n$ ways.

• Assigning an image $f(a_2)$ can be done independently in $n$ ways.

• Repeating this independent choice for each of the $m$ distinct domain elements: \[ \text{Total functions} = \underbrace{n \times n \times n \times \dots \times n}_{m \text{ times}} = n^m \]
• Hence, the number of functions from domain $A$ to codomain $B$ is $|B|^{|A|} = n^m$.

Step 4: Final Answer

The total number of functions from a set of $m$ elements to a set of $n$ elements is $n^m$. Thus, Option (B) is correct.
Was this answer helpful?
0
0