In mathematics, a nonempty subset S of a group G is said to be symmetric if it contains the inverses of all of its elements.