Characterization of a Subgroup via a Homomorphic Inclusion I have encountered the following definition of a subgroup $H$ of a group $G$: A subset $H$ of a group $G$ is a subgroup of $G$ provided the inclusion $i_H :H \longrightarrow G$ is a homomorphism. I am trying to show that this characterization is equivalent to the "usual" definition that declares a subset of a group is a subgroup if it is itself a group. 
So, suppose the inclusion is a homomorphism. The first thing I want to show is that
$H$ is stable under the group operation. This seems pretty straightforward: If $x,y \in H$ we have
$$
i_H(x)i_H(y) = i_H(xy) = xy \in \text{Im}(i_H) \implies xy \in H
$$
The first equality follows from the hypothesis that $i_H$ is a homomorphism and the second follows from the definition of the inclusion map and, finally, the last conclusion follows from the fact that $\text{Im}(i_H) = H$. So far so good, I believe.
I'm stuck though when trying to show that $H$ contains the identity element. Now, any homomorphism $\varphi$ from a group $E$ to another group $F$ will carry the group identity $e_E \in E$ to the group identity $e_F \in F$, i.e., $\phi(e_E) = e_F$. Would I be correct in saying that since $i_H$ is a homomorphism then $e_G$ must me in the image of $i_H$ and therefore must be in $H$? 
This doesn't seem quite right to me because this more-or-less assumes that $e_G$ is in the domain of $i_H$ to begin with. But, this raises a second question in that what, precisely, does it mean for any function to be a homomorphism between a subset and a group?
 A: I believe that the following formulation of the result of your question is mathematically correct and can be proven:
Theorem Let $G$ be a group and let $H$ be a subset of $G$. Let us assume that $H$ is a group (although we do not necessarily assume that the group structure of $H$ is inherited from $G$). If the inclusion map $i:H\to G$ is a group homomorphism, then $H$ is a subgroup of $G$, i.e., the group structure of $H$ is inherited from $G$.
Proof. Let us denote the group operation of $H$ by $\cdot$ and the group operation of $G$ by $\ast$. If the inclusion map $i:H\to G$ is a group homomorphism, then $i(x)\ast i(y) = i(x\cdot y)$ for all $x,y\in H$. In other words, the restriction of the function $\ast:G\times G\to G$ to $H\times H$ is the function $\cdot:H\times H\to H$. Therefore, $H$ is a subgroup of $G$. Q.E.D.
The converse of the theorem above is also true. I leave the formulation of the converse and its proof as a simple exercise. (Hint: In a sense, you simply need to "reverse all the implications" in the argument above.)
In some sense, the main difficulty present here is the correct formulation of the result you are trying to prove; once you have written down a correct formulation of what you wish to prove, then the proof is nothing more than a triviality.
I hope this helps!
