Is the given map $\phi$ onto between binary structures? 
Is the given map $\phi$ onto between binary structures?
  $$
\langle \mathbb{Z}, +\rangle 
\textrm{ with } 
\langle \mathbb{Z}, +\rangle
\textrm{ where } \phi(n) = 2n \textrm{ for } n\in\mathbb{Z}
$$

My textbook does not define the definition of "onto", so I have taken it from Wikipedia:

A function f from a set X to a set Y is surjective (or onto), if for every element y in the codomain Y of f there is at lest one element x in the domain X of f such that f(x) = y.

Informally, I interpret onto as follows:

Onto means that for every element in the second binary structure, there is at least one mapping to an element in the first binary structure.

Given $\phi(n) = 2n$, then for every $2n$ element, there is an element $n$ multiplied by $2$ that will become an even element. 
I thought that $\phi$ is onto because for all $n \in \mathbb{Z}$, $\phi(2n) = 2(2n) = 4n$, where $4n$ is an element of $\mathbb{Z}$.
However, my professor says that "the function is not onto since the range is the set of all even numbers which is not equal to the co-domain Z". 
I am just confused with how I am interpreting what $\phi$ does and what my professors response is and am hoping to get some other opinions so that I can get a better understanding before talking more about it with her.
 A: You are almost correct in your informal interpretation of what "onto" means -- you are just one word off. The correct interpretation would be:

Onto means that for every element in the second binary structure, there is at least one mapping from an element in the first binary structure.

To check this, we start from an element of the second binary structure -- in this case, $\mathbb{Z}$. We do not start with an element of the form $2n$, as you did -- that would be starting from $n$ and getting $\phi(n) = 2n$. Rather, we just want to start with an arbitrary element of the second binary structure, say, $m \in \mathbb{Z}$. It could be even or odd.
Then, the map $\phi$ is onto if there is at least one mapping from an element in the first structure to $m$. But elements in the first structure map only to even numbers. For any $n$ that is an element of the first structure, it maps to $2n$. If $m$ is odd, then there is no mapping from an element of the first structure. For this reason, the map $\phi$ is not onto.
A: A function $f: X \rightarrow Y$ is onto if $\forall y \in Y$ $\exists$ x $\in$ X : $f(x)=y$. This is equivalent to saying that the image of the function is equal to the codomain. (Think about it, every element in the codomain must be hit by atleast one element in the domain, this means that the set of all elements that have been sent to the codomain must be equal to the codomain, this is what it means to be surjective). Hence using the definition of surjectivity that I have used in the first line, for 3 $\in codomain(f)$ you cannot find an element in the domain that is sent by an element from the domain (because the mapping only sends an integer to an even integer), therefore it is not surjective.
