# Introduction to Abstract Algebra/Lecture 2
## Last Time

In our last lecture, we briefly reviewed set theory and plunged head-long into equivalence relations and equivalence classes. In this lecture, we will continue our discussion on equivalence relations and classes and also introduce mappings. Problem set exercises will be posted at the end of the lecture.

## Equivalence relations and classes (cont.)

Recall: A relation ~ on a set A is called an equivalence relation if:
1): a ~ a $\forall a\in A$. 2): If a ~ b $\Rightarrow$ b ~ a. 3): If a ~ b and b ~ c, $\Rightarrow$ a ~ c.
Following from the equivalence relation, the equivalence class cl(a) for $a\in A$ is defined to be: cl(a) = {$b\in A|$a~b} = {$b\in A|$b~a}. These two statements are equivalent. It's a matter of preference to which one you use. Now for a lemma.
Lemma: Let ~ be an equivalence relation on A for $\forall a,b\in A$. Then either $cl(a)\cap cl(b)$ = $\emptyset$ or $cl(a)=cl(b)$.
This statement says that either cl(a) and cl(b) share no elements or that they are the same. Let's prove it.
    Proof: Suppose $cl(a)\cap cl(b)=\emptyset$. If that's the case, we can go home. There's nothing to prove. Suppose $cl(a)\cap cl(b)\neq \emptyset$. Let $c\in cl(a)\cap cl(b)$. We are going to show that $cl(a)\subseteq cl(b)$. Let $x\in cl(a)$. This imples that x ~ a. Since c $\in$ cl(a), a~c. This implies that x ~ c. Also, $c\in cl(b)$, this implies that c ~ b, which implies x ~ b. . Hence, $cl(a)\subseteq cl(b)$. By a similar argument, we can show $cl(b)\subseteq cl(a)$. Hence, $cl(a)=cl(b)$ $\square$.
Theorem: Let ~ be an equivalence relation on A. Then the disjoint equivalence classes give a partition on A.
In other words, this means that the set A is a disjoint union of different equivalence classes.
Remark: Let {$A_{\alpha }|\alpha \in I$} be a partition on A. Define a relation on A such that a ~ b if and only if $a,b\in A_{\alpha }$ for some $\alpha \in I$. Then ~ is an equivalence relation. The distinct equivalence classes are exactly {$A_{\alpha }|\alpha \in I$}.
That ends our discussion on equivalence relations and classes for now. We will return to the topic in a later lecture.

## Mappings
### Introduction

Our focus now moves to mappings. Mappings will be a integral part of our study, particularly when we move into group theory. You have studied maps for quite a while, probably without realizing it. They are very familiar; you probably know them as 'functions.'

### Some definitions

Definition: Let A,B be sets. A map f from A to B is a correspondence from A to B, denoted by $f:A\rightarrow B$.
Here, an element $a\in A$ is being mapped by the rule f, to $f(a)\in B$.
Definition: Let $f:A\rightarrow B$ be a map. f is injective or one-to-one (1:1) if $a_{1},a_{2}\in A$ such that $f(a_{1})=f(a_{2})\Rightarrow a_{1}=a_{2}$. This means that every element in A is sent to a unique element in B.
Example: $f:\mathbb {R} \rightarrow \mathbb {R}$ such that f(x) = $x^{2}$. This is not a 1:1 map because 1 $\neq$ -1 but f(1) = f(-1) = 1
Definition: f is surjective or onto if $\forall b\in B$, $\exists a\in A$ such that b = f(a). This means that if f is mapping elements from A to B, every element in B has an element from A mapping to it. Another way to put this is that every element in B 'gets hit.'
Example: $f:\mathbb {R} \rightarrow \mathbb {R}$ such that f(x) = $x^{2}$. $\forall x\in \mathbb {R}$, f(x) = $x^{2}$ $\neq$ -1. $\Rightarrow$ f is not onto. None of the negative numbers are hit in the image.
Definition: f is a one-to-one correspondence or bijection if f is both injective and surjective.

### Examples

Example: Let $f:A\rightarrow B$ such that A = {1,2,3,...}, B = {2,3,4,...}. Then $f(n)\rightarrow n+1$ is a bijection.
Example: Let $f:\mathbb {R} \rightarrow \mathbb {R} ^{+}$ such that f(x) = $x^{2}$. f is onto but not 1:1. So f is not a bijection.
Example: Let $f:\mathbb {Z} \rightarrow 2\mathbb {Z}$ such that f(n) = 2n. This is a bijection.
Example: The Identity Map, $Id_{a}:A\rightarrow A$ is a bijection. We will make extensive use of the identity map later on.

## Next Time

In our next lecture, we will cover the composition of maps and cover some number theory that will be important to us later on. Please see the associated problem set for exercise related to this lecture.