Rotations and Isometry of triangle regular prism I want to consider group of isometry of triangle regular prism .
Question
Why if we consider isometry of triangle regular prism, we take group
($D_n$ is dihedral group)
$$ D_3 \oplus \mathbb Z_2 = \left\{\mbox{identity} \times \mbox{without base swap},\\\mbox{rotation by 120 degree} \times \mbox{without base swap},\\ \mbox{rotation by 240 degree}\times\mbox{without base swap},\\ \mbox{symmetry by first height} \times \mbox{without base swap},\\\mbox{symmetry by second height} \times \mbox{without base swap},\\ \mbox{symmetry by third height} \times \mbox{without base swap},\\
\mbox{identity} \times \mbox{with base swap},\\\mbox{rotation by 120 degree} \times \mbox{with base swap},\\ \mbox{rotation by 240 degree}\times\mbox{with base swap},\\ \mbox{symmetry by first height} \times \mbox{with base swap},\\\mbox{symmetry by second height} \times \mbox{with base swap},\\ \mbox{symmetry by third height} \times \mbox{with base swap}   \right\} $$
but we don't take group:
$$ G = \left\{\mbox{identity}, \\\mbox{rotation by 120 degree} ,\\ \mbox{rotation by 240 degree},\\ \mbox{symmetry by first height}  \,\\\mbox{symmetry by second height},\\ \mbox{symmetry by third height}\\ \mbox{base swap}  \right\} $$
Also, can you give me some tips when to use direct sum and when to use swap as separate element of groups? Is there any rule?
 A: To be clear, my understanding is that the “height” described in the question is an altitude of a triangle, a line segment obtained by dropping a perpendicular from one vertex of a triangle to the opposite side. Since the triangle is equilateral, this segment is also a median, an angle bisector, and a line of reflective symmetry of the triangle. 
To understand the symmetry group of a prism (the group of isometries that map the prism to itself) we can track what happens to the vertices of the prism, since every symmetry must map every vertex to a vertex.  Also remember that a group is defined by certain properties, one of which is that if you apply the operator of the group to two members, the result is always a member of the group. 
So the set of seven isometries in the question cannot be the symmetry group of the regular triangular prism, because if we do a $120$-degree rotation and then swap the bases, we get a different result than from any of the seven listed isometries. 
In the other hand, you can generate the complete symmetry group from the seven listed isometries by applying the group operator to pairs of isometries until no new ones can be produced in that way. 
But if all you want is a sufficient set of generators of the group, seven isometries is far more than you need. All you need is three isometries: a rotation by $120$ degrees, a reflection across one altitude (swapping two vertices of a triangular face while leaving one in place), and a reflection that swaps the two triangular faces. You can get everything else by repeated application of the group operator to these isometries and the others that are generated in this way. 
