# Homework - $f(n)=n(n+1)$ - calculate $f^{-1}(\mathbb{N})$

i have the following function: $$f:\mathbb{Z}\rightarrow\mathbb{Z}$$ , $$f(n)=n(n+1)$$

Calculate: $$f^{-1}({1})$$, $$f^{-1}({2})$$, $$f^{-1}(\mathbb{{N}})$$ (Natural numbers)

for the first one i got the empty set, for the second one I got the solution $$\{-2,1\}$$.

However for the last one I couldn't really find a solution. If i put in an even number, the result is also even. If i put in an uneven number, I also get an even result. Therefore not every natural number is in the solution.

Where am I making a mistake here?

edit: can't really make it format right. my bad! but its supposed to be the set that contains all natural numbers, not only natural numbers

• Hint: For $n\in \mathbb{Z}$, can $n(n+1)$ be negative? – Jason DeVito Sep 21 '20 at 15:07
• oh you're right. n(n+1) is positive for all integers except 0 – 23408924 Sep 21 '20 at 15:17
• And $-1{}{}{}{}$ – Kenta S Sep 21 '20 at 15:30

Think like this: $$f^{-1}(\mathbb{N}) = \bigcup_{a\in\mathbb{N}} f^{-1}{(a)}$$

then:

• $$f^{-1}(1)=\emptyset$$
• $$f^{-1}(2)=\{-2,1\}$$
• $$f^{-1}(3)=\emptyset$$
• $$f^{-1}(4)=\emptyset$$
• $$f^{-1}(5)=\emptyset$$
• $$f^{-1}(6)=\{-3,2\}$$
• $$f^{-1}(1)=\emptyset$$
• $$\vdots$$
• $$f^{-1}(12)=\{-4,3\}$$
• $$\vdots$$

As you can see, most of the values will be empty, but numbers of the form $$(n)(n+1)$$ are non empty, and their values will give you the whole list of $$\mathbb{Z}$$ except for $$\{-1,0\}$$.

• Thanks! so basically the solution is the set of numbers that can be written in the form of n(n+1). – 23408924 Sep 21 '20 at 18:50
• @23408924 No!, the solution is all $\mathbb{Z}$ except for $-1$ and $0$. Remember that you were asked by inverse map $f^{-1}$, so you need all the numbers $n$, for which $n(n+1)$ is a natural number – Luis Felipe Sep 21 '20 at 18:55
• oh yeah you're right I misunderstood. I think i need to reread some stuff. thank you very much! – 23408924 Sep 21 '20 at 18:56
• Small correction: here, $f^{-1}$ is not the inverse map, but the inverse image (or preimage). It makes a difference, since $f$ is not bijective and hence an inverse map does not exist. In particular, the preimage $f^{-1}$ expects sets as an argument, and not elements of $\mathbb Z$ (or $\mathbb N$). – Marktmeister Sep 22 '20 at 5:59
• @Marktmeister you are right, sorry for my vas english i will correct – Luis Felipe Sep 22 '20 at 9:43

Make a plot of the function $$f:\quad{\mathbb Z}\to{\mathbb Z}\qquad n\mapsto n(n+1)\ .$$ This plot consists of isolated points in the $$(x,y)$$-plane. Then determine the set $$S\subset{\mathbb Z}$$ of all $$n\in{\mathbb Z}$$ satisfying $$f(n)\in{\mathbb N}$$, i.e., $$f(n)$$ integer and $$\geq1$$.