The difference of sets is one of the crucial set theory operations in mathematics. When grasping the operation of different sets and how they work, we cannot go without understanding the difference of two sets. In this article, we will learn the difference between two sets and their algebraic properties using examples.
Difference of Sets?
The difference of two sets A and B refers to the lists of all the items present in set A but do not exist in another set, the set B. We use the set notation to indicate the difference of sets A and B, that is, A – B or A\B.
How to Find the Difference of Two Sets?
To find the difference between the two sets, you need to keep this in mind:
If two sets are A and B, the difference is A – B and B – A.
Consider that you have to find the A – B set difference.
Now if, A = {3, 4, 5} and B = {5, 6, 7}, then the difference will be:
A – B = {3, 4} as A – B is when the elements of A are not there in set B.
Difference of Two Sets Example
We shall now take the help of an example of the difference of two sets to understand the set difference thoroughly.
Let us consider the following to check how the difference of two sets forms a new set.
A = {1, 2, 3} and B = {3, 4, 5}.
To find out the difference A – B in these two given sets, we will first note all the elements present in A and then remove the elements of A that also exist in the B set.
Now, as we can see that A and B share element 3, this ascertains that the set difference A – B = {1, 2}.
The Role of Order in the Difference of Two Sets
You get two different answers when you find the differences in 3 – 1 and 1 – 3. Just like that, you have to pay close attention to the order to calculate the set difference.
You cannot make any alterations to the order of the difference of the two given sets, as this will not give you the answer you are looking for. Mathematically, you can say that the set operation of the set difference is not commutative. Simply put,
it means that in sets A and B:
A – B is not equivalent to B – A.
Let us take the example mentioned above to understand this rule. We saw that the difference A – B in the two sets A = {1, 2, 3,} and B = {3, 4, 5} is A – B = {1, 2 }.
If you compare this difference to B – A, you need to navigate to the elements of B, which are 3, 4, 5, and remove 3 as it is common with A. By doing this, you will find this answer:
B – A = {4, 5} and thus, it is clear that A – B is not equal to B – A.
Properties of Difference of Sets
Take a look at the properties of sets for two sets A and B:
- A – A = ∅
- A – ∅ = A
- ∅ – A = ∅
- A – B = ∅ if A ⊂ B
- A – B = A if A ∩ B = ∅
- A – B = B – A = ∅ if A = B
- If A ⊂ B, then A – B = ∅
- n(A Δ B) = n(A – B) + n(B – A)
- n(A Δ B) = n(A U B) – n(A ∩ B)
The Complement of the Set
The complement of a set is for the set difference when the first set is universal. It means the elements of the universal set that are not present in set A. You can understand it with this expression: U – A. The complement of set A consists of elements that are there in A.
If, A = {2, 3, 4} and U = {2 ,3, 4, 5 6}, then the complement of A will be {5, 6}
The complement of the set is denoted using an apostrophe. For instance, if the set is A, then the complement of A will be expressed as A’.
Conclusion
Like the intersection of sets and the union of sets, the difference of sets plays a major role in set theory operation. As you traverse this topic more, you will find that it has wide applications over the fields of algebra, chemistry, physics, topology, computer and