**Union**

The union operation combines two sets into a single set that contains all the unique elements from both sets. If an element is present in either of the sets or both, it will be in the union.

**Definition**: The union of sets A and B, denoted by A U B, is the set of all elements that are in A, or in B, or in both.

**Example**: Consider two sets, A = {apple, banana, cherry} and B = {banana, cherry, date}. The union of these sets would be A U B = {apple, banana, cherry, date}. Notice how the repeated elements are listed only once in the union.

**Intersection**

The intersection operation identifies common elements between two sets. It creates a new set that contains only the elements that are present in both sets.

**Definition**: The intersection of sets A and B, represented by A ∩ B, is the set of elements that are in both A and B.

**Example**: Using the sets A and B from the previous example, the intersection would be the elements that both sets share. Thus, A ∩ B = {banana, cherry}.

**Difference**

The difference operation, as the name suggests, finds the difference between two sets. It creates a new set with elements that are in the first set but not in the second.

**Definition**: The difference between sets A and B, represented as A - B, is the set of elements that are in A but not in B.

**Example**: For sets A = {1, 2, 3, 4} and B = {3, 4, 5, 6}, the difference A - B would be the elements in A that are not in B, which gives {1, 2}.

**Complement**

The complement operation is slightly different from the others. It requires a reference set, often called the universal set. The complement of a set A with respect to this universal set is the set of all elements in the universal set that are not in A.

**Definition**: The complement of a set A, denoted by A' or Ac, with respect to the universal set U, is the set of all elements in U that are not in A.

**Example**: Consider a set A = {2, 4, 6} and a universal set U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. The complement of A with respect to U would be all the numbers in U that are not in A, which gives A' = {1, 3, 5, 7, 8, 9, 10}.

**Practical Applications**

Set operations are not just theoretical constructs; they have practical applications in various fields:

**Computer Science**: Algorithms often use set operations, especially in database queries where you might want to find common entries (intersection) or exclude certain entries (difference).**Biology**: When studying genes or species, scientists might use set operations to find common traits or differences.**Business**: Market analysts might use set operations to find common customers between two campaigns or to identify customers who bought one product but not another.

**Example Questions**

**Question**: In a survey of 100 people, 60 said they like tea, 50 said they like coffee, and 30 said they like both. How many like only tea?

**Answer**: To find out how many like only tea, we can use the principle of set difference. Let's denote the set of people who like tea as T and those who like coffee as C. Given:

- n(T) = 60
- n(C) = 50
- n(T ∩ C) = 30 (those who like both)

Using the principle of set difference: n(T only) = n(T) - n(T ∩ C) n(T only) = 60 - 30 = 30

Thus, 30 people like only tea.

**Question**: In a school of 500 students, 200 students take maths, 150 take science, and 50 take both maths and science. How many students don't take either of the subjects?

**Answer**: First, we find the number of students who take at least one of the subjects using the principle of union: n(M U S) = n(M) + n(S) - n(M ∩ S) n(M U S) = 200 + 150 - 50 = 300

Now, to find the number of students who don't take either subject, we subtract the above number from the total number of students: 500 - 300 = 200

Therefore, 200 students don't take either maths or science.

## FAQ

Disjoint sets are sets that have no elements in common. In other words, their intersection is an empty set. For example, if set A = {a, b, c} and set B = {x, y, z}, then A and B are disjoint because they share no common elements. Overlapping sets, on the other hand, have at least one element in common. If set C = {a, b, c, d} and set D = {c, d, e, f}, then C and D are overlapping sets because they both contain the elements c and d.

Yes, the difference between two sets can result in an empty set. The difference operation, denoted as A - B, gives us a new set containing elements that are in A but not in B. If all elements of set A are also present in set B, then the difference A - B will be an empty set. For instance, if A = {1, 2, 3} and B = {1, 2, 3, 4, 5}, then A - B = {} or the empty set.

The symmetric difference of two sets, often denoted as A Δ B, is the set of elements that are in either of the sets A or B, but not in their intersection. In other words, it's a combination of the differences of the two sets. Mathematically, A Δ B = (A - B) U (B - A). For example, if A = {1, 2, 3, 4} and B = {3, 4, 5, 6}, then the symmetric difference A Δ B = {1, 2, 5, 6}.

A subset is a set that contains only elements that are also found in another set, without any additional elements. For instance, if we have a set A = {1, 2, 3}, then {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, and {1, 2, 3} are all subsets of A. Notice that A is also a subset of itself. On the other hand, a proper subset is similar to a subset but cannot be the set itself. Using the previous example, while {1, 2, 3} is a subset of A, it is not a proper subset of A. All the other subsets mentioned are proper subsets.

Yes, some set operations are commutative. Specifically, the union and intersection operations are commutative. This means that for two sets A and B, the union A U B is the same as B U A, and the intersection A ∩ B is the same as B ∩ A. However, the difference operation is not commutative. For instance, A - B is not necessarily the same as B - A, unless both differences result in an empty set.

## Practice Questions

**70 students liked football.****55 students liked basketball.****20 students liked both football and basketball.**

**Using set operations, determine how many students did not like either of the two sports.**

Let's denote the set of students who like football as F and those who like basketball as B. From the given information:

- n(F) = 70
- n(B) = 55
- n(F ∩ B) = 20 (those who like both)

To find the number of students who liked at least one of the sports, we use the principle of union: n(F U B) = n(F) + n(B) - n(F ∩ B) n(F U B) = 70 + 55 - 20 = 105

Now, to determine the number of students who didn't like either sport, we subtract the above number from the total number of students: 120 - 105 = 15

Therefore, 15 students did not like either football or basketball.

**90 students liked rock.****60 students liked jazz.****The number of students who liked both rock and jazz was one-third of those who liked jazz.**

**Determine the number of students who liked only rock music.**

Let's represent the set of students who like rock as R and those who like jazz as J. From the information provided:

- n(R) = 90
- n(J) = 60
- n(R ∩ J) = 1/3 * n(J) = 1/3 * 60 = 20 (students who like both)

To find out how many students liked only rock, we can use the principle of set difference: n(R only) = n(R) - n(R ∩ J) n(R only) = 90 - 20 = 70

Thus, 70 students liked only rock music.

Rahil spent ten years working as private tutor, teaching students for GCSEs, A-Levels, and university admissions. During his PhD he published papers on modelling infectious disease epidemics and was a tutor to undergraduate and masters students for mathematics courses.