[Math] is this “function” a surjective, but not injective function

functions

enter image description here

this would be something like

$f(x)=x$ for $x\leq1$

$f(x)=x-1$ for $x>1$

Would this fullfill "give an example for a surjective but not injective function $f: \mathbb{N} \rightarrow\mathbb{N}$ "?

Best Answer

Yes, but dont plot a line for a map from $\mathbb{N}$ onto $\mathbb{N}$, that is misleading on the first glance :-) (better plot points to stress the discreteness of $\mathbb{N}$)