# Set Operations – Formulas, Properties & Examples

In sets the operations are similar to the fundamental operations you perform with numbers. In the case of sets also, there are some basic operations. These operations are called set operations. There are four main set operations which include the union of sets, the intersection of sets, the complement of sets, and the difference of sets.

Let’s understand these set operations, their notations, and their properties with examples.

## What Are Set Operations?

Set operations are the operations that are applied to two or more sets to get a resultant set. The following are the four main types of basic set operations.

• Union of Sets
• Intersection of Sets
• Complement of a Set
• Difference Between Sets

### Union of Sets

For any two given sets $\text{A}$ and $\text{B}$, $\text{A} \cup \text{B}$ (read as $\text{A}$ union $\text{B}$) is the set of distinct elements that belong to set $\text{A}$ and set $\text{A}$ or both.

This operation can be represented as $\text{A} \cup \text{B} = {x: x \in \text{A} \text{ or } x \in \text{B}}$.

The formula for the number of elements in $\text{A} \cup \text{B}$ is given by $n \left( \text{A} \cup \text{B} \right) = n(\text{A}) + n(\text{B}) − n(\text{A} \cap \text{B})$, where $n(\text{A})$, $n(\text{B})$, and $n(\text{A} \cap \text{B})$ are respectively the number of elements in sets $\text{A}$, $\text{B}$, and $\text{A} \cap \text{B}$.

#### Examples on Union of Sets

Example 1: Given $\text{A}= \{1, 3, 5, 7 \}$, and $\text{B}= \{2, 4, 6, 8 \}$, find $\text{A} \cup \text{B}$.

$\text{A}= \{1, 3, 5, 7 \}$ and $\text{B}= \{2, 4, 6, 8 \}$

$\text{A} \cup \text{B} = \{1, 3, 5, 7 \} \cup \{2, 4, 6, 8 \}$

$\{1, 3, 5, 7, 2, 4, 6, 8 \} = \{1, 2, 3, 4, 5, 6, 7, 8 \}$

Example 2: Given $\text{X}= \{2, 5, 9, 13 \}$, and $\text{Y}= \{4, 5, 13, 19 \}$, find $\text{X} \cup \text{Y}$.

$\text{X}= \{2, 5, 9, 13 \}$, and $\text{Y}= \{4, 5, 13, 19 \}$

$\text{X} \cup \text{Y} = \{2, 5, 9, 13 \} \cup \{4, 5, 13, 19 \}$

$= \{2, 5, 9, 13, 4, 19 \} = \{2, 4, 5, 9, 13, 19 \}$

Note: The common elements of the two sets are written only once.

Example 3: Given $\text{A}= \{2, 4, 6, 8, 10 \}$, $\text{B}= \{3, 6, 9, 12, 15 \}$, and  $\text{C}= \{4, 8, 12, 16, 20 \}$, find $\text{A} \cup \text{B} \cup \text{C}$.

$\text{A}= \{2, 4, 6, 8, 10 \}$, $\text{B}= \{3, 6, 9, 12, 15 \}$, and  $\text{C}= \{4, 8, 12, 16, 20 \}$

$\text{A} \cup \text{B} \cup \text{C} = \{2, 4, 6, 8, 10 \} \cup \{3, 6, 9, 12, 15 \} \cup \{4, 8, 12, 16, 20 \}$

$= \{2, 4, 6, 8, 10, 3, 9, 12, 15, 16, 20 \} = \{2, 3, 4, 6, 8, 9, 10, 12, 15, 16, 20 \}$

### Intersection of Sets

For any two given sets $\text{A}$ and $\text{B}$, $\text{A} \cap \text{B}$ (read as $\text{A}$ intersection $\text{B}$) is the set of common elements that belong to set $\text{A}$ and $\text{A}$.

This operation can represented by $\text{A} \cap \text{B} = \{x : x \in \text{A} \text{ and } x \in \text{B} \}$.

The formula for the number of elements in $\text{A} \cap \text{B}$ is given by $n\left( \text{A} \cap \text{B} \right) = n(\text{A})+n(\text{B})−n(\text{A} \cup \text{B})$, where $n(\text{A})$, $n(\text{B})$, and $n(\text{A} \cup \text{B})$ are respectively the number of elements in sets $\text{A}$, $\text{B}$, and $\text{A} \cup \text{B}$.

#### Examples on Intersection of Sets

Example 1: Given $\text{A}= \{1, 3, 5, 7 \}$, and $\text{B}= \{2, 4, 6, 8 \}$, find $\text{A} \cap \text{B}$.

$\text{A}= \{1, 3, 5, 7 \}$ and $\text{B}= \{2, 4, 6, 8 \}$

$\text{A} \cap \text{B} = \{1, 3, 5, 7 \} \cap \{2, 4, 6, 8 \} = {}$ or $\left( \phi \right)$

Note: There is no common element in the two sets.

Example 2: Given $\text{X}= \{2, 5, 9, 13 \}$, and $\text{Y}= \{4, 5, 13, 19 \}$, find $\text{X} \cap \text{Y}$.

