Share this page

Learn X in Y minutes

Where X=Set theory

The set theory is a study for sets, their operations, and their properties. It is the basis of the whole mathematical system.

Basic operators

These operators don’t require a lot of text to describe.

A brief history of the set theory

Naive set theory

Axiomatic set theory

Built-in sets

The empty set

A = {x|x∈N,x < 0}
A = ∅
∅ = {}              (Sometimes)

|∅|   = 0
|{∅}| = 1

Representing sets

Enumeration

Description

A = {x|x is a vowel}
B = {x|x ∈ N, x < 10l}
C = {x|x = 2k, k ∈ N}
C = {2x|x ∈ N}

Relations between sets

Belongs to

Equals

Belongs to

Subsets

Proper subsets

Set operations

Base number

A   = {A,B,C}
|A| = 3
B   = {a,{b,c}}
|B| = 2
|∅| = 0         (it has no items)

Powerset

P(A) = {x|x ⊆ A}

|A| = N, |P(A)| = 2^N

Set operations among two sets

Union

Given two sets A and B, the union of the two sets are the items that appear in either A or B, written as A ∪ B.

A ∪ B = {x|x∈A∨x∈B}

Intersection

Given two sets A and B, the intersection of the two sets are the items that appear in both A and B, written as A ∩ B.

A ∩ B = {x|x∈A,x∈B}

Difference

Given two sets A and B, the set difference of A with B is every item in A that does not belong to B.

A \ B = {x|x∈A,x∉B}

Symmetrical difference

Given two sets A and B, the symmetrical difference is all items among A and B that doesn’t appear in their intersections.

A △ B = {x|(x∈A∧x∉B)∨(x∈B∧x∉A)}

A △ B = (A \ B) ∪ (B \ A)

Cartesian product

Given two sets A and B, the cartesian product between A and B consists of a set containing all combinations of items of A and B.

A × B = { {x, y} | x ∈ A, y ∈ B }

“Generalized” operations

General union

Better known as “flattening” of a set of sets.

∪A = {x|X∈A,x∈X}
∪A={a,b,c,d,e,f}
∪B={a}
∪C=a∪{c,d}

General intersection

∩ A = A1 ∩ A2 ∩ … ∩ An

Got a suggestion? A correction, perhaps? Open an Issue on the Github Repo, or make a pull request yourself!

Originally contributed by , and updated by 1 contributor(s).