Example

Consider once more the monoids M1 and M2, given by the following tables

M1
*
e
a
e
e
a
a
a
e
     
M2
*
e
a
e
e
a
a
a
a

Both have size 2. But they are not isomorphic. For otherwise, there would be an isomorphism: f : M1 -> M2 with f(e) = e. Hence, as f is bijective, also f(a) = a. But then we would have

e = f(e) = f(a2) = f(a)2 = a2 = a,

a contradiction.