Set theory is a fundamental part of mathematics that deals with collections of well-defined objects called sets. These objects may be numbers, symbols, people, shapes, or any other clearly identified elements. Set theory provides a simple way to organize information and understand relationships between different collections.
The basic ideas of sets are used in many areas of mathematics, including algebra, probability, statistics, logic, computer science, and discrete mathematics. Understanding set notation and basic set operations also makes it easier to work with more advanced mathematical concepts.
In this article, we will learn the important set theory formulas and basic set operations, including union, intersection, difference, complement, Cartesian product, and cardinality. We will also look at important laws and formulas that help simplify expressions involving sets.
What Is a Set?
A set is a well-defined collection of distinct objects. The objects contained in a set are called elements or members of the set.
For example, the set of the first five natural numbers can be written as:
A = {1, 2, 3, 4, 5}
Here, 1, 2, 3, 4, and 5 are the elements of set A.
Sets are usually represented using capital letters such as A, B, C, and D, while their elements are written inside curly brackets { }.
An element can belong to a set or not belong to a set. The symbols ∈ and ∉ are used to show these relationships.
For example:
3 ∈ A
means 3 belongs to set A.
Similarly:
7 ∉ A
means 7 does not belong to set A.
Ways of Representing a Set
There are two common ways to represent a set.
Roster Form
In roster form, all the elements of a set are listed inside curly brackets.
For example:
A = {2, 4, 6, 8, 10}
This method is convenient when a set contains a small number of elements.
Set-Builder Form
In set-builder form, a rule or property that describes the elements of a set is given.
For example:
A = {x | x is an even natural number less than 12}
The symbol | means “such that.”
Set-builder notation is particularly useful when a set contains many elements or follows a specific mathematical rule.
Important Types of Sets
Understanding different types of sets is useful before learning set operations.
Empty Set
A set containing no elements is called an empty set or null set.
It is represented by:
∅ or { }
For example, the set of natural numbers between 2 and 3 is an empty set.
Singleton Set
A set containing exactly one element is called a singleton set.
For example:
A = {5}
Finite Set
A set containing a limited number of elements is called a finite set.
For example:
A = {1, 2, 3, 4}
Infinite Set
A set containing infinitely many elements is called an infinite set.
For example:
N = {1, 2, 3, 4, 5, …}
Universal Set
The universal set contains all the elements under consideration in a particular problem.
It is usually represented by U.
For example, if we are considering the natural numbers from 1 to 10, then:
U = {1, 2, 3, …, 10}
Subsets
A set A is called a subset of set B if every element of A is also an element of B.
The notation is:
A ⊆ B
For example:
A = {1, 2}
and
B = {1, 2, 3, 4}
Since every element of A is present in B:
A ⊆ B
A set is also considered a subset of itself.
Therefore:
A ⊆ A
The empty set is a subset of every set:
∅ ⊆ A
Proper Subset
If A is a subset of B but A is not equal to B, then A is called a proper subset of B.
It can be written as:
A ⊂ B
For example:
A = {1, 2}
B = {1, 2, 3}
Therefore:
A ⊂ B
Equal Sets
Two sets are equal if they contain exactly the same elements.
For example:
A = {1, 2, 3}
B = {3, 2, 1}
Although the order of the elements is different, the two sets are equal because they contain the same elements.
Therefore:
A = B
The order of elements does not matter in a set.
Basic Set Operations
Set operations are mathematical procedures used to combine or compare sets. The most important operations are union, intersection, difference, and complement.
Consider the following two sets:
A = {1, 2, 3, 4}
B = {3, 4, 5, 6}
These sets will help us understand the basic operations.
Union of Sets
The union of two sets contains all elements that belong to either set, including elements common to both sets.
The union of A and B is written as:
A ∪ B
For the sets above:
A ∪ B = {1, 2, 3, 4, 5, 6}
Duplicate elements are written only once.
The basic formula is:
A ∪ B = {x | x ∈ A or x ∈ B}
For two finite sets, the number of elements in their union is:
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
This formula prevents common elements from being counted twice.
Intersection of Sets
The intersection of two sets contains only the elements that are common to both sets.
It is represented by:
A ∩ B
For our example:
A ∩ B = {3, 4}
The formula is:
A ∩ B = {x | x ∈ A and x ∈ B}
If two sets have no common elements, their intersection is the empty set:
A ∩ B = ∅
Such sets are called disjoint sets.
Difference of Sets
The difference between two sets contains the elements that belong to the first set but not to the second set.
The difference of A and B is written as:
A − B
For our example:
A − B = {1, 2}
Similarly:
B − A = {5, 6}
Notice that set difference is not generally commutative.
Therefore:
A − B ≠ B − A
in general.
Complement of a Set
The complement of a set contains all elements of the universal set that are not present in that set.
The complement of A is commonly written as:
A′
or:
Aᶜ
If:
U = {1, 2, 3, 4, 5, 6, 7}
and:
A = {1, 2, 3}
then:
A′ = {4, 5, 6, 7}
The complement depends on the universal set being considered.
Cardinality of a Set
The cardinality of a set means the number of distinct elements in the set.
It is represented by:
n(A)
or sometimes:
|A|
For example:
A = {2, 4, 6, 8}
Therefore:
n(A) = 4
For a finite set containing n elements, its cardinality is simply the number of distinct elements.
Cardinality of the Union of Two Sets
One of the most important formulas in set theory is:
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
For example, suppose:
n(A) = 20
n(B) = 15
and:
n(A ∩ B) = 5
Then:
n(A ∪ B) = 20 + 15 − 5
n(A ∪ B) = 30
The intersection is subtracted because the common elements were counted twice when n(A) and n(B) were added.
Cardinality of the Difference
The number of elements in A that are not in B can be calculated using:
n(A − B) = n(A) − n(A ∩ B)
Similarly:
n(B − A) = n(B) − n(A ∩ B)
For example, if:
n(A) = 20
and:
n(A ∩ B) = 6
then:
n(A − B) = 20 − 6 = 14
Complement Formula
If U is the universal set, then the number of elements outside A is:
n(A′) = n(U) − n(A)
For example, if the universal set contains 50 elements and A contains 18 elements:
n(A′) = 50 − 18 = 32
Important Laws of Set Theory
Set theory contains several important laws that help simplify expressions.
Commutative Laws
The order of sets does not affect union or intersection.
A ∪ B = B ∪ A
A ∩ B = B ∩ A
However, this property does not generally apply to set difference.
Associative Laws
When three sets are involved, grouping does not affect union or intersection.
(A ∪ B) ∪ C = A ∪ (B ∪ C)
(A ∩ B) ∩ C = A ∩ (B ∩ C)
Distributive Laws
Union and intersection can be distributed over each other.
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
These laws are similar in structure to distributive properties used in algebra.
Identity Laws
The identity laws are:
A ∪ ∅ = A
A ∩ U = A
These show that taking the union with the empty set does not change A, while intersecting A with the universal set also leaves A unchanged.
Domination Laws
The domination laws are:
A ∪ U = U
A ∩ ∅ = ∅
The union of any set with the universal set is the universal set, while the intersection with the empty set produces the empty set.
Idempotent Laws
The idempotent laws state:
A ∪ A = A
A ∩ A = A
Repeating the same set in an operation does not create new elements.
Complement Laws
Important complement formulas include:
A ∪ A′ = U
A ∩ A′ = ∅
A set together with its complement contains the entire universal set, while they have no elements in common.
The complement of the complement returns the original set:
(A′)′ = A
De Morgan’s Laws
De Morgan’s laws are important formulas for working with complements.
The first law is:
(A ∪ B)′ = A′ ∩ B′
The second law is:
(A ∩ B)′ = A′ ∪ B′
These laws are widely used in mathematics, logic, probability, and computer science.
Cartesian Product of Sets
The Cartesian product of two sets consists of all ordered pairs formed by taking one element from the first set and one element from the second set.
It is represented as:
A × B
For example:
A = {1, 2}
B = {x, y}
Then:
A × B = {(1, x), (1, y), (2, x), (2, y)}
The order of the elements in an ordered pair matters. Therefore:
(1, x) ≠ (x, 1)
in general.
If A and B are finite sets, then:
n(A × B) = n(A) × n(B)
For example, if A has 3 elements and B has 4 elements:
n(A × B) = 3 × 4 = 12
Power Set
The power set of A is the set containing all possible subsets of A.
It is represented by:
P(A)
If a set has n elements, the number of elements in its power set is:
n(P(A)) = 2ⁿ
For example, if:
A = {1, 2, 3}
then A has 3 elements, so:
n(P(A)) = 2³ = 8
The power set contains the empty set, all singleton subsets, all larger subsets, and the original set itself.
Set Theory Formula Summary
Some of the most useful formulas can be summarized as follows:
Union:
A ∪ B = {x | x ∈ A or x ∈ B}
Intersection:
A ∩ B = {x | x ∈ A and x ∈ B}
Difference:
A − B = {x | x ∈ A and x ∉ B}
Complement:
A′ = {x ∈ U | x ∉ A}
Union cardinality:
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
Difference cardinality:
n(A − B) = n(A) − n(A ∩ B)
Complement cardinality:
n(A′) = n(U) − n(A)
Cartesian product cardinality:
n(A × B) = n(A) × n(B)
Power set cardinality:
n(P(A)) = 2ⁿ
Why Set Theory Is Important
Set theory provides a foundation for many areas of mathematics. It helps describe groups of objects and relationships between them in a precise way.
In probability, sets can represent events and their possible outcomes. In statistics, sets can help organize populations and samples. In computer science, set operations are used in databases, algorithms, programming, and logic. In mathematics, sets provide a foundation for functions, relations, number systems, and many other concepts.
Learning the basic set operations also makes it easier to understand Venn diagrams. A Venn diagram visually represents sets and shows relationships such as union, intersection, difference, and complement.
Conclusion
Set theory is a fundamental mathematical concept used to describe collections of objects and relationships between them. The basic operations of union, intersection, difference, and complement provide simple ways to combine and compare sets. Important formulas such as n(A ∪ B) = n(A) + n(B) − n(A ∩ B) help calculate the number of elements in combined sets.
Other concepts, including subsets, cardinality, Cartesian products, power sets, and De Morgan’s laws, extend the usefulness of set theory. Once these basic formulas and operations are understood, many topics in mathematics, probability, statistics, logic, and computer science become easier to study.
FAQs
1. What is a set in mathematics?
A set is a well-defined collection of distinct objects or elements. The elements may be numbers, letters, symbols, people, or other objects. Sets are generally represented using capital letters such as A, B, and C, while their elements are written inside curly brackets. For example, A = {1, 2, 3, 4} is a set containing four elements. Each element either belongs to a set or does not belong to it. The symbols ∈ and ∉ are used to represent these relationships. Set theory provides the foundation for many mathematical topics, including algebra, probability, statistics, logic, and computer science.
2. What are the basic operations on sets?
The basic operations on sets are union, intersection, difference, and complement. The union of two sets contains all elements belonging to either set and is represented by A ∪ B. The intersection contains elements common to both sets and is represented by A ∩ B. The difference A − B contains elements that belong to A but not B. The complement A′ contains elements in the universal set that are not in A. These operations allow mathematicians to combine, compare, separate, and analyze collections of elements. They are also widely used in probability, statistics, logic, and computer science.
3. What is the union of two sets?
The union of two sets is the set containing every element that belongs to either of the two sets. It is represented by A ∪ B. An element is included in the union if it belongs to A, B, or both. For example, if A = {1, 2, 3} and B = {3, 4, 5}, then A ∪ B = {1, 2, 3, 4, 5}. Common elements are written only once. For finite sets, the number of elements in the union can be calculated using n(A ∪ B) = n(A) + n(B) − n(A ∩ B). This formula prevents common elements from being counted twice.
4. What is the intersection of two sets?
The intersection of two sets contains only the elements that are common to both sets. It is represented by A ∩ B. For example, if A = {1, 2, 3, 4} and B = {3, 4, 5, 6}, then A ∩ B = {3, 4}. An element belongs to the intersection only when it is present in both sets. If two sets have no common elements, their intersection is the empty set, written as ∅. Such sets are called disjoint sets. Intersection is useful when identifying shared properties, common members, or overlapping groups in mathematics, probability, statistics, databases, and logic.
5. What is the difference between two sets?
The difference between two sets contains the elements that belong to the first set but do not belong to the second set. It is represented by A − B. For example, if A = {1, 2, 3, 4} and B = {3, 4, 5}, then A − B = {1, 2}. Similarly, B − A = {5}. Set difference is generally not commutative, meaning A − B is usually different from B − A. The number of elements in the difference can be calculated using n(A − B) = n(A) − n(A ∩ B), provided the sets are finite.
6. What is the complement of a set?
The complement of a set contains all elements of the universal set that are not members of that set. It is commonly represented by A′ or Aᶜ. For example, if U = {1, 2, 3, 4, 5, 6} and A = {1, 2, 3}, then A′ = {4, 5, 6}. The complement always depends on the universal set being considered. For a finite universal set, the number of elements in the complement is calculated using n(A′) = n(U) − n(A). Complements are important in set theory, probability, logic, and many mathematical applications involving opposite or excluded possibilities.
7. What is the cardinality of a set?
The cardinality of a set is the number of distinct elements contained in that set. It is commonly represented by n(A) or |A|. For example, if A = {2, 4, 6, 8, 10}, then n(A) = 5 because the set contains five distinct elements. Repeated elements are not counted more than once because sets contain distinct elements. Cardinality is particularly useful for finite sets because it allows us to calculate the sizes of unions, intersections, differences, Cartesian products, and power sets. For example, n(A ∪ B) = n(A) + n(B) − n(A ∩ B) uses cardinality to calculate the size of a union.
8. What are De Morgan’s laws in set theory?
De Morgan’s laws are two important rules that describe the relationship between complements, unions, and intersections. The first law states that (A ∪ B)′ = A′ ∩ B′. The second law states that (A ∩ B)′ = A′ ∪ B′. These laws show how taking the complement of a combined set changes a union into an intersection and an intersection into a union. De Morgan’s laws are useful for simplifying set expressions and solving problems involving multiple sets. They are also closely related to rules in mathematical logic and are widely used in computer science, Boolean algebra, probability, and digital systems.
9. What is a subset in set theory?
A set A is called a subset of set B when every element of A is also an element of B. The notation A ⊆ B is used to represent this relationship. For example, if A = {1, 2} and B = {1, 2, 3, 4}, then A ⊆ B because both elements of A are present in B. Every set is also a subset of itself, so A ⊆ A. The empty set ∅ is considered a subset of every set. If A is a subset of B but A is not equal to B, then A is called a proper subset and can be written as A ⊂ B.
10. What is the power set of a set?
The power set of a set is the set containing all possible subsets of that set. It is represented by P(A). If a set A contains n elements, then the number of elements in its power set is given by n(P(A)) = 2ⁿ. For example, if A = {1, 2, 3}, it has three elements, so its power set contains 2³ = 8 subsets. These include the empty set, the three individual elements as singleton subsets, the three possible two-element subsets, and the original set itself. Power sets are important in combinatorics, discrete mathematics, probability, relations, and computer science.

















