## Difference of Sets Definition

The difference between Sets A and B is the Set of elements present in A but not in B. It is represented as A -B. The region shaded in orange denotes A -B and the one shaded in violet represents the difference between B and A i.e. B-A.

### How to find the Difference of Sets using the Venn Diagram?

Let us consider Two Sets A and B that are Subsets of Universal Set U.

To find the difference between Sets A and B simply write the elements of A and take away the elements that are also present in Set B.

The difference of sets A, B is represented as such

A – B = {x : x ∈ A and x ∉ B}

A-B is the set of all the elements that are present in Set A but don’t belong to Set B.

A – B = {x : x ∈ A and x ∉ B} or A – B = {x ∈ A : x ∉ B}

Thus, we can say that x ∈ A – B

⇒ x ∈ A and x ∉ B

The Same Logic applies to B-A i.e. it contains all the elements that are included in Set B but don’t belong to Set A.

We need to be cautious about the way we compute the difference of sets. Since A-B is not the same as B-A and order does matter in the Sets Difference. Thus, we can say that Difference of Sets Operation isn’t commutative.

### Identities involving Difference of Sets

There are quite a few operations that include Difference and Complement of Sets. We have stated some of the important identities related to the Difference of Sets and they may include operations such as Union, Intersection in between. They are in the following fashion

- A – A =∅
- A – ∅ = A
- ∅ – A = ∅
- A – U = ∅
- (A
^{C})^{C}= A - DeMorgan’s Law I: (A ∩ B)
^{C}= A^{C}∪ B^{C} - DeMorgan’s Law II: (A ∪ B)
^{C}= A^{C}∩ B^{C}

### Solved Examples on Difference of Sets

1. If A = {1, 2, 3, 4, 5, 6, 7, 8, 9} B = {2, 4, 6, 8, 10, 12, 14, 16, 18}. Find Difference of Sets A-B and represent the Same using Venn Diagram?

Solution:

Given Sets A = {1, 2, 3, 4, 5, 6, 7, 8, 9} B = {2, 4, 6, 8, 10, 12, 14, 16, 18}

A-B = {1, 2, 3, 4, 5, 6, 7, 8, 9} – {2, 4, 6, 8, 10, 12, 14, 16, 18}

= {1, 3, 5, 7, 9}

A-B is the Set of Elements that are present in Set A and doesn’t belong to Set B.

Therefore, A-B = {1, 3, 5, 7, 9}

2. If A = {1, 2, 3, 4} B = { 3, 4, 5, 6}. Find Difference of Sets A and B using Venn Diagram?

Solution:

A = {1, 2, 3, 4} B = { 3, 4, 5, 6}

A-B = { 1, 2, 3, 4} – { 3, 4, 5, 6}

A-B = {1, 2}

A-B denotes the Elements in Set A but doesn’t belong to Set B. The Difference of Sets A-B is shaded for your reference.

3. Let us consider Set A = {blue, green, red} & Set B = {red, orange, yellow}. Find the Difference of Sets A and B?

Solution:

Given Set A = {blue, green, red} & Set B = {red, orange, yellow} are

A-B = {blue, green, red} – {red, orange, yellow}

= {blue, green}

A-B denotes the colors that belong to Set A and don’t belong to Set B. A-B is shaded so that you can understand easily.