At my friend's high school there are $740$ students. Among these:
- $300$ study maths
- $200$ study science
- $160$ study medicine
- $110$ study math and science
- $90$ study math and medicine
- $40$ study all three subjects
- $320$ don't study any of these subjects
How many students are studying science and medicine?
This problem is quite tricky to wrap one’s head around. Just among the $300$ math students, there will be some who study only math, some only math and science, some only math and medicine, and some who study all three subjects. There are so many overlaps between the three subjects that we easily might count the same student twice. In this lesson, you’ll learn a simple technique for breaking down these types of problems so you can solve them with ease!
A set is a collection of objects. The European countries, all positive integers or the objects on your desk are three examples of different sets. A set is typically defined by placing all objects within curly brackets and separating them with commas. The set of all odd digits can therefore be denoted in the following way:
$$\{1, 3, 5, 7, 9 \}$$
Some sets, like all European countries, are too long to be written in this way. We can denote this set as:
{$x:x$ is a country in Europe}
Although this way is shorter compared to listing all the countries one at a time, it is still laborious to write {$x:x$ is a country in Europe}. We can solve this by naming the set. We could define $L$ as the set of all European countries, and whenever we want to refer to that set we just write $L$. All common types of numbers already have given names because we refer to these sets so often. Each such set of numbers is symbolized by a capitalized letter as follows:
- $\mathbb{N}$: The natural numbers
- $\mathbb{Z}$: The integers
- $\mathbb{Q}$: The rational numbers
- $\mathbb{R}$: The real numbers
- $\mathbb{C}$: The complex numbers
Note! Some sources include $0$ in the natural numbers while other sources do not. The most common definition is that $0$ is included in the set $\mathbb{N}$, but to be extra clear it is good to write $\mathbb{N} _0$ to indicate if the set includes $0$. If not, we can express this as $\mathbb{N } _1$ or $\mathbb{N } _+$.
An object in a set is called an element. For example, $3$ is an element in the set $\{1, 3, 5, 7, 9 \}$. When an element $x$ belongs to the set $A$ we can write this as $x \in A$. When an element $y$ does not belong to the set $A$, we write it as $y \notin A$. If we want to say that $x$ is a real number, we can express it in the more concise form $x \in \mathbb{R}$.
Finally, we can express the number of elements in the set $A$ as $|A|$. The number of elements which the set contains is called the cardinality of the set. For example, the set of all Scandinavian countries has cardinality $5$ because the set consists of five countries: Norway, Sweden, Finland, Denmark and Iceland. Sometimes the cardinality of a set $A$ is also denoted as $n(A)$ but $|A|$ is the most common way to write it.
If all elements in the set $B$ are also present in the set $A$, we say that $B$ is a subset of $A$. We denote this as $B \subseteq A$. Thus, $\{3, 1 \} \subseteq\{1, 3, 5, 7, 9 \}$. A set is just a collection of objects so the order we list them in does not matter. Since a set $A$ contains all the elements in $A$, it is generally true that $A$ is a subset of itself.
A set that doesn’t contain any elements is called the empty set and is denoted as $\{\}$ or, more commonly, with the symbol $\varnothing$. The empty set is a subset of all other sets.