A way to visualize Mal'cev quasi-identities is presented. As a consequence an analogy, expressed in a geometric language, is found between Mal'cev and Lambek quasi-identities. These are known to be of a special form which is called stable here; it is proved that certain geometrically characterized sets of stable quasi-identities axiomatize the class of embeddable semigroups. The results of Mal'cev and Lambek are obtained as corollaries. The method of diagrams, borrowed from group theory, enabled us to give a unified treatment which seems to be conceptually simpler than those previously employed.