1

this was a true and false question which I mistakenly thought was false.

My reasoning was thus:

Let the function $f: \mathbb{R} \rightarrow \mathbb{Z}$ be injective. It follows that for every element $x \in \mathbb{R}$, there exists a unique $y \in \mathbb{Z}$ such that $f(x)=y$. But this would imply that $|\mathbb{R}| \leq |\mathbb{Z}|$, which is contradiction since $|\mathbb{R}|$ is uncountable and $|\mathbb{Z}|$. Therefore there is no function $f: \mathbb{R} \rightarrow \mathbb{Z}$ such that $f$ is injective.

Could someone tell me where I went wrong?

  • 3
    Well, there doesn't exist an injective function from $\mathbb{R}$ to $\mathbb{Z}$, for the reasons you said. You should take this up with the grader. – Duncan Ramage Dec 13 '21 at 16:38
  • 2
    Nowhere...You are perfectly right. – GreginGre Dec 13 '21 at 16:38
  • 1
    Can you repeat the question exactly? "Construct a function ...." is not a true/false question. – preferred_anon Dec 13 '21 at 16:41
  • From How to ask a good question: Your question should be clear without the title. After the title has drawn someone's attention to the question by giving a good description, its purpose is done. The title is not the first sentence of your question, so make sure that the question body does not rely on specific information in the title. – jjagmath Dec 13 '21 at 17:05

1 Answers1

1

You have the sides wrong. Saying that $f\colon A\to B$ is a function means that there is a single $b\in B$ such that $(a,b)\in f$ (because $f$ is a subset of $A\times B$; such unique element is denoted by $f(a)$).

The function is injective if, for every $b\in B$ there exists at most one element $a\in A$ such that $f(a)=b$. (Note that is quite different from what you're saying.)

There are infinitely many functions $\mathbb{R}\to\mathbb{Z}$, but none of them is injective. Indeed, as you observe, this would imply that $|\mathbb{R}|\le|\mathbb{Z}|$, so $|\mathbb{R}|=|\mathbb{Z}|$, against the well known fact that $\mathbb{R}$ is not countable.

egreg
  • 238,574
  • Well, we know that every element of $\mathbb{R}$ must have an image—an element $b \in \mathbb{Z}$, so are the two statements not logically equivalent? If you take an arbitrary set, $g: T \rightarrow Z$, since every element of $T$ has an image, and no two images are the same, does it not follow that for every $x \in T$ there exists a unique $y \in Z$ and that this is the same as stating that for every $y \in Z$ there is at most one element $x \in T$ such that $g(x) = y$? – Frank Nakasako Dec 13 '21 at 17:12
  • @BenjaminSakamoto No, they aren't. The function $f\colon\mathbb{Z}\to\mathbb{Z}$ defined by $f(x)=x^2$ certainly satisfies the condition you stated. But it's not injective, is it? You're confusing the definition of function with the injectivity condition. They're different things. – egreg Dec 13 '21 at 17:48
  • 1
    @BenjaminSakamoto I don't think you're confusing the definition of function with injectivity, instead I think the point egreg is making, is that you're using "unique" incorrectly. The statement "for every $x$ there is a unique $y$ such that $f(x)=y$", means that there exists no $y'\neq y$ such that $f(x)=y'$. You seem to believe that the uniqueness refers to $x$ instead; you want to say that there exists no $x'\neq x$ such that $f(x')=y$. However, the latter must be worded differently than you've done in your question. – Vsotvep Dec 13 '21 at 18:51