## Sets

Sets are a collection of thing. Sets help us group things together so that we can understand the properties of what we are exploring. For example the list of planets in our solar system could be a set. When we say that, we would write our set like this:  Planets in our solar system = $\{$Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune$\}$.

And if we asked: is Mars in our solar system? All we have to do is look at our set and either say yes or no. Writing “planets in our solar system” is kind of long so, to save time, we write "$P$" instead. In our example of planets, when we wrote our planets, we used curly braces for the beginning and end of our set, and a comma (,) to separate each planet. When we talk about one planet in our set $P$, we call that an element. So "Mars" would be an element of our set $P$.

If we want to talk about only one element in our set, but we do not know what it is, we would give it a symbol, like $x$. Afterwards, we can say the "$x$ is a planet in our solar system."  This type of writing sets is called the set-roster notation. Think of a set like a family of things.

### Axiom of Extension

In sets, we do not care about how many times we write a specific element, nor do we care about the order in which we write it in. So, the only thing we care about are the elements themselves. This rule has a name, it is called the axiom of extension.

Lets look at an example: The set $P_1$, is the same at set  $P_2$: $$P_1 = \{Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune\} \\ P_2 = \{Venus, Earth, Jupiter, Mars, Earth, Saturn, Neptune, Mars, Uranus\} \\ P_1 = P_2$$

Why is $P_1$ the same as $P_2$? This is because the axiom of extension says that the elements are the only thing of value. The number of times they repeat in $P_1$ and $P_2$ does not matter.

Do the following questions as practice: $$A = \{a, b, c\} \\ B = \{b, c, a\} \\ C = \{a, a, a, b, b, b, c, a, c, b\}$$ Are sets $A$, $B$, and $C$ equal, why? Yes or No.

The answer is yes because of the axiom of extension rule says it is.

### Finite and Infinite Sets

There are two types of sets, finite sets, and infinite sets. Finite sets are like the sets we saw above where we can count the number of elements. For example, in the previous exercise, we can say that the set $A$, $B$, and $C$ have three elements.  The set $P$, above has 8 elements. We call this number the carnality of a set, and we symbolize it with the letter n.

So, when someone asks, what is the carnality of set $G = {x, y, z}$? Your response would be $n = 3$.

There is also an infinite set, a type of set that we get the carnality. This is because this set has infinite number of elements. For example, the set of all the numbers in the world are infinite. Why? Well this is because you can always count higher and never reach an endpoint.

Example: Is the set of all the people in the world a finite set or a infinite set?

The answer is finite because we can count the number of people. It may take a long time but we will come to the number of elements in that set, which is 7 billion.

## Set of Numbers

In mathematics, the most important set to us is the set of numbers. You will notice that different types of sets have different properties. For example, the number $-2$ is completely different from $2$. Because of this we define different types of sets.

The first set we will look at is the set of all positive integer numbers. The set of natural numbers are all the numbers from $0$ to infinity, and not counting any decimal number. The symbol used is $\mathbb{Z^{+}}$.

With these number we can do two mathematical operations, addition, and multiplication. When we add two positive integers we get a more positive number. For example, $2+2 = 4$.

We can generalise this type of pattern. We can say that adding two numbers equals another number, $a+b = c$. Here $a$, $b$, and $c$ are elements of the set $\mathbb{Z^+}$. We say $a$, $b$, and $c$ because we do not know which number we are going to pick.

When we multiply two positive integers we are just adding an integer by itself. For example $2 \cdot 2 = 2 + 2$, or $2 \cdot 3 = 2+2+2 = 3 + 3$. Here we are just adding a number to itself as many times as we want. So when we multiply any number in the set of positive integers, we get a larger positive integer back.

We can also generalise multiplication as well, $$a * b = a + a + a + .... + a (b times) \\ = b + b + b + ... + b (a times)$$ Here also, the symbols $a$, and $b$ are members of the positive integers.

When we subtract integers we write $a-b = c$ as well; however, we have two scenarios. Let's look at examples of these scenarios before we define them symbolically.

Example 1) $10 - 3 = 7$. Here $a = 10$, $b = -3$, and $c = 7$. So when we subtract a positive number by a smaller positive number we get a positive number.

Example 2) $2 - 10 = -8$. Here $a=2$, $b = 10$, and  $c = -8$. But when we subtract a small positive integer by a bigger positive integer we get a negative integer.

Due to this, we have to introduce another family of integers, the negative integers. This is another infinite that includes all the negative integers. This symbol for this is $\mathbb{Z^-}$.

Notice here, we have a mirror of the positive integers but there is only a negative sign attached to it. If we wanted a negative integer there is a mathematical operation we could perform to attain that number.

What would we do? When we multiply, a positive integer, by $-1$ we get the negative number of the same integer. For example, $-1 \cdot 2 = -2$, $-1 \cdot 100 = - 100$.

We can also generalise this, $$-a = -1 \cdot a$$ Here, $a$ is a positive integer.

Now that we have a good understanding of positive and negative numbers, lets see what happens when we do arithmetic operations. What if we tried to perform multiplication here: $-2 \cdot 3$. What does it mean to add the number $-2$, $3$ times. With this example, we add negative $2$ three times, \begin{align*} -2 + -2 + -2 = -2 - 2 - 2 = -6 \end{align*}

Practice 3) What if we had $-3 \cdot 2$, what would be the answer: -6, or 6.

The answer is -6 because, \begin{align*} -3 + -3 = -3 - 3 = -6 \end{align*} When we multiply a negative number by a positive number we get a more negative number, $$-a \cdot b = -c$$

Lets try multiplying two negative numbers, $-2 'cdot -3$. What does it mean to add the number $-2$, negative $3$ times. It does not make sense to multiply that way, instead we will try to user our previous rules to solve this problem. What is negative $24, it is just$-1 \cdot 2. So we can say, \begin{align*} -1 \cdot 2 \cdot -1 \cdot 3 = -1 \cdot -1 \cdot 2 \cdot 3 \end{align*} Here, I will add some brackets to make things much simpler, \begin{align*} (-1 \cdot -1) \cdot (2 \cdot 3) = (-1 \cdot -1) \cdot (6) \end{align*} Above we said that-1 \cdot a = -a$, but what is$-1 \cdot -1 \cdot a$? why? The answer is$1$, because when you multiply a negative integer by a negative integer you get a positive integer. Its like turning$360$degrees. You are back to where you started. In your first step you multiply by negative$14 to get a negative number, but then you multiply again to undo what you did before.

We can also write a rule with this, $$-1(-a) = a$$

Should you memorise these equations? No! You should do some practice so you can understand them. In mathematics, when you try to memorise a concept, it is a good sign that you do not understand the concept, and for that reason, you need to revisit the parts that you are confused about.