${\mathbb Q}$ as a direct product. Motivation + Problem: While doing some exercises in Aluffi's Algebra: Chapter 0, I came across a problem which asks the reader to prove that ${\mathbb Q}$ is not the product of two nontrivial groups.  This is the standard product in the category of groups.
My Question: Since the chapter delves into categorical arguments, I tried it this way.  We suppose not, that ${\mathbb Q} \cong G\times H$ and note that for any group $Z$ and any appropriate mappings $f,g$, we have the following diagram (sorry for the awkward TeXing, xypic doesn't seem to work here...),
$\displaystyle \begin{array}{ccccc} & & Z & & \\ & ^{f}\swarrow & \downarrow&_{\exists!\langle f,g\rangle} \searrow^{g} & \\  & G\longleftarrow_{\pi_{1}} & {\mathbb Q} & _{\pi_{2}}\longrightarrow H &\end{array}$
So, we find that there is always a unique mapping in the center if this is a product.  The projections either inject an isomorphic copy of ${\mathbb Q}$ or are the zero mapping.  We'd like to show that either $G$ or $H$ is trivial.  I'm not sure how to show that at least one must be trivial. 
My Attempt: Suppose $G \neq \{0\}$.  We need to show $H = \{0\}$.  Letting $Z = G$ and let $f = id$, we find that $G \cong {\mathbb Q}$.  Moreover, the unique map in the center must be some multiplication mapping (which takes $x\mapsto qx$ for rational $q$; this is because $\pi_{1}$ must be a multiplication mapping if it is not the zero mapping).  My guess here is that if $H$ is not trivial, it must also be an isomorphic copy of ${\mathbb Q}$ and we can allow $g$ to be some multiplication map like above such that the unique center mapping does not allow the right-hand triangle to commute.  
Does this sort of argument work?
 A: If $\mathbb Q$ was isomorphic to $G\times H$ then $G$ and $H$ must be abelian and so $\mathbb Q$ would be a product $\mathbb Q \cong G\prod H$ in the category $Ab$, and as in $Ab$ finite products and coproducts agree, $\mathbb Q \cong G\coprod H$ holds as well. Let $i:G\to \mathbb Q$ and $j:H\to \mathbb Q$ be the canonical injections. In $Ab$ the canonical injections are monos and monos are injective functions. So, $G$ and $H$ are canonically subobjects of $\mathbb Q$. Now, the special property of $\mathbb Q$ is that the intersection of any two non-trivial subobjects in it have a non-trivial intersection (with $\mathbb Z$). However, in $Ab$ the canonical injections $G\to G\coprod H$ and $H\to G\coprod H$ intersect at the $0$ object, contradiction. 
This is about as categorically as I could furnish the proof, I hope you like it. 
A: Here's an attempt at a proof that is similar to Ittay Weiss':
In the category of abelian groups, saying that $\mathbb{Q}$ is a product is equivalent to saying that there exists $p : \mathbb{Q} \to \mathbb{Q}$, with $p^2 = p$. (For one direction: $\mathbb{Q} = \mathrm{ker} p \oplus \mathrm{im} p$)
$p(1) = \frac{n}{m}$ for some $n,m \in \mathbb{Z}, m \neq 0$.
$\frac{n}{m} = p(1) = p(p(1)) = p(\frac{n}{m}) = n p(\frac{1}{m})$
If $n=0$ then you can see that $p = 0$.
If $n \neq 0$ then $\frac{1}{m} = p(\frac{1}{m})$ so $p(1) = 1$
In this case $p$ must be $\mathrm{id}_\mathbb{Q}$.
A: This is my attempt at guessing what you're looking for. I still don't think it is a good thing to do. No new ideas can come out of this. The proof just looks unnecessarily hard to read. (There are facts used here are specific to the category of groups that I simply assume without mentioning.)
According to you diagram, suppose $\iota: G \to \mathbb Q$ is injective, i.e., $G$ is a subobject of $\mathbb Q$.
Define $\tilde\pi_1 = \iota \circ \pi_1: \mathbb Q \to \mathbb Q$. For any integers $a, b$ with $b \ne 0$, 
$$\tilde\pi_1(\frac ab) = \frac 1bb \tilde\pi_1(\frac ab) = \frac 1b \tilde\pi_1(b \frac ab) = \frac 1b \tilde\pi_1(a) = \frac ab \tilde\pi_1(1).$$
This means $\tilde\pi_1$ is simply multiplication by $\tilde\pi_1(1)$.
If $\tilde\pi_1(1) = 0$, then $\tilde\pi_1 = 0$, and since $\iota$ is injective, we must have $\pi_1 = 0$.
This forces $G$ to be the zero object (because for any choice of $Z$, $f:Z \to G$ must be a zero morphism because it factors through $\pi_1$).
Otherwise $\tilde\pi_1(1) \ne 0$. From the equations above, $\tilde\pi_1$ is surjective. (Given $q \in \mathbb Q$, pick $p = q / \tilde\pi_1(1)$. Then $\tilde\pi_1(p) = q$.) It is also injective because $\tilde\pi_1(q) = 0$ implies $q = 0$.
So $\tilde\pi_1$ is an isomorphism $\Rightarrow$ $\iota$ is surjective and $\pi_1$ is injective $\Rightarrow$ $\iota$ is an isomorphism $\Rightarrow$ $\pi_1$ is an isomorphism.
