Is a continuous map between two topological groups homotopic to a homomorphism between them? Let $G$ and $H$ be two topological groups and $f:G\to H$ be a continuous map. 
Is there a continuous homomorphism $g:G\to H$ homotopic to $f$?
 A: Neat question!
With suitable hypotheses, this question has an affirmative answer. Here is one such answer:

Let $G$ be a compact connected topological group, and let $H$ be a
locally compact abelian topological group. Then every continuous
function $f \colon G \to H$ sending the identity of $G$ to the
identity of $H$ is homotopic to exactly one continuous
homomorphism. Moreover, the homotopy can be chosen to preserve the
identity.

The above statement is Corollary 2 of the following paper of Wladimiro Scheffer:
Maps between topological groups that are homotopic to homomorphisms. Proc. Amer. Math. Soc. 33 (1972), 562-567.
https://doi.org/10.1090/S0002-9939-1972-0301130-8
I'm not sure what other answers to this question might look like (i.e. with different hypotheses on $G$ and $H$), but it's an interesting question.
For example, one cannot drop the assumption that $H$ is abelian, for the homomorphism
$$e^{i\theta} \mapsto \begin{pmatrix}e^{i\theta}&0\\0&e^{-i\theta}\end{pmatrix}$$
from $S^1$ to $SU(2)$ is at once non-trivial and homotopic (relative to the identity) to the trivial homomorphism since $SU(2) \cong S^3$ is simply connected.
See also:

*

*Bogatyi, Semeon Antonovich, and Olga Dmitrievna Frolkina. "On commutativity of connected groups." Sbornik: Mathematics 197.1 (2006).

*Rezk, Charles. "Classifying spaces for 1–truncated compact Lie groups." Algebraic & geometric topology 18.1 (2018): 525-546.

*https://mathoverflow.net/questions/334473/when-does-bg-to-ba-loop-to-a-homomorphism
A: Of course not.
If $G,H$ are discrete then this statement is equivalent to whether every function $f:G\rightarrow H$ is a homomorphism.
Clearly every function $f:G\rightarrow H$ is continuous (because $G$ is discrete).
Moreover if $T:[0,1]\times G \rightarrow H$ is continuous such that $T(0,g) = f(g)$ and $T(1,g) = f'(g)$ then the map $a\mapsto T(a,g)$ is continuous from $[0,1]$ to $H$. As $[0,1]$ is connected and $H$ is discrete this map is necessarily constant and so we must have that $f(g)=f'(g)$ (for every $g\in G$). That means that $f$ is only homotopic to itself!
Thus you can take any two groups, $G,H$ with discrete topology, and any map $f:G\rightarrow H$ that is not a homomorphism. You will get a counter-example.