$\text{X}= \{2, 5, 9, 13 \}$, and $\text{Y}= \{4, 5, 13, 19 \}$

$\text{X} \cup \text{Y} = \{2, 5, 9, 13 \} \cap \{4, 5, 13, 19 \} = \{5, 13 \}$.

### Complement of a Set

The complement of a set $\text{A}$ denoted as $\text{A}^{′}$ or $\text{A}^{c}$ (read as $\text{A}$ complement) is defined as the set of all the elements in the given universal set $\left(\text{U} \right)$ that are not present in set $\text{A}. This operation can be represented as$\text{A}^{’} = \text{U} – \text{A}$, where$\text{U}$is a universal set for the set$\text{A}$. The formula for the number of elements in$\text{A}$complement is given by$n\left(\text{A}^{′} \right) = n(\text{U}) – n(\text{A})$, where$n(\text{A})$and$n(\text{U})$are resoectively the number of elements in set$\text{A}$and universal set. #### Examples of Complement of a Set Example 1: If$\text{U} = \{1, 2, 3, 4, 5, 6, 7, 8, 9 \}$and$\text{A} = \{1, 2, 3, 4 \}$, then the complement of set$\text{A}$is given by$\text{A}^{‘} = \{5, 6, 7, 8, 9 \}$. Example 2: If the set of natural numbers$\text{N}$is a universal set and$\text{E}$is the set of even numbers, then the complement of$\text{E}$is$\text{O}$, i.e., set of odd numbers.$\text{U} = \{x : x \text{ is a natural number } \}$, and$\text{E} = \{x : x \text{ is an even number } \}$, then$\text{E}^{’} = \{x : x \text{ is an odd number } \}$. ### Difference Between Sets The set operation difference between sets implies subtracting the elements from a set which is similar to the concept of the difference between numbers. The difference between sets$\text{A}$and set$\text{B}$denoted as$\text{A} − \text{B}$lists all the elements that are in set$\text{A}$but not in set$\text{B}.

This operation can be represented as $\text{A} − \text{B} = \text{A} \cap \text{B}’$.

#### Examples of Difference Between Sets

Example 1: If $\text{A} = \{1, 2, 3, 4 \}$ and $\text{B} = \{3, 4, 5, 7 \}$, then the difference between sets $\text{A}$ and $\text{B}$ is given by $\text{A} – \text{B} = \{1, 2 \}$.

Example 2: If $\text{A} = \{1, 2, 3, 4 \}$ and $\text{B} = \{3, 4, 5, 7 \}$, then the difference between sets $\text{B}$ and $\text{A}$ is given by $\text{B} – \text{A} = \{5, 7 \}$.

## Properties of Set Operations

The following are the important properties of set operations.

Commutative Law: The commutative law of sets is similar to that of the commutative law of numbers. In the case of sets the commutative law is followed by the operations union and intersection.

• Commutative Law of Union of Sets: The set operation of the union of two sets is commutative. For any two given sets $\text{A}$ and $\text{B}$, the commutative law of union of sets is defined as $\text{A} \cup \text{B} = \text{B} \cup \text{A}$.
• Commutative Law of Intersection of Sets: The set operation of the intersection of two sets is commutative. For any two given sets $\text{A}$ and $\text{B}$, the commutative law of intersection of sets is defined as $\text{A} \cap \text{B} = \text{B} \cap \text{A}$.

Associative Law: The associative law of sets is similar to that of the associative law of numbers. In the case of sets the associative law is followed by the operations union and intersection.

• Associative Law of Union of Sets: For any three given sets $\text{A}$, $\text{B}$ and $\text{C}$ the associative law of union is defined as $(\text{A} \cup \text{B}) \cup \text{C} = \text{A} \cup (\text{B} \cup \text{C})$
• Associative Law of Intersection of Sets: For any three given sets $\text{A}$, $\text{B}$ and $\text{C}$ the associative law of intersection is defined as $(\text{A} \cap \text{B}) \cap \text{C} = \text{A} \cap (\text{B} \cap \text{C})$.

Distributive Law: The distributive law of sets is similar to that of the distributive law of numbers. In the case of sets the distributive law is followed by the operations union and intersection.

• Distributive Law of Union Over Intersection: For any three given sets $\text{A}$, $\text{B}$ and $\text{C}$, the distributive law of union over intersection is defined as $\text{A} \cup (\text{B} \cap \text{C}) = (\text{A} \cup \text{B}) \cap (\text{A} \cup \text{C})$.
• Distributive Law of Intersection Over Union: For any three given sets $\text{A}$, $\text{B}$ and $\text{C}$, the distributive law of intersection over union is defined as $\text{A} \cap (\text{B} \cup \text{C}) = (\text{A} \cap \text{B}) \cup (\text{A} \cap \text{C})$.

## Conclusion

Set operations are the operations that are applied to two or more sets to get a resultant set. The four main types of basic set operations are Union of Sets, Intersection of Sets, Complement of a Set, and Difference Between Sets.