not the direct product of two subgroups of . The subgroups of direct products are described by Goursat's lemma. Other subgroups include fiber products of and . Conjugacy and centralizers Two elements and are conjugate in if and only if and are conjugate in and and are conjugate in . It follows that each conjugacy class in is simply the Cartesian product of a conjugacy class in and a conjugacy class in . Along the same lines, if , the centralizer of is simply the product of the centralizers of and : = . Similarly, the center of is the product of the centers of and : = . Normalizers behave in a more complex manner since not all subgroups of direct products themselves decompose as direct products. Automorphisms and endomorphisms If is an automorphism of and is an automorphism of , then the product function defined by is an automorphism of . It follows that has a subgroup isomorphic to the direct product . It is not true in general that every automorphism of has the above form. (That is, is often a proper subgroup of .) For example, if is any group, then there exists an automorphism of that switches the two factors, i.e. . For another example, the automorphism group of is , the group of all matrices with integer entries and determinant, . This automorphism group is infinite, but only finitely many of the automorphisms have the form given above. In general, every endomorphism of can be written as a matrix where is an endomorphism of , is an endomorphism of , and and are homomorphisms. Such a matrix must have the property that every element in the image of commutes with every element in the image of , and every element in the image of commutes with every element in the image of . When G and H are indecomposable, centerless groups, then the automorphism group is relatively straightforward, being Aut(G) × Aut(H) if G and H are not isomorphic, and Aut(G) wr 2 if G ≅ H, wr denotes the wreath product. This is part of the Krull–Schmidt theorem, and holds more generally for finite direct products. Generalizations Finite direct products It is possible to take the direct product of more than two groups at once. Given a finite sequence of groups, the direct product is defined as follows: This has many of the