Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Statement: the greatest integer function int: $\mathbb{R} \rightarrow \mathbb{Z}$ is onto but not $1-1$

Proof: let $x \in \mathbb{R}$, then $int(x) \leq x$ and is an element of $\mathbb{Z}$. Since $\mathbb{Z}$ is an element of $\mathbb{R}$, the greatest integer function maps onto $\mathbb{Z}$. However, it is not one-to-one, because $int(0.2)=int(0.3)=0$

Is my proof valid?

share|cite|improve this question
To be more precisely, what real number has integer part equal to $k\in \mathbb{Z}$? It is easy to answer this. So the map is onto. Also, it is clear that it is not injective. – Sigur Nov 15 '13 at 17:31
To inform, this is the floor function $\lfloor \rfloor$. – Sigur Nov 15 '13 at 17:33
@Adrian : you didn't show the function is onto. Please see Sigur's comment. By the way, $\lfloor x \rfloor$ is typed "\lfloor x \rfloor". – Stefan Smith Nov 16 '13 at 2:36
up vote -1 down vote accepted

Yes, your reasoning is correct, but you should say $\Bbb Z$ is a subset of $\Bbb R$. The element relation does not hold between $\Bbb Z$ and $\Bbb R$. (Some students confuse containment and membership early on.)

It looks like you are using the fact that integers map to themselves to demonstrate the map is onto, and that's good. However, it might strengthen what you wrote if you stated that a little more explicitly.

(Incidentally, the question should also be more like "determine if this function is 1-1 and/or onto," but I can tell that's really what you were interested in because of your solution.) (Obsolete due to intervening edits.)

share|cite|improve this answer
Dear downvoter: I encourage you to reread what downvotes are appropriately used for. Regards. – rschwieb Nov 15 '13 at 17:35
@rshwieb : I don't think the OP ever proved that the floor function was onto (I did not downvote your answer). He accepted your answer so maybe he believes he did (?). Maybe there is a big typo in the OP's question? – Stefan Smith Nov 16 '13 at 2:35
@StefanSmith Yeah, the OP did not spell out everything completely. I thought it was obvious that the OP recognized that the integers mapped to themselves, and was the whole reason s/he included the comment "since Z is a [subset] of R it is onto" :S – rschwieb Nov 16 '13 at 13:47

You'd want to more clearly show how given $x \in \mathbb{Z}$ you could find a real number $r \in \mathbb{R}$ such that $\text{int}(r)=x$. Then you have onto. As for $1:1$, you have shown that it cannot be $1:1$. Note that a function that can be plotted in $\mathbb{R}^2$ can only be $1:1$ if every horizontal line drawn in the plane intersects the graph at most one point--clearly not the case here.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.