Let $\phi$ be a bijective function. Can we conclude that two monoids $(M_1,.)$ and $(M_2,∗)$ are isomorphic? Condiser two monoids $(M_1,.)$ and $(M_2,*)$ with identity elements $e_1$ and $e_2$ and a bijective function $\phi$ which has the property $\phi(a.b)=\phi(a) * \phi(b)$ for all $a,b \in M_1$
can we conclude that $(M_1,.)$ and $(M_2,*)$ are isomorphic?
My thoughts:
from this A homomorphism between two monoids $(M_1,.)$ and $(M_2,*)$ is a function f : $M_1$ → $M_2$ such that

*

*$f(a.b)=f(a) * f(b)$ for all $a,b \in M_1$

*$f(e_1)=e_2$
and then a bijective monoid homomorphism is called a monoid isomorphism.
I'm saying if $f$ is bijective we need to show for all $c \in M_2$ : $c*f(e_1)=f(e_1)*c=c$ and then we can conclude $f(e_1)=e_2$ and the second condition is not nesseccery for being isomorphic.
Consider $c \in M_2$. beacuse $f$ is bijective so there is  $x \in M_1$ which $f(x)=c$ so $c*f(e_1)=f(x)*f(e_1)=f(x.e_1)=f(x)=c$ and by doing the same for $f(e_1)*c$ we get $c*f(e_1)=f(e_1)*c=c$ and as I said $f(e_1)=e_2$.
so the second condition is not nesseccery for being isomorphic. and only $f$ being bijective is enough.
Is the conclusion I made correct?
 A: Yes, you have the right idea. To clarify the language slightly, you are asking if an isomorphism between $M_1$ and $M_2$ as semigroups is automatically an isomorphism as monoids. It is easy to check that a bijective semigroup (resp. monoid) homomorphism is automatically an iso, so your question is the same as this one.
I will say up-front that your computation is correct, and so is your conclusion. I will also say that there is some extremely interesting mathematics lying just under the surface. If you'll indulge me, I would love to share it with you ^_^

First let's note that some bonus condition is crucial. Consider $M_1 = M_2 = (\mathbb{Z}^2, \times)$, with componentwise multiplication. Then the map $f(a,b) = (a,0)$ is easiliy seen to be a semigroup homomorphism, but $f(1,1) = (1,0) \neq (1,1)$ so the identity is not preserved.
Notice, however, that this is really a counterexample by a technicality. $f(1,1) = (1,0)$ is an identity for the image $f[\mathbb{Z}^2]$. After all $(a,0)(1,0) = (a,0) = (1,0)(a,0)$. It is only for elements not in the image, like $(0,b)$ that we notice $(1,0)$ fails to be an identity. At the risk of outing myself as a logician, I would love to talk about the model-theoretic content in this observation:
The property of "being an identity" is expressible in the language of semigroups.
Let $\varphi(x,y)$ be the formula $yx = x \land xy = x$. Then $e$ is an identity if and only if $\forall x . \varphi(x,e)$ is true. Now since $\varphi$ is "positive" (in the sense that it doesn't have any negations), it is preserved by arbitrary homomorphisms. So if $\varphi(x,y)$ is true in $M_1$, then $\varphi(f(x),f(y))$ will be true in $M_2$.
Notice this almost the same as saying that if $\forall x . \varphi(x,e)$ is true in $M_1$, then $\forall x' . \varphi(x',f(e))$ is true in $M_2$. The problem is the range of the quantifiers. The first quantifier ranges over the elements of $M_1$, whereas the second ranges over all the elements of $M_2$. Of course, we (in general) have no control over the parts of $M_2$ outside the image of $M_1$, so it makes sense that this "strong" universal quantifier might fail to be true. But we are guaranteed that $\varphi(x',f(e))$ is true when we promise to look only at $x'$ in the image of $M_1$.
So, in the special case that $f$ is surjective, we can see how to proceed. If $f$ is surjective, then every element of $M_2$ is in the image of $M_1$. So we really can put the universal quantifier in front, and the property of "being an identity" is preserved.
This gives us a slightly stronger claim than what you wanted: It suffices that the semigroup homomorphism be surjective. And if you look at the computational proof that you gave, you only used surjectivity when you concluded that the identity was preserved!
The reason to go on this long diversion is to give you a tool to see not only that this is true, but to see how it might be obviously true. The property of "being an identity" is definable in the language of semigroups, and isomorphisms preserve all first order formulas. So, in particular, the identity gets mapped to an identity under a semigroup isomorhpism. This kind of argument is extremely flexible, and I hope it serves you well going forwards!

I hope this helps ^_^
