Determine if the following composition function is onto Define $f: \Bbb{Z}\times\Bbb{Z} \to \Bbb{Z}\times\Bbb{Z}$
and
$g: \Bbb{Z}\times\Bbb{Z}\to \Bbb{Z}\times\Bbb{Z}$
by:
$$f((a,b))=(a+b,2a)$$
$$g((c,d))=(c+2d,c)$$
Determine if $g \circ f$ is onto.
I figured out part one of this where it asks to determine if this function is one-to-one. So assume $(g \circ f)$$(a,b)$=$(g \circ f)$$(c,d)$, do some careful manipulation and back-substitution and in fact $a=c$, and $b=d$ so then $(a,b)=(c,d)$. 
The follow up: how do I go about showing onto?  
I had a different question that was just one polynomial function (just by itself and no $g$-function) where it made sense that for onto:
Every element of the codomain ($B$ let's call it) is the image ("mapping") of some element of (say $A$).  So, as I've come to understand this, we want to show that nothing in the co-domain is left "without a partner" from the domain.  Anyhow, I'm confused as to what I'll need to do this time where it's set up like this with cartesian-type mappings.  Any help greatly appreciated.  Thanks!
 A: First, what is $g\circ f$? It is the function $$(a,b) \mapsto (5a+b,a+b).$$ Now is that onto? Take an arbitrary $(c,d)\in \Bbb Z \times \Bbb Z$. We must solve $c=5a+b$ and $d=a+b$. So $$b=d-a,\ \ \ \ c=5a+d-a=4a+d$$ and thus $c-d=4a$.
Since $(c,d)$ was arbitrary, there is no reason why $c-d$ should be divisible by $4$. So $g\circ f$ is not surjective.
A: It seems you probably have not had a linear algebra course; it would have made this problem much easier.
The matrix that expresses $f$ is
$$
F =
\left(
\begin{array}{cc}
1 & 1 \\
2 & 0
\end{array}
\right)
$$
The matrix that expresses $g$ is
$$
G =
\left(
\begin{array}{cc}
1 & 2 \\
1 & 0
\end{array}
\right)
$$
The matrix that expresses $g\circ f$ is
$$
GF =
\left(
\begin{array}{cc}
1 & 2 \\
1 & 0
\end{array}
\right)
\left(
\begin{array}{cc}
1 & 1 \\
2 & 0
\end{array}
\right) =
\left(
\begin{array}{cc}
5 & 1 \\
1 & 1
\end{array}
\right)
$$
Now, both $F,G$ have determinant $-2,$ so $GF$ has determinant $4.$ It is only possible for a linear map taking an integer lattice to itself that has determinant $\pm 1$ to be surjective. All three matrices (and maps) discussed fail this. $f$ takes integer vectors to vectors with second coordinate even. $g$ takes integer vectors to vectors with first and second coordinates having the same parity. Finally, $gf$ takes integer vectors to vectors with first and second coordinates equivalent modulo 4.
Put another way,
$$
(GF)^{-1} =
\left(
\begin{array}{rr}
\frac{1}{4} & -\frac{1}{4} \\
-\frac{1}{4} &  \frac{5}{4}
\end{array}
\right)
$$
takes some points of the lattice to points not of the lattice, having rational entries.
