Difference of Sets (original) (raw)

Last Updated : 1 Oct, 2025

The difference of sets is the operation defined on sets; it is a way to find elements which is present in one set but not in the other. It is also called the set-theoretic difference or complement of one set relative to another.

_difference_of_sets

In the figure above, for two sets A and D, the difference of sets A−D is the set of all elements that are in A but not in D. Similarly, D−A is the set of elements in D but not in A.

**A– D = {x / x ∈ A and x ∉ D}: removing elements of A ∩ D from set A.
OR
**D ** A = {x / x ∈ D and x ∉ A}: removing elements of D ∩ A from set D.

How to Find the Difference of Sets?

The difference between sets can be found with the help of the following steps:

**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

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 depictsP – Q – R and the blue-shaded portion is the area not included in the difference.

universal_set_u_491

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.

111

**Example: If P = {4, 5, 6, 7, 8} and Q = {6, 7, 8, 10}, find P Δ Q.

**Solution:

**Properties of Difference of Sets

If P and Q are two sets, then their difference has the following properties:

**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).