If we define a function $\phi : D_{2n} \rightarrow D_n \times Z_2$ for odd $n$ and we want to show that it is an isomorphic function, I am not very sure how to do it. We know that $D_{2n} = \{e, r, \ldots, r^{2n-1}, s, rs,\ldots, r^{2n-1}s\}$ and $D_n = \{e, t, \ldots, t^{n-1}, u, tu, \ldots, t^{n-1}u\}$.
I think that if we define $\phi(r) = (t, 1)$, then we can show that it is a homomorphism by showing that $\phi(r)\phi(r) = (t, 1)(t, 1) = (t^2, 0) = \phi(r^2)$, but I do not know if this is enough already or if I have to do it for all possibilities?!
And then the bijection. I know that it is injective if $\phi(a) = \phi(b) \iff a = b$, but how do I prove it in this particular example? And how do I show that every element of $D_n \times Z_2$ has an element in $D_{2n}$ to prove surjectivity?