# Operations on Sets

__Operations on Sets__

There are basically three operations applicable on two sets are

- Union of sets (∪)
- Intersection of sets (∩)
- Difference of sets ( – )

## Union of Sets

If two sets A and B are given, then the union of A and B is equal to the set that contains all the elements present in set A or set B or both. This operation can be represented as;

A ∪ B = {x: x ∈ A or x ∈ B}

Where x is in A **or** in B **or** in both

Example: If set A = {1,2,3,4} and B {6,7}

### Then, Union of sets, A ∪ B = {1,2,3,4,6,7}

### Union of Two Sets in Venn Diagram

A union B is given by: **A ****∪**** B = {x | x ****∈****A or x ****∈****B}**.

This represents the combined elements of set A and B (represented by the shaded region in fig. ).

**Union of two sets**

Some properties of Union operation:

- A ∪ B = B ∪ A
- (A ∪ B) ∪ C = A ∪ (B ∪ C)
- A ∪ φ = A
- A ∪ A = A
- U ∪ A = U

### Intersection of Sets

If set A and set B are two sets, then A intersection B is the set that contains only the common elements in set A and set B. It is denoted as A ∩ B.

Example Set A = {1,2,3} and B = {4,5,6}, then A intersection B is:

A ∩ B = { } or Ø

### Since A and B do not have any elements in common, so their intersection will give null set.

### Intersection of two sets in Venn Diagram

**A intersection B is given by: A ∩ B = {x : x ****∈**** A and x ****∈**** B}.** Where x is in A **and **B both

This represents the common elements between set A and B (represented by the shaded region in fig)

Intersection of two Sets

Properties of the intersection of sets operation:

- A ∩ B = B ∩ A
- (A ∩ B) ∩ C = A ∩ (B ∩ C)
- φ ∩ A = φ ; U ∩ A = A
- A ∩ A = A
- A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
- A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)

### Difference of Sets

If set A and set B are two sets, then set A difference set B is a set in which those elements of set A are present that are not in B.

It is denoted as A – B.

Example: A = {1,2,3} and B = {2,3,4}

### A – B = {1}

### Difference between Two Sets in Venn Diagram

**A – B**: This is read as **A difference B**. Sometimes, it is also referred to as ‘**relative complement**’. This represents elements of set A which are not there in set B(represented by the shaded region in fig. ).

** **

**Difference between Two Sets**

### Complement of Sets

The complement of any set, say P, is the set of all elements in the universal set that are not in set P. It is denoted by P’**.**

**Properties of Complement sets**

- P ∪ P′ = U
- P ∩ P′ = Φ
- Law of double complement : (P′ )′ = P
- Laws of empty/null set(Φ) and universal set(U), Φ′ = U and U′ = Φ.

Example If = {1, 2, 3, 4, 5, 6, 7, 8, 9} and A = {1, 3, 5, 7, 9},

then A’ = {2, 4, 6, 8}

### Complement of a set in Venn Diagram

A’ is the **complement** **of set A** (represented by the shaded region in fig. ). This set contains all the elements which are not there in set A

.

It is clear that from the above figure,

**A + A’ = U **

It means that the set formed with elements of set A and set A’ combined is equal to U.

**(A’)’= A**

The complement of a complement set is a set itself.

Properties of Complement of set:

- A ∪ A′ = U
- A ∩ A′ = φ
- (A ∪ B)′ = A′ ∩ B′
- (A ∩ B)′ = A′ ∪ B′
- U′ = φ
- φ′ = U

**Symmetric Difference of Sets**

### If A and B are two sets, then the symmetric difference of A and B is denoted by A Δ B and is defined as A Δ B = (A - B) U (B - A). There is an alternate formula for the symmetric difference of sets Example of Symmetric Difference of Sets

Example:Let us consider two sets A = {1, 2, 4, 5, 8} and B = {3, 5, 6, 8, 9}. Then to find the symmetric difference of A and B,

**Step - 1:**Find A - B.

A - B = {1, 2, 4}**Step - 2:**Find B - A.

B - A = {3, 6, 9}**Step - 3:**Find A Δ B = (A - B) U (B - A).

A Δ B = (A - B) U (B - A) = {1, 2, 4} U {3, 6, 9} = {1, 2, 3, 4, 6, 9}

which says **A Δ B = (A ****∪**** B) - (A ∩ B). **Here is the Venn diagram of A Δ B.

### Symmetric difference between two sets in Venn Diagram

**A ****Δ ****B:** This is read as a **symmetric difference** **of set A and B**. This is a set which contains the elements which are either in set A or in set B but not in both (represented by the shaded region in fig. ).

** Symmetric difference** **between two sets**