# Set (mathematics)

A set is a gathering together into a whole of definite, distinct objects of our perception or our thought—which are called elements of the set.

The simple concept of a set has proved enormously useful in mathematics, but paradoxes arise if no restrictions are placed on how sets can be constructed:

Another way to define a set is to use a rule to determine what the elements are:

There are sets of such mathematical importance, to which mathematicians refer so frequently, that they have acquired special names and notational conventions to identify them.

Each of the above sets of numbers has an infinite number of elements. Each is a subset of the sets listed below it.

More formally, two sets share the same cardinality if there exists a one-to-one correspondence between them.

There are several fundamental operations for constructing new sets from given sets.

The inclusion-exclusion principle is used to calculate the size of the union of sets: the size of the union is the size of the two sets, minus the size of their intersection.

The inclusion–exclusion principle is a counting technique that can be used to count the number of elements in a union of two sets—if the size of each set and the size of their intersection are known. It can be expressed symbolically as

A more general form of the principle can be used to find the cardinality of any finite union of sets: