Set Notation: A Clear Guide to Writing and Reading Sets
A set is simply a collection of distinct objects, and set notation is the shorthand mathematicians use to write such collections down precisely. Instead of describing a group of numbers in a sentence, you list it between curly braces or define it by a rule, so that anyone reading it knows exactly which elements belong and which do not. The notation grew out of the formalisation of mathematics in the late nineteenth century, when sets became the foundation on which arithmetic, algebra and analysis could be built. Today it appears in school textbooks, in probability, in logic, in database queries and in the everyday vocabulary of computer science.
Two ways to write a set
The most direct form is roster notation: the elements are listed inside braces, separated by commas, as in the set of even digits written as {0, 2, 4, 6, 8}. Order does not matter, and repetition does not count, so {2, 0, 8, 4, 6} is the same set, and so is a list in which 2 appears twice. For large or infinite collections, roster notation gives way to set-builder notation, which names a variable, a colon or vertical bar, and a condition: the same set of even digits becomes {x : x is an even digit}. Read the colon as "such that".
The symbols worth knowing
Read more
Membership is written with the element sign, so 4 ∈ {0, 2, 4, 6, 8} says that 4 belongs to the set, and 5 ∉ {0, 2, 4, 6, 8} says it does not. The empty set, containing nothing, is written ∅ or as a pair of empty braces. A set whose elements all lie inside another is a subset, written with ⊆; the stricter symbol ⊂ is often used for a proper subset, one that leaves something out. Combining sets uses union and intersection: A ∪ B gathers everything in either set, A ∩ B keeps only what both share. The complement of A, written A′ or with a bar, holds the elements of the surrounding universal set that A does not contain.
Number systems and intervals
Certain sets are used so often that they have their own letters: the natural numbers, the integers, the rationals and the reals. Real numbers are also written as intervals, using brackets that include an endpoint and parentheses that exclude it, so a range from 0 up to but not including 5 becomes [0, 5). The size of a finite set is its cardinality, written with vertical bars: |{a, b, c}| = 3.
Tips for beginners
Read every symbol aloud as a phrase; "∈" becomes "is an element of", and the sentence usually makes sense immediately. Keep track of which universe of discourse you are working in, since complements and set-builder conditions only mean something relative to it. Watch the difference between an element and a set containing that element — they are not interchangeable. Finally, write braces deliberately: a misplaced pair is the most common source of confusion, and checking them costs a few seconds.