Difference of Sets is the operation defined on sets, just like we can perform arithmetic operations on numbers in mathematics. Other than the difference, we can also perform the union and intersection of sets for any given set. These operations have a lot of important applications in mathematical practice.
In this article, we will learn about the difference of sets, including its definition, mathematical expressions, Venn diagram, as well as properties of the difference of sets.
What is a Set?
In mathematics, a set is a collection or grouping of well-defined objects. All such objects, when grouped together in a set, are called elements. Sets are represented by capital letter symbols, and the elements are placed together in a curly bracket {}.
For example, if W is the set of whole numbers, then W = {0, 1, 2, 3, 4, 5,....,∞}.
Learn more about Sets and their types
Difference of Two Sets
The difference of the two sets P and Q is nothing but another set, say R, which consists of all the elements present in the first set and not the second.
Here, the first and second sets mean the order of the sets around the subtraction sign. In other words, whenever the difference between two sets P and Q is to be found, it is done so by removing the common elements, i.e., elements of P ∩ Q from set P. Similarly, whenever the difference between Q and P is to be found, it is done by removing common elements of P ∩ Q from set Q.
Mathematical Definition of Difference of Sets
The difference of two sets, P and Q, in this order, is defined as the set of all those elements that are present in set P but that are not present in set Q.  This can be mathematically expressed as
P – Q = {x / x ∈ P and x ∉ Q}: removing elements of P ∩ Q from set P.
OR
Q – P = {x / x ∈ Q and x ∉ P}: removing elements of P ∩ Q from set Q.
How to Find the Difference of Sets?
The difference between sets can be found with the help of the following steps:
- Step 1: Identify the given non-empty sets and write them in set-builder form.
- Step 2: Identify the order of difference, i.e., if we are asked to find P – Q or Q – P.
- Step 3: Express the difference in mathematical form.
- Step 4: Strike off all the common elements present in both the given sets.
- Step 5: All elements left in the first set after removing common elements are the difference of the two sets.
Difference of Sets Example
Let's consider an example of the difference of sets for better understanding. Â
Example: If P = {5, 10, 15, 20, 25, 30} and Q = {10, 20, 30, 40, 50, 60}, then find:
Solution:
P – Q implies all elements present in P and not in Q.
Step 1. Express the difference in mathematical form.
P – Q = {5, 10, 15, 20, 25, 30} – {10, 20, 30, 40, 50, 60}
Step 2. Strike off all the elements present in both P and Q.
{5, 10, 15, 20, 25, 30} – {10, 20, 30, 40, 50, 60}.
P – Q is the set of elements left in set P afterwards, i.e.,
P – Q = {5, 15, 25}.
Now, Q – P implies all elements present in Q and not in P.
Step 1. Express the difference in mathematical form.
Q – P = {10, 20, 30, 40, 50, 60} – {5, 10, 15, 20, 25, 30}.
Step 2. Strike off all the elements present in both P and Q.
{10, 20, 30, 40, 50, 60} – {5, 10, 15, 20, 25, 30}.
Q – P is the set of elements left in set Q afterwards, i.e.,
Q – P = {40, 50, 60}.
Order of Difference
While finding the difference of two sets, it is very important to keep the order of the difference in mind. Just like the subtraction of two numbers is not commutative (9 – 0 ≠0 – 9), the difference of any two sets is not commutative, i.e., P – Q ≠Q – P. This means that changing the order of the sets while subtracting may alter the results.
Example: If P = {4, 5, 6, 7, 8} and Q = {6, 7, 8, 10}, is P – Q = Q – P?
Solution:
LHS = P – Q = {4, 5, 6, 7, 8} - {6, 7, 8, 10} = {4, 5}
RHS = Q – P = {6, 7, 8, 10} - {4, 5, 6, 7, 8} = {10}
LHS ≠RHS
Thus, P – Q ≠Q – P
Venn Diagram of Difference of Sets
In the Venn diagram below, the pink-shaded region depicts the set P – Q, where all the elements of set P and none of set Q are present. Similarly, the blue-shaded region depicts the set Q – P, where all the elements of set Q and none of set P are present.
Learn more about Venn Diagram
Difference of Three Sets
If P, Q, and R are three non-empty sets, then the difference between the three of them can be depicted as P – Q – R.
This implies all the elements present in set P but not in sets Q and R. This is depicted in the Venn diagram below where the pink-shaded region depicts P – Q – R and the blue-shaded portion is the area not included in the difference.
Symmetric Difference of Sets
The symmetric difference of sets P and Q is expressed as P Δ Q and defined asÂ
P Δ Q = (P - Q) U (Q - P)Â
OR
P Δ Q = (P ∪ Q) - (P ∩ Q)
Venn Diagram of Symmetric Difference of Sets
In the Venn diagram below, the pink-shaded portion represents P Δ Q.

