Expressing the homomorphism condition with a commutative diagram. I am asking myself how to express the homomorphic condition in commutative diagrams. For this let $(M, \cdot)$ and $(N, \cdot)$ be algebraic structures and let $\varphi : M \to N$ be a homomorphism, then for all $x,y \in M$
$$
 \varphi(x \cdot y) = \varphi(x) \circ \varphi(y).
$$
The only possiblity that comes to my mind is
$$\begin{matrix} M\times M & \overset{\varphi\times\varphi}{\longrightarrow} & N\times N \\  \downarrow {\scriptsize \cdot}& & \downarrow {\scriptsize \circ} \\ M \,\,\,& \overset{\varphi}{\longrightarrow} & N\end{matrix}$$
where $(\varphi \times \varphi)(x,x) := (\varphi(x), \varphi(x))$. But this seems quite complicated with all this products to express this simple idea, so are there simpler diagrams to express this (when mine is right, don't know if it is valid to assume that such product constructions are possible...)?
 A: That's correct, and it's as simple as it's going to get. This is a special case of a homomorphism of algebras for an endofunctor, which has exactly the same diagram but generalised. I'll explain below.
Let $F : \mathcal{C} \to \mathcal{C}$ be a functor from a category $\mathcal{C}$ to itself. An $F$-algebra is a pair $(M, \alpha)$, where $\alpha : FM \to M$ is a morphism, which may be required to satisfy some additional properties. In your case we have $FM = M \times M$ and $\alpha(x,y) = x \cdot y$.
A homomorphism of $F$-algebras $\phi : (M, \alpha) \to (N, \beta)$ is a morphism $\phi : M \to N$ making the following diagram commute:
$$\begin{matrix} FM & \overset{F\phi}{\rightarrow} & FN \\ {\scriptsize \alpha} \downarrow & & \downarrow {\scriptsize \beta} \\ M & \underset{\phi}{\rightarrow} & N\end{matrix}$$
That is, $f$ is a homomorphism so long as it kind-of-commutes with $\phi$, where by kind-of-commutes I mean you need to stick an $F$ in there.
In summary, here we have:


*

*$\mathcal{C}$ is the category of whatever algebraic structures you're working with

*$M$ and $N$ are objects of this category

*$F$ is the diagonal product functor, defined by $FM = M \times M$ and $F\phi = \phi \times \phi$

*$\alpha : M \times M \to M$ is the morphism $(x,y) \mapsto x \cdot y$

*$\beta : N \times N \to N$ is the morphism $(x,y) \mapsto x \circ y$


[Added] I guess the point of me saying all this, which I forgot to make explicit, was to respond to the part where you said

"But this seems quite complicated with all [these] products to express this simple idea"

The fact of the matter is that 'all these products' all come from one thing, namely the diagonal functor ${({-})} \times {({-})}$, which plays the role of the endofunctor $F$ in the above construction.
