In the example of symmetries of a square, the identity and the rotations constitute a subgroup ⁠ R = { i d , r 1 , r 2 , r 3 } ⁠, highlighted in red in the Cayley table of the example: any two rotations composed are still a rotation, and a rotation can be undone by (i.e., is inverse to) the complementary rotations 270° for 90°, 180° for 180°, and 90° for 270°. The subgroup test provides a necessary and sufficient condition for a nonempty subset ⁠ H ⁠ of a group ⁠ G ⁠ to be a subgroup: it is sufficient to check that g − − 1 ⋅ ⋅ h ∈ ∈ H for all elements g and h in ⁠ H ⁠. Knowing a group's subgroups is important in understanding the group as a whole.