Example: If P = {4, 5, 6, 7, 8} and Q = {6, 7, 8, 10}, find P Δ Q.
Solution:
- Step - 1:Â Find P - Q.
P - Q = {4, 5, 6, 7, 8} - {6, 7, 8, 10} = {4, 5} - Step - 2:Â Find Q - P.
Q - P = {6, 7, 8, 10} - {4, 5, 6, 7, 8} = {10} - Step - 3: Find P Δ Q = (P - Q) U (Q - P).
P Δ Q = (P - Q) U (Q - P) = {4, 5} U {10} = {4, 5, 10}
Properties of Difference of Sets
If P and Q are two sets, then their difference has the following properties:
- P – Q = P ∩ Q'
- P – P = ∅
- P – ∅ = P
- ∅ – P = ∅
- P – Q = P, given that P ∩ Q = ∅
- P – Q = Q – P = ∅, if P = Q
- If P ⊂ Q, then P – Q = ∅
- n(P Δ Q) = n(P – Q) + n(Q – P)
- n(P Δ Q) = n(P U Q) – n(P ∩ Q)
Read More
Solved Problems on Difference of Sets
Problem 1. Find the difference W – N, where W is the set of whole numbers and N is the set of natural numbers.
Solution:
Step 1. Write the given sets in set- builder form.
W = {0, 1, 2, 3, 4, 5,....,∞}
N = {1, 2, 3, 4, 5,....,∞}
W – N implies all elements of set W and none of set N.
Step 2. Write the difference in mathematical form: W – N = {0, 1, 2, 3, 4, 5,....,∞} – {1, 2, 3, 4, 5,....,∞}
Step 3. Strike out all the common elements in both W and N. {0, 1, 2, 3, 4, 5,....,∞} – {1, 2, 3, 4, 5,....,∞}.
All elements left in W represent the difference W – N.
Hence, W – N = {0}.
Problem 2. Prove  P – (Q ∪ R) = (P – Q) ∩ (P – R), if P = {1, 2, 4, 5}; Q = {2, 3, 5, 6} and R = {4, 5, 6, 7}.
Solution:
Let us consider the LHS first.
(Q ∪ R) = {x: x ∈ Q or x ∈ R}
⇒ Q ∪ R = {2, 3, 4, 5, 6, 7}.
Since P – (Q ∪ R) can be expressed as {x ∈ P: x ∉ (Q ∪ R)}.
⇒ P – (Q ∪ R) = {1}
Let us consider the RHS now.
P – Q is defined as {x ∈ P: x ∉ Q}
P = {1, 2, 4, 5}
Q = {2, 3, 5, 6}
⇒ P – Q = {1, 4}
Now, P – R is defined as {x ∈ P: x ∉ R}
⇒ P – R = {1, 2}
(P – Q) ∩ (P – R) = {x: x ∈ (P – Q) and x ∈ (P – R)}.
= {1}
∴ LHS = RHS
Hence verified.
Problem 3. If S and T are two sets, prove that: (S ∪ T) – T = S – T.
Solution:
Let us consider LHS first.
(S ∪ T) – T
= (S – T) ∪ (T – T)
= (S – T) ∪ ϕ (since, T – T = ϕ)
= S – T (since, x ∪ ϕ = x for any set)
= RHS
Hence proved.
Problem 4. If n(S) = 69, n(T) = 55, and n(S ∩ T) = 10, then what is n(S Δ T)?
Solution:
Since, n(S U T) = n(S) + n(T) - n(S∩ T)
= 69 + 55 - 10
= 114
According to the symmetric difference of sets,
n(S Δ T) = n(S U T) - n(S ∩ T)
= 114 - 10
n(S Δ T) = 104
Problem 5. If P, Q, R are three sets, such that P ⊂ Q, then prove that R – Q ⊂ R – P.
Solution:
Given, P ⊂ Q
To prove: R – Q ⊂ R – P
Let us consider, x ∈ R – Q
⇒ x ∈ R and x ∉ Q
⇒ x ∈ R and x ∉ P
⇒ x ∈ R – P
Thus, x ∈ R – Q ⇒ x ∈ R – P
This is true for all x ∈ R – Q
∴ R – Q ⊂ R – P
Hence proved.
Practice Questions on Difference of Sets
Problem 1: Find the difference X – Y, where X is the set of all integers from 1 to 10, and Y is the set of all odd numbers from 1 to 10.
Problem 2: Prove that A – (B ∪ C) = (A – B) ∩ (A – C), if A = {1, 2, 3, 4, 5}, B = {2, 4, 5}, and C = {3, 4, 6}.
Problem 3: If U = {1, 2, 3, 4, 5, 6}, A = {1, 2, 3}, and B = {3, 4, 5}, find the set (A ∪ B) – A.
Problem 4: If P = {2, 4, 6, 8}, Q = {1, 2, 3, 4, 5}, and R = {2, 3, 4, 5}, find P – (Q ∩ R).
Problem 5: If M = {a, b, c, d}, N = {b, c, e, f}, and O = {c, d, g, h}, find (M – N) ∪ (M – O).
Similar Reads
Set Theory Set theory is a branch of mathematics that deals with collections of objects, called sets. A set is simply a collection of distinct elements, such as numbers, letters, or even everyday objects, that share a common property or rule.Example of SetsSome examples of sets include:A set of fruits: {apple,
3 min read
Set Theory Formulas In mathematics, a set is simply a collection of well-defined individual objects that form a group. A set can contain any group of items, such as a set of numbers, a day of the week, or a vehicle. Each element of the set is called an element of the set.Example: A = { 2, 4, 6, 8 }. A is a set and 2, 4
8 min read
Representation of Set
Types of Set
Types Of SetsIn mathematics, a set is defined as a well-defined collection of distinct elements that share a common property. These elementsâ like numbers, letters, or even other sets are listed in curly brackets "{ }" and represented by capital letters. For example, a set can include days of the week. The diffe
13 min read
Empty SetEmpty Sets are sets with no items or elements in them. They are also called null sets. The symbol (phi) â
represents the empty set and is written as â
= { }. It is also known as a void set or a null set. When compared to other sets, empty sets are seen to be distinctive.Empty sets are used to simplif
10 min read
Disjoint SetsDisjoint Sets are one of the types of many pair of sets, which are used in Set Theory, other than this other types are equivalent sets, equal sets, etc. Set Theory is the branch of mathematics that deals with the collection of objects and generalized various properties for these collections of objec
8 min read
Finite SetsFinite set is a collection of finite, well-defined elements. For better understanding, imagine you have a bunch of your favourite toys or snacks. You know exactly how many you have, that's the idea of a finite set in math. A finite set is a way to discuss collections of things you can count. In this
10 min read
Universal SetsUniversal Set is a set that has all the elements associated with a given set, without any repetition. Suppose we have two sets P = {1, 3, 5} and Q = {2, 4, 6} then the universal set of P and Q is U = {1, 2, 3, 4, 5, 6}. We generally use U to denote universal sets. Universal Set is a type of set that
6 min read
Subsets in MathsSubsets in Maths are a core concept in the study of Set Theory. It can be defined as a group of elements, objects, or members enclosed in curly braces, such as {x, y, z} is called a Set, where each member of the set is unique and is taken from another set called the Parent Set.This article explores
12 min read
Operation on Sets
Set OperationsA set is simply a collection of distinct objects. These objects can be numbers, letters, or even peopleâanything! We denote a set using curly brackets.For example: A = {1, 2, 3}Set Operations can be defined as the operations performed on two or more sets to obtain a single set containing a combinati
10 min read
Union of SetsUnion of two sets means finding a set containing all the values in both sets. It is denoted using the symbol 'âª' and is read as the union. Example 1:If A = {1, 3. 5. 7} and B = {1, 2, 3} then AâªB is read as A union B and its value is,AâªB = {1, 2, 3, 5, 7}Example 2:If A = {1, 3. 5.7} and B = {2, 4} t
12 min read
Intersection of SetsIntersection of Sets is the operation in set theory and is applied between two or more sets. It result in the output as all the elements which are common in all the sets under consideration. For example, The  intersection of sets A and B is the set of all elements which are common to both A and B.In
11 min read
Difference of SetsDifference of Sets is the operation defined on sets, just like we can perform arithmetic operations on numbers in mathematics. Other than the difference, we can also perform the union and intersection of sets for any given set. These operations have a lot of important applications in mathematical pr
10 min read
Complement of a SetIn mathematics, a set is a collection or grouping of well-defined objects. All such objects, when grouped in a set, are called elements. Sets are represented by capital letter symbols, and the elements are placed together in a curly bracket {}.For example, if W is the set of whole numbers, then W =
10 min read
Cartesian Product of Sets The term 'product' mathematically refers to the result obtained when two or more values are multiplied together. For example, 45 is the product of 9 and 5.To understand the Cartesian product of sets, one must first be familiar with basic set operations such as union and intersection, which are appli
7 min read
Application of Set
De Morgan's Law - Theorem, Proofs, Formula & ExamplesDe Morgan's law is the law that gives the relation between union, intersection, and complements in set theory. In Boolean algebra, it gives the relation between AND, OR, and complements of the variable, and in logic, it gives the relation between AND, OR, or Negation of the statement. With the help
13 min read