Image and preimage · Exercise-IMAGE-AND-PREIMAGE-010

Step-by-step solved exercise: Relations and functions

Let \(\displaystyle f\colon\mathbb{Z}\to\mathbb{Z}\), \(\displaystyle f(n)=n^2\), and \(\displaystyle Y=\{0,1,2,3,4\}\). How many elements does \(\displaystyle f^{-1}(Y)\) have?

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

Step-by-step solution

  1. An integer \(\displaystyle n\) is in the preimage when \(\displaystyle n^2\) belongs to \(\displaystyle Y\).

    \[\displaystyle n\in f^{-1}(Y)\iff n^2\in\{0,1,2,3,4\}\]
  2. The squares of integers that lie in \(\displaystyle Y\) are 0, 1 and 4, because 2 and 3 are not squares.

    \[\displaystyle n^2\in\{0,1,4\}\]
  3. This gives \(\displaystyle n\) equal to 0, \(\displaystyle \pm 1\) or \(\displaystyle \pm 2\).

    \[\displaystyle n\in\{-2,-1,0,1,2\}\]
  4. Therefore, the preimage has five elements.

    \[\displaystyle \lvert f^{-1}(Y)\rvert=5\]

Answer

5

🎯 Build my path to this exercise