Difference of Sets - Definition, Explanation, and Examples

The difference of two sets is an operation that finds elements that belong to one set but not the other. It is also called the relative complement.

Definition of Difference

The difference of sets A and B, denoted by AB, is the set of all elements that are in A but not in B.

Mathematically:

AB={x:xA and xB}

Understanding Difference

When we find the difference AB, we look for elements that belong to set A only, excluding any elements that are also in B.

Step-by-Step Explanation

1. List all elements of set A. 2. List all elements of set B. 3. Identify elements that are in A but not in B. 4. Form a new set with those elements.

Examples of Difference of Sets

Example 1: Numbers

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

Step 1: Elements of A: 1, 2, 3, 4. Step 2: Elements of B: 3, 4, 5, 6. Step 3: Elements in A but not in B: 1, 2. Step 4: Difference: AB={1,2}

Example 2: Letters

Let C={a,b,c} D={b,d,e}

Step 1: Elements of C: a, b, c. Step 2: Elements of D: b, d, e. Step 3: Elements in C but not in D: a, c. Step 4: Difference: CD={a,c}

Example 3: Students

Class 1 students: E={John,Emma,Liam} Class 2 students: F={Emma,Olivia,Noah}

Step 1: Elements of E: John, Emma, Liam. Step 2: Elements of F: Emma, Olivia, Noah. Step 3: Elements in E but not in F: John, Liam. Step 4: Difference: EF={John,Liam}

Important Note

The difference operation is not commutative, which means:

ABBA in general.

Summary

  • The difference of sets shows what is unique to the first set compared to the second.
  • It helps in identifying exclusive elements and is widely used in data analysis and logic.