The set that contains all of the items of two or more sets is called the union. The symbol “⋃” can be used to represent a Union of Sets. Assume that the union of two sets X and Y can be denoted by X⋃ Y.

As we all know, sets can be subjected to different types of operations, the most basic of which are as follows:

- Union of sets
- Intersection of sets
- Difference of sets

We conduct operations in mathematics such as addition, subtraction, multiplication, and so on. These operators usually take two or more operands and return a result based on the operation. In set theory, some Set Operations are typically done on two or more sets to produce a new set of elements based on the operation.

A union of two or more sets is an operation that produces a collection of elements that are present in both sets. However, this is not enough knowledge to help you obtain the union of sets in set theory.

On that note, let’s learn about the union operation on sets thoroughly.

## Union of Sets Definition

The set of items that are present in set X or set Y, or in both sets X and Y is equal to the union of two sets X and Y. The following is a representation of this operation:

X ∪ Y = {a: a ∈ X or a ∈ Y}

Consider the following example:

set A = {1, 3, 5 ,7} and set B = {1, 2, 4, 6} then;

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

## A Union B Formula

The set having all of the elements in sets A and B is equal to the set containing all of the elements in both sets. This is denoted by the letters A U B, which can be read as “A union B”.

The unions of sets A and B are usually calculated using the union B formula. Each element present in A or B (leaving duplicates) is present in A U B, according to the formula. The A union B formula can be expressed as follows, based on the concept of the union of sets:

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

## Number of Elements in A union B Formula

Consider two sets, A and B, and determine the number of items in the union of A and B as follows.

n(A U B) = n(A) – n(A ∩ B) + n(B)

Here,

n(A U B) = The cardinality of a set A U B is the total number of elements in it.

n(A) = The cardinality of a set A is the number of elements in it.

n(B) =The cardinality of set B is the number of elements in B.

n(A ∩ B) = The cardinality of set A B, i.e. an intersection B, is the number of elements that are common to both A and B.

## Properties of Union of Sets

### Commutative Law

The commutative law covers the union of two or more sets, for example, if we have two sets A and B.

A∪B=B∪A

Example: A = {a, b} and B = {b, c, d}

So, A∪B = {a, b, c, d}

B∪A = {b, c, d, a}

Since the group of elements is the same in both unions. As a result, it obeys the commutative law.

A ∪ B = B ∪ A

### Associative Law

The union operation follows the associative law, which states that if we have three sets A, B, and C, then

(A ∪ B) ∪ C = A ∪ (B ∪ C)

### Identity Law

The union of an empty set and any set A yields the set itself, that is,

A ∪ ∅ = A

Suppose, A = {a, b, c} and ∅ = {}

then, A ∪ ∅ = {a, b, c} ∪ {} = {a, b, c}

### Idempotent Law

Any set A union with itself yields the set A, i.e.,

A ∪ A = A

Let’s say, A = {1, 2, 3, 4, 5, 6}

then A ∪ A = {1, 2, 3, 4, 5, 6} ∪ {1, 2, 3, 4, 5, 6} = {1, 2, 3, 4, 5, 6} = A