A set is a repetition-free and unordered collection of objects. Each object in a set is known as an element (they are also called members). You normally represent these elements within curly braces {}. For example, we can represent the set of positive integers less than 10 with:
Although many sets you'll see in mathematics will be represented as a set of numbers, please note that since set elements are objects, they can be anything. For example, the set of vowels in the English alphabet can be represented as :
Sets are such an important concept in discrete math and computer science because they allow us to easily model, define, and manipulate collections of objects in problems. These concepts are the foundation of some Data Structures and Algorithms, and Database Design.
Set Properties
Sets have several important properties. These include:
- Sets are unordered: The order of the elements in a set does not matter. For example, the set is the same as .
- Sets have unique elements: There are no duplicate elements in a set. If an element shows up more than once in a collection of objects, it is not a set.
- Sets can be finite or infinite: A finite set has a limited number of elements. For example, the set has 3 elements. An infinite set has a never-ending number of elements. For example, the set of integers: is an infinite set.
Set Builder Notation
So far, we've seen sets being represented by listing the elements in the set, delimited by a comma. This is known as list notation. Sets are also often shown in Venn Diagrams. There is yet another way to represent sets, known as Set Builder Notation. With Set Builder Notation, sets are expressed by a property that all elements of the set have in common:
or in simpler terms:
For example, to represent the set of even integers between 10 and 21 in List notation:
now turns to
which can be more formally written as
In Set Builder Notation, a comma (,) means the same as 'and'.
Common Sets
There are some common sets in Discrete Math, for example:
Natural Numbers: (infinite)
Integers: (infinite)
Digits in Base 10: (finite)
Note the in the infinite sets. These are known as ellipses, and denote a continuing pattern that is hard to enumerate or goes on forever.