[Math] Onto Functions and Integers

functionsintegers

The function $f: ℝ → ℝ$ defined by $f(x) = x^{3}$ is onto because for any real number $r$, we have that $\sqrt[3]r$ is a real number and $f(\sqrt[3]r)=r$. Consider the same function defined on the integers $g: ℤ → ℤ$ by $g(n) = n^3.$ Explain why $g$ is not onto $ℤ$ and give one integer that $g$ cannot output.

I can't think of any integer that cannot be cubed, so this problem has me confused.

Best Answer

The problem is not that we can't cube some integer, its that not every integer has an integer cube root. Consider $5\in\mathbb{Z}.$ To say that $5$ is in the image of $g$ is to say that $5^{1/3}\in \mathbb{Z}.$ As we know, $5^{1/3}\approx1.71\not\in \mathbb{Z}$.