Surjective function · Exercise-SURJECTIVE-FUNCTION-005

Step-by-step solved exercise: Relations and functions

Let \(\displaystyle f\colon\{1,2,3\}\to\{a,b\}\). Can \(\displaystyle f\) be surjective?

Step by step with comments, a check and common mistakes.

Step-by-step solution

  1. To be surjective, \(\displaystyle f\) must take both the value \(\displaystyle a\) and the value \(\displaystyle b\).

    \[\displaystyle \{f(1),f(2),f(3)\}\supseteq\{a,b\}\]
  2. It suffices to assign the value \(\displaystyle a\) to one input and the value \(\displaystyle b\) to another.

    \[\displaystyle f(1)=a,\quad f(2)=b\]
  3. The third input can take either value without affecting surjectivity.

    \[\displaystyle f(3)=b\]
  4. So the image is \(\displaystyle \{a,b\}\), equal to the codomain, and \(\displaystyle f\) is surjective.

    \[\displaystyle f(\{1,2,3\})=\{a,b\}\]

Answer

Yes, for example with \(\displaystyle f(1)=a\), \(\displaystyle f(2)=b\), \(\displaystyle f(3)=b\)

🎯 Build my path to this exercise