Extension of a group homomorphism Let $G$ and $K$ be (possibly non-Abelian) groups and let $\phi:G\rightarrow K$ be a homomorphism. Let $\bar{G}$ be a group containing $G$ as a subgroup.
Is it always possible to extend $\phi$ to a homomorphism $\bar{\phi}:\bar{G}\rightarrow K$ (such that $\bar{\phi}$ restricted to $G$ is $\phi$ itself)? If not what conditions are required for this to be true?
I have seen somewhere that for the Abelian case if $K$ is divisible this is possible but I'm mostly interested in the non-Abelian case.
Is it always possible to extend $\phi$ to a homomorphism $\bar{\phi}:\bar{G}\rightarrow \bar{K}$ where $\bar{K}$ is some group containing $K$ as a subgroup? If not what conditions are required for this to be true?
 A: $A_4$ has a normal subgroup of $4$ elements, hence, a homomorphism onto $C_3$. $A_4$ is a subgroup of $S_4$. $S_4$ has no normal subgroup of order $8$, hence, no homomorphism to $C_3$ extending the one defined on $A_4$. 
A: No. An easy counterexample: consider the dihedral group $D_4 = \langle r,s \mid r^4 = s^2 = 1, \: rs = sr^{-1} \rangle$. Consider a morphism $\chi \colon D_4 \to \mathbb C^*$; then $\chi(s) \in \{\pm 1\}$, while $\chi(r) \in \{\pm 1, \pm i\}$. Set $w = \chi(r)$, $z = \chi(s)$. Then $wz = \chi(rs) = \chi(sr^3) = zw^3$, hence $w^2 = 1$, i.e. $\chi(r) \in \{\pm 1\}$.
Now, consider $H = <r> \subset D_4$ and let $\varphi \colon H \to \mathbb C^*$ be defined by $\varphi(r) := i$. This is well defined, and it cannot be extended.
By the way, this counterexample has the merit that the landing group is $\mathbb C^*$, which is divisible. In an abelian case, every morphism toward $\mathbb C^*$ can be extended, because over a PID divisible implies injective (thanks to Baer's criterion).
A: In finitely generated torsion free nilpotent groups you can extend some homomorphisms to the Malcev completion and consider the restriction to the group which wants the extension. The problem is that this group can be no invariant, so the image is, if no more information, the Malcev completion. Lemma 2.7 in Baumslag's "Lecture notes on nilpotent groups" can be an alternative in f.g. t-f nilpotent.
A: The answer to your first question is "no", even if you assume $G$, $\bar{G}$, and $K$ are all isomorphic!  Take for example $\bar{G} = K = \mathbb{Z}$, $G \subset \bar{G}$ to be the subgroup generated by $\{2\}$, and let $\phi$ map $2 \in \bar{G}$ to $1 \in K$.
If you're allowed to extend $K$, then you can always find $\bar{\phi}$ by the following construction:  Let $A$ be a generating set of $G$, and let $\bar{A}$ be such that the set $A \cup \bar{A}$ generates $\bar{G}$.  Now take an explicit presentation of $\bar{G}$ with this generating set, and call the set of relations $R$.
Next, let $B \subset K$ be such that the set $B \cup \phi(A)$ generates $K$, and take an explicit presentation of $K$ using this generating set.  Call the set of relations $R'$.
To construct $\bar{K}$, we'll form a new presentation.  The generating set will be (symbolically) $A \cup \bar{A} \cup B$, and the relations will be everything in $R'$ (with the symbol $\phi(a)$ replaced by the symbol $a$), together with everything in $R$.  Then $\bar{K}$ clearly contains $K$ as a subgroup (it's the subgroup generated by $A \cup B$).
Let $\bar{\phi}: \bar{G} \rightarrow \bar{K}$ then be the homomorphism defined to take generators in $\bar{G}$ to their counterparts in $\bar{K}$.  This is indeed a homomorphism since relations in $\bar{G}$ are satisfied by their images, and it agrees with $\phi$ on $G$.
