Let be the homomorphism (written ) given by for all . Then is isomorphic to the semidirect product . The isomorphism is well defined by due to the uniqueness of the decomposition . In , we have  Thus, for and we obtain which proves that is a homomorphism. Since is obviously an epimorphism and monomorphism, then it is indeed an isomorphism. This also explains the definition of the multiplication rule in . The direct product is a special case of the semidirect product. To see this, let be the trivial homomorphism (i.e., sending every element of to the identity automorphism of ) then is the direct product . A version of the splitting lemma for groups states that a group is isomorphic to a semidirect product of the two groups and if and only if there exists a short exact sequence  and a group homomorphism such that , the identity map on . In this case, is given by , where  The dihedral group with elements is isomorphic to a semidirect product of the cyclic groups and . Here, the non-identity element of acts on by inverting elements; this is an automorphism since is abelian. The presentation for this group is:  More generally, a semidirect product of any two cyclic groups with generator and with generator is given by one extra relation, , with and coprime; that is, the presentation:  If and are coprime, is a generator of and , hence the presentation:  gives a group isomorphic to the previous one. The fundamental group of the Klein bottle can be presented in the form  and is therefore a semidirect product of the group of integers, , with . The corresponding homomorphism is given by . The group formula_18 of upper-triangular matricesformula_19with non-zero determinant has a decomposition into the semi-direct productformula_20whereformula_21and formula_22 is the subgroup where the only non-zero entries are on the diagonal. This is called the group of diagonal matrices. The group action of formula_22 on formula_24 is induced by matrix multiplication. If we setformula_25and formula_26then their matrix multiplication is formula_27This gives the induced group action formula_28 is given byformula_29A matrix in formula_18 can be represented by a matrices in formula_24 and formula_22.