Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132930 views
License: OTHER
Kernel:
%%html <link href="http://mathbook.pugetsound.edu/beta/mathbook-content.css" rel="stylesheet" type="text/css" /> <link href="https://aimath.org/mathbook/mathbook-add-on.css" rel="stylesheet" type="text/css" /> <style>.subtitle {font-size:medium; display:block}</style> <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic" rel="stylesheet" type="text/css" /> <link href="https://fonts.googleapis.com/css?family=Inconsolata:400,700&subset=latin,latin-ext" rel="stylesheet" type="text/css" /><!-- Hide this cell. --> <script> var cell = $(".container .cell").eq(0), ia = cell.find(".input_area") if (cell.find(".toggle-button").length == 0) { ia.after( $('<button class="toggle-button">Toggle hidden code</button>').click( function (){ ia.toggle() } ) ) ia.hide() } </script>

Important: to view this notebook properly you will need to execute the cell above, which assumes you have an Internet connection. It should already be selected, or place your cursor anywhere above to select. Then press the "Run" button in the menu bar above (the right-pointing arrowhead), or press Shift-Enter on your keyboard.

ParseError: KaTeX parse error: \newcommand{\lt} attempting to redefine \lt; use \renewcommand

Section1.2Sets and Equivalence Relations

SubsectionSet Theory

A is a well-defined collection of objects; that is, it is defined in such a manner that we can determine for any given object xx whether or not xx belongs to the set. The objects that belong to a set are called its or . We will denote sets by capital letters, such as AA or X;X\text{;} if aa is an element of the set A,A\text{,} we write aA.a \in A\text{.}

A set is usually specified either by listing all of its elements inside a pair of braces or by stating the property that determines whether or not an object xx belongs to the set. We might write

X={x1,x2,,xn}\begin{equation*} X = \{ x_1, x_2, \ldots, x_n \} \end{equation*}

for a set containing elements x1,x2,,xnx_1, x_2, \ldots, x_n or

X={x:x satisfies P}\begin{equation*} X = \{ x :x \text{ satisfies }{\mathcal P}\} \end{equation*}

if each xx in XX satisfies a certain property P.{\mathcal P}\text{.} For example, if EE is the set of even positive integers, we can describe EE by writing either

E={2,4,6,}orE={x:x is an even integer and x>0}.\begin{equation*} E = \{2, 4, 6, \ldots \} \quad \text{or} \quad E = \{ x : x \text{ is an even integer and } x \gt 0 \}. \end{equation*}

We write 2E2 \in E when we want to say that 2 is in the set E,E\text{,} and 3E-3 \notin E to say that 3-3 is not in the set E.E\text{.}

Some of the more important sets that we will consider are the following:

N={n:n is a natural number}={1,2,3,};Z={n:n is an integer}={,1,0,1,2,};Q={r:r is a rational number}={p/q:p,qZ where q0};R={x:x is a real number};C={z:z is a complex number}.\begin{gather*} {\mathbb N} = \{n: n \text{ is a natural number}\} = \{1, 2, 3, \ldots \};\\ {\mathbb Z} = \{n : n \text{ is an integer} \} = \{\ldots, -1, 0, 1, 2, \ldots \};\\ {\mathbb Q} = \{r : r \text{ is a rational number}\} = \{p/q : p, q \in {\mathbb Z} \text{ where } q \neq 0\};\\ {\mathbb R} = \{ x : x \text{ is a real number} \};\\ {\mathbb C} = \{z : z \text{ is a complex number}\}. \end{gather*}

We can find various relations between sets as well as perform operations on sets. A set AA is a of B,B\text{,} written ABA \subset B or BA,B \supset A\text{,} if every element of AA is also an element of B.B\text{.} For example,

{4,5,8}{2,3,4,5,6,7,8,9}\begin{equation*} \{4,5,8\} \subset \{2, 3, 4, 5, 6, 7, 8, 9 \} \end{equation*}

and

NZQRC.\begin{equation*} {\mathbb N} \subset {\mathbb Z} \subset {\mathbb Q} \subset {\mathbb R} \subset {\mathbb C}. \end{equation*}

Trivially, every set is a subset of itself. A set BB is a of a set AA if BAB \subset A but BA.B \neq A\text{.} If AA is not a subset of B,B\text{,} we write A⊄B;A \notsubset B\text{;} for example, {4,7,9}⊄{2,4,5,8,9}.\{4, 7, 9\} \notsubset \{2, 4, 5, 8, 9 \}\text{.} Two sets are , written A=B,A = B\text{,} if we can show that ABA \subset B and BA.B \subset A\text{.}

It is convenient to have a set with no elements in it. This set is called the and is denoted by .\emptyset\text{.} Note that the empty set is a subset of every set.

To construct new sets out of old sets, we can perform certain operations: the ABA \cup B of two sets AA and BB is defined as

AB={x:xA or xB};\begin{equation*} A \cup B = \{x : x \in A \text{ or } x \in B \}; \end{equation*}

the of AA and BB is defined by

AB={x:xA and xB}.\begin{equation*} A \cap B = \{x : x \in A \text{ and } x \in B \}. \end{equation*}

If A={1,3,5}A = \{1, 3, 5\} and B={1,2,3,9},B = \{ 1, 2, 3, 9 \}\text{,} then

AB={1,2,3,5,9}andAB={1,3}.\begin{equation*} A \cup B = \{1, 2, 3, 5, 9 \} \quad \text{and} \quad A \cap B = \{ 1, 3 \}. \end{equation*}

We can consider the union and the intersection of more than two sets. In this case we write

i=1nAi=A1An\begin{equation*} \bigcup_{i = 1}^{n} A_{i} = A_{1} \cup \ldots \cup A_n \end{equation*}

and

i=1nAi=A1An\begin{equation*} \bigcap_{i = 1}^{n} A_{i} = A_{1} \cap \ldots \cap A_n \end{equation*}

for the union and intersection, respectively, of the sets A1,,An.A_1, \ldots, A_n\text{.}

When two sets have no elements in common, they are said to be ; for example, if EE is the set of even integers and OO is the set of odd integers, then EE and OO are disjoint. Two sets AA and BB are disjoint exactly when AB=.A \cap B = \emptyset\text{.}

Sometimes we will work within one fixed set U,U\text{,} called the . For any set AU,A \subset U\text{,} we define the of A,A\text{,} denoted by A,A'\text{,} to be the set

A={x:xU and xA}.\begin{equation*} A' = \{ x : x \in U \text{ and } x \notin A \}. \end{equation*}

We define the of two sets AA and BB to be

AB=AB={x:xA and xB}.\begin{equation*} A \setminus B = A \cap B' = \{ x : x \in A \text{ and } x \notin B \}. \end{equation*}
Example1.1

Let R{\mathbb R} be the universal set and suppose that

A={xR:0<x3}andB={xR:2x<4}.\begin{equation*} A = \{ x \in {\mathbb R} : 0 \lt x \leq 3 \} \quad \text{and} \quad B = \{ x \in {\mathbb R} : 2 \leq x \lt 4 \}. \end{equation*}

Then

AB={xR:2x3}AB={xR:0<x<4}AB={xR:0<x<2}A={xR:x0 or x>3}.\begin{align*} A \cap B & = \{ x \in {\mathbb R} : 2 \leq x \leq 3 \}\\ A \cup B & = \{ x \in {\mathbb R} : 0 \lt x \lt 4 \}\\ A \setminus B & = \{ x \in {\mathbb R} : 0 \lt x \lt 2 \}\\ A' & = \{ x \in {\mathbb R} : x \leq 0 \text{ or } x \gt 3 \}. \end{align*}
Proposition1.2

Let A,A\text{,} B,B\text{,} and CC be sets. Then

  1. AA=A,A \cup A = A\text{,} AA=A,A \cap A = A\text{,} and AA=;A \setminus A = \emptyset\text{;}

  2. A=AA \cup \emptyset = A and A=;A \cap \emptyset = \emptyset\text{;}

  3. A(BC)=(AB)CA \cup (B \cup C) = (A \cup B) \cup C and A(BC)=(AB)C;A \cap (B \cap C) = (A \cap B) \cap C\text{;}

  4. AB=BAA \cup B = B \cup A and AB=BA;A \cap B = B \cap A\text{;}

  5. A(BC)=(AB)(AC);A \cup (B \cap C) = (A \cup B) \cap (A \cup C)\text{;}

  6. A(BC)=(AB)(AC).A \cap (B \cup C) = (A \cap B) \cup (A \cap C)\text{.}

Proof

We will prove (1) and (3) and leave the remaining results to be proven in the exercises.

(1) Observe that

AA={x:xA or xA}={x:xA}=A\begin{align*} A \cup A & = \{ x : x \in A \text{ or } x \in A \}\\ & = \{ x : x \in A \}\\ & = A \end{align*}

and

AA={x:xA and xA}={x:xA}=A.\begin{align*} A \cap A & = \{ x : x \in A \text{ and } x \in A \}\\ & = \{ x : x \in A \}\\ & = A. \end{align*}

Also, AA=AA=.A \setminus A = A \cap A' = \emptyset\text{.}

(3) For sets A,A\text{,} B,B\text{,} and C,C\text{,}

A(BC)=A{x:xB or xC}={x:xA or xB, or xC}={x:xA or xB}C=(AB)C.\begin{align*} A \cup (B \cup C) & = A \cup \{ x : x \in B \text{ or } x \in C \}\\ & = \{ x : x \in A \text{ or } x \in B, \text{ or } x \in C \}\\ & = \{ x : x \in A \text{ or } x \in B \} \cup C\\ & = (A \cup B) \cup C. \end{align*}

A similar argument proves that A(BC)=(AB)C.A \cap (B \cap C) = (A \cap B) \cap C\text{.}

Theorem1.3De Morgan's Laws

Let AA and BB be sets. Then

  1. (AB)=AB;(A \cup B)' = A' \cap B'\text{;}

  2. (AB)=AB.(A \cap B)' = A' \cup B'\text{.}

Proof

(1) If AB=,A \cup B = \emptyset\text{,} then the theorem follows immediately since both AA and BB are the empty set. Otherwise, we must show that (AB)AB(A \cup B)' \subset A' \cap B' and (AB)AB.(A \cup B)' \supset A' \cap B'\text{.} Let x(AB).x \in (A \cup B)'\text{.} Then xAB.x \notin A \cup B\text{.} So xx is neither in AA nor in B,B\text{,} by the definition of the union of sets. By the definition of the complement, xAx \in A' and xB.x \in B'\text{.} Therefore, xABx \in A' \cap B' and we have (AB)AB.(A \cup B)' \subset A' \cap B'\text{.}

To show the reverse inclusion, suppose that xAB.x \in A' \cap B'\text{.} Then xAx \in A' and xB,x \in B'\text{,} and so xAx \notin A and xB.x \notin B\text{.} Thus xABx \notin A \cup B and so x(AB).x \in (A \cup B)'\text{.} Hence, (AB)AB(A \cup B)' \supset A' \cap B' and so (AB)=AB.(A \cup B)' = A' \cap B'\text{.}

The proof of (2) is left as an exercise.

Example1.4

Other relations between sets often hold true. For example,

(AB)(BA)=.\begin{equation*} ( A \setminus B) \cap (B \setminus A) = \emptyset. \end{equation*}

To see that this is true, observe that

(AB)(BA)=(AB)(BA)=AABB=.\begin{align*} ( A \setminus B) \cap (B \setminus A) & = ( A \cap B') \cap (B \cap A')\\ & = A \cap A' \cap B \cap B'\\ & = \emptyset. \end{align*}

SubsectionCartesian Products and Mappings

Given sets AA and B,B\text{,} we can define a new set A×B,A \times B\text{,} called the of AA and B,B\text{,} as a set of ordered pairs. That is,

A×B={(a,b):aA and bB}.\begin{equation*} A \times B = \{ (a,b) : a \in A \text{ and } b \in B \}. \end{equation*}
Example1.5

If A={x,y},A = \{ x, y \}\text{,} B={1,2,3},B = \{ 1, 2, 3 \}\text{,} and C=,C = \emptyset\text{,} then A×BA \times B is the set

{(x,1),(x,2),(x,3),(y,1),(y,2),(y,3)}\begin{equation*} \{ (x, 1), (x, 2), (x, 3), (y, 1), (y, 2), (y, 3) \} \end{equation*}

and

A×C=.\begin{equation*} A \times C = \emptyset. \end{equation*}

We define the to be

A1××An={(a1,,an):aiAi for i=1,,n}.\begin{equation*} A_1 \times \cdots \times A_n = \{ (a_1, \ldots, a_n): a_i \in A_i \text{ for } i = 1, \ldots, n \}. \end{equation*}

If A=A1=A2==An,A = A_1 = A_2 = \cdots = A_n\text{,} we often write AnA^n for A××AA \times \cdots \times A (where AA would be written nn times). For example, the set R3{\mathbb R}^3 consists of all of 3-tuples of real numbers.

Subsets of A×BA \times B are called . We will define a or fA×Bf \subset A \times B from a set AA to a set BB to be the special type of relation where (a,b)f(a, b) \in f if for every element aAa \in A there exists a unique element bB.b \in B\text{.} Another way of saying this is that for every element in A,A\text{,} ff assigns a unique element in B.B\text{.} We usually write f:ABf:A \rightarrow B or AfB.A \stackrel{f}{\rightarrow} B\text{.} Instead of writing down ordered pairs (a,b)A×B,(a,b) \in A \times B\text{,} we write f(a)=bf(a) = b or f:ab.f : a \mapsto b\text{.} The set AA is called the of ff and

f(A)={f(a):aA}B\begin{equation*} f(A) = \{ f(a) : a \in A \} \subset B \end{equation*}

is called the or of f.f\text{.} We can think of the elements in the function's domain as input values and the elements in the function's range as output values.

Figure1.6Mappings and relations
Example1.7

Suppose A={1,2,3}A = \{1, 2, 3 \} and B={a,b,c}.B = \{a, b, c \}\text{.} In Figure 1.6 we define relations ff and gg from AA to B.B\text{.} The relation ff is a mapping, but gg is not because 1A1 \in A is not assigned to a unique element in B;B\text{;} that is, g(1)=ag(1) = a and g(1)=b.g(1) = b\text{.}

Given a function f:AB,f : A \rightarrow B\text{,} it is often possible to write a list describing what the function does to each specific element in the domain. However, not all functions can be described in this manner. For example, the function f:RRf: {\mathbb R} \rightarrow {\mathbb R} that sends each real number to its cube is a mapping that must be described by writing f(x)=x3f(x) = x^3 or f:xx3.f:x \mapsto x^3\text{.}

Consider the relation f:QZf : {\mathbb Q} \rightarrow {\mathbb Z} given by f(p/q)=p.f(p/q) = p\text{.} We know that 1/2=2/4,1/2 = 2/4\text{,} but is f(1/2)=1f(1/2) = 1 or 2? This relation cannot be a mapping because it is not well-defined. A relation is if each element in the domain is assigned to a unique element in the range.

If f:ABf:A \rightarrow B is a map and the image of ff is B,B\text{,} i.e., f(A)=B,f(A) = B\text{,} then ff is said to be or . In other words, if there exists an aAa \in A for each bBb \in B such that f(a)=b,f(a) = b\text{,} then ff is onto. A map is or if a1a2a_1 \neq a_2 implies f(a1)f(a2).f(a_1) \neq f(a_2)\text{.} Equivalently, a function is one-to-one if f(a1)=f(a2)f(a_1) = f(a_2) implies a1=a2.a_1 = a_2\text{.} A map that is both one-to-one and onto is called .

Example1.8

Let f:ZQf:{\mathbb Z} \rightarrow {\mathbb Q} be defined by f(n)=n/1.f(n) = n/1\text{.} Then ff is one-to-one but not onto. Define g:QZg : {\mathbb Q} \rightarrow {\mathbb Z} by g(p/q)=pg(p/q) = p where p/qp/q is a rational number expressed in its lowest terms with a positive denominator. The function gg is onto but not one-to-one.

Given two functions, we can construct a new function by using the range of the first function as the domain of the second function. Let f:ABf : A \rightarrow B and g:BCg : B \rightarrow C be mappings. Define a new map, the of ff and gg from AA to C,C\text{,} by (gf)(x)=g(f(x)).(g \circ f)(x) = g(f(x))\text{.}

Figure1.9Composition of maps
Example1.10

Consider the functions f:ABf: A \rightarrow B and g:BCg: B \rightarrow C that are defined in Figure 1.9 (top). The composition of these functions, gf:AC,g \circ f: A \rightarrow C\text{,} is defined in Figure 1.9 (bottom).

Example1.11

Let f(x)=x2f(x) = x^2 and g(x)=2x+5.g(x) = 2x + 5\text{.} Then

(fg)(x)=f(g(x))=(2x+5)2=4x2+20x+25\begin{equation*} (f \circ g)(x) = f(g(x)) = (2x + 5)^2 = 4x^2 + 20x + 25 \end{equation*}

and

(gf)(x)=g(f(x))=2x2+5.\begin{equation*} (g \circ f)(x) = g(f(x)) = 2x^2 + 5. \end{equation*}

In general, order makes a difference; that is, in most cases fggf.f \circ g \neq g \circ f\text{.}

Example1.12

Sometimes it is the case that fg=gf.f \circ g= g \circ f\text{.} Let f(x)=x3f(x) = x^3 and g(x)=x3.g(x) = \sqrt[3]{x}\text{.} Then

(fg)(x)=f(g(x))=f(x3)=(x3)3=x\begin{equation*} (f \circ g )(x) = f(g(x)) = f( \sqrt[3]{x}\, ) = (\sqrt[3]{x}\, )^3 = x \end{equation*}

and

(gf)(x)=g(f(x))=g(x3)=x33=x.\begin{equation*} (g \circ f )(x) = g(f(x)) = g( x^3) = \sqrt[3]{ x^3} = x. \end{equation*}
Example1.13

Given a 2×22 \times 2 matrix

A=(abcd),\begin{equation*} A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \end{equation*}

we can define a map TA:R2R2T_A : {\mathbb R}^2 \rightarrow {\mathbb R}^2 by

TA(x,y)=(ax+by,cx+dy)\begin{equation*} T_A (x,y) = (ax + by, cx +dy) \end{equation*}

for (x,y)(x,y) in R2.{\mathbb R}^2\text{.} This is actually matrix multiplication; that is,

(abcd)(xy)=(ax+bycx+dy).\begin{equation*} \begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax + by \\ cx +dy \end{pmatrix}. \end{equation*}

Maps from Rn{\mathbb R}^n to Rm{\mathbb R}^m given by matrices are called or .

Example1.14

Suppose that S={1,2,3}.S = \{ 1,2,3 \}\text{.} Define a map π:SS\pi :S\rightarrow S by

π(1)=2,π(2)=1,π(3)=3.\begin{equation*} \pi( 1 ) = 2, \qquad \pi( 2 ) = 1, \qquad \pi( 3 ) = 3. \end{equation*}

This is a bijective map. An alternative way to write π\pi is

(123π(1)π(2)π(3))=(123213).\begin{equation*} \begin{pmatrix} 1 & 2 & 3 \\ \pi(1) & \pi(2) & \pi(3) \end{pmatrix} = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 1 & 3 \end{pmatrix}. \end{equation*}

For any set S,S\text{,} a one-to-one and onto mapping π:SS\pi : S \rightarrow S is called a of S.S\text{.}

Theorem1.15

Let f:AB,f : A \rightarrow B\text{,} g:BC,g : B \rightarrow C\text{,} and h:CD.h : C \rightarrow D\text{.} Then

  1. The composition of mappings is associative; that is, (hg)f=h(gf);(h \circ g) \circ f = h \circ (g \circ f)\text{;}

  2. If ff and gg are both one-to-one, then the mapping gfg \circ f is one-to-one;

  3. If ff and gg are both onto, then the mapping gfg \circ f is onto;

  4. If ff and gg are bijective, then so is gf.g \circ f\text{.}

Proof

We will prove (1) and (3). Part (2) is left as an exercise. Part (4) follows directly from (2) and (3).

(1) We must show that

h(gf)=(hg)f.\begin{equation*} h \circ (g \circ f) = (h \circ g) \circ f. \end{equation*}

For aAa \in A we have

(h(gf))(a)=h((gf)(a))=h(g(f(a)))=(hg)(f(a))=((hg)f)(a).\begin{align*} (h \circ (g \circ f))(a) & = h((g \circ f)(a))\\ & = h(g(f(a))) \\ & = (h \circ g)(f(a))\\ & = ((h \circ g) \circ f)(a). \end{align*}

(3) Assume that ff and gg are both onto functions. Given cC,c \in C\text{,} we must show that there exists an aAa \in A such that (gf)(a)=g(f(a))=c.(g \circ f)(a) = g(f(a)) = c\text{.} However, since gg is onto, there is an element bBb \in B such that g(b)=c.g(b) = c\text{.} Similarly, there is an aAa \in A such that f(a)=b.f(a) = b\text{.} Accordingly,

(gf)(a)=g(f(a))=g(b)=c.\begin{equation*} (g \circ f)(a) = g(f(a)) = g(b) = c. \end{equation*}

If SS is any set, we will use idSid_S or idid to denote the from SS to itself. Define this map by id(s)=sid(s) = s for all sS.s \in S\text{.} A map g:BAg: B \rightarrow A is an of f:ABf: A \rightarrow B if gf=idAg \circ f = id_A and fg=idB;f \circ g = id_B\text{;} in other words, the inverse function of a function simply “undoes” the function. A map is said to be if it has an inverse. We usually write f1f^{-1} for the inverse of f.f\text{.}

Example1.16

The function f(x)=x3f(x) = x^3 has inverse f1(x)=x3f^{-1}(x) = \sqrt[3]{x} by Example 1.12.

Example1.17

The natural logarithm and the exponential functions, f(x)=lnxf(x) = \ln x and f1(x)=ex,f^{-1}(x) = e^x\text{,} are inverses of each other provided that we are careful about choosing domains. Observe that

f(f1(x))=f(ex)=lnex=x\begin{equation*} f(f^{-1}(x)) = f(e^x) = \ln e^x = x \end{equation*}

and

f1(f(x))=f1(lnx)=elnx=x\begin{equation*} f^{-1}(f(x)) = f^{-1}(\ln x) = e^{\ln x} = x \end{equation*}

whenever composition makes sense.

Example1.18

Suppose that

A=(3152).\begin{equation*} A = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}. \end{equation*}

Then AA defines a map from R2{\mathbb R}^2 to R2{\mathbb R}^2 by

TA(x,y)=(3x+y,5x+2y).\begin{equation*} T_A (x,y) = (3x + y, 5x + 2y). \end{equation*}

We can find an inverse map of TAT_A by simply inverting the matrix A;A\text{;} that is, TA1=TA1.T_A^{-1} = T_{A^{-1}}\text{.} In this example,

A1=(2153);\begin{equation*} A^{-1} = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}; \end{equation*}

hence, the inverse map is given by

TA1(x,y)=(2xy,5x+3y).\begin{equation*} T_A^{-1} (x,y) = (2x - y, -5x + 3y). \end{equation*}

It is easy to check that

TA1TA(x,y)=TATA1(x,y)=(x,y).\begin{equation*} T^{-1}_A \circ T_A (x,y) = T_A \circ T_A^{-1} (x,y) = (x,y). \end{equation*}

Not every map has an inverse. If we consider the map

TB(x,y)=(3x,0)\begin{equation*} T_B (x,y) = (3x , 0 ) \end{equation*}

given by the matrix

B=(3000),\begin{equation*} B = \begin{pmatrix} 3 & 0 \\ 0 & 0 \end{pmatrix}, \end{equation*}

then an inverse map would have to be of the form

TB1(x,y)=(ax+by,cx+dy)\begin{equation*} T_B^{-1} (x,y) = (ax + by, cx +dy) \end{equation*}

and

(x,y)=TTB1(x,y)=(3ax+3by,0)\begin{equation*} (x,y) = T \circ T_B^{-1} (x,y) = (3ax + 3by, 0) \end{equation*}

for all xx and y.y\text{.} Clearly this is impossible because yy might not be 0.

Example1.19

Given the permutation

π=(123231)\begin{equation*} \pi = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 3 & 1 \end{pmatrix} \end{equation*}

on S={1,2,3},S = \{ 1,2,3 \}\text{,} it is easy to see that the permutation defined by

π1=(123312)\begin{equation*} \pi^{-1} = \begin{pmatrix} 1 & 2 & 3 \\ 3 & 1 & 2 \end{pmatrix} \end{equation*}

is the inverse of π.\pi\text{.} In fact, any bijective mapping possesses an inverse, as we will see in the next theorem.

Theorem1.20

A mapping is invertible if and only if it is both one-to-one and onto.

Proof

Suppose first that f:ABf:A \rightarrow B is invertible with inverse g:BA.g: B \rightarrow A\text{.} Then gf=idAg \circ f = id_A is the identity map; that is, g(f(a))=a.g(f(a)) = a\text{.} If a1,a2Aa_1, a_2 \in A with f(a1)=f(a2),f(a_1) = f(a_2)\text{,} then a1=g(f(a1))=g(f(a2))=a2.a_1 = g(f(a_1)) = g(f(a_2)) = a_2\text{.} Consequently, ff is one-to-one. Now suppose that bB.b \in B\text{.} To show that ff is onto, it is necessary to find an aAa \in A such that f(a)=b,f(a) = b\text{,} but f(g(b))=bf(g(b)) = b with g(b)A.g(b) \in A\text{.} Let a=g(b).a = g(b)\text{.}

Conversely, let ff be bijective and let bB.b \in B\text{.} Since ff is onto, there exists an aAa \in A such that f(a)=b.f(a) = b\text{.} Because ff is one-to-one, aa must be unique. Define gg by letting g(b)=a.g(b) = a\text{.} We have now constructed the inverse of f.f\text{.}

SubsectionEquivalence Relations and Partitions

A fundamental notion in mathematics is that of equality. We can generalize equality with equivalence relations and equivalence classes. An on a set XX is a relation RX×XR \subset X \times X such that

  • (x,x)R(x, x) \in R for all xXx \in X ();

  • (x,y)R(x, y) \in R implies (y,x)R(y, x) \in R ();

  • (x,y)(x, y) and (y,z)R(y, z) \in R imply (x,z)R(x, z) \in R ().

Given an equivalence relation RR on a set X,X\text{,} we usually write xyx \sim y instead of (x,y)R.(x, y) \in R\text{.} If the equivalence relation already has an associated notation such as =,=\text{,} ,\equiv\text{,} or ,\cong\text{,} we will use that notation.

Example1.21

Let p,p\text{,} q,q\text{,} r,r\text{,} and ss be integers, where qq and ss are nonzero. Define p/qr/sp/q \sim r/s if ps=qr.ps = qr\text{.} Clearly \sim is reflexive and symmetric. To show that it is also transitive, suppose that p/qr/sp/q \sim r/s and r/st/u,r/s \sim t/u\text{,} with q,q\text{,} s,s\text{,} and uu all nonzero. Then ps=qrps = qr and ru=st.ru = st\text{.} Therefore,

psu=qru=qst.\begin{equation*} psu = qru = qst. \end{equation*}

Since s0,s \neq 0\text{,} pu=qt.pu = qt\text{.} Consequently, p/qt/u.p/q \sim t/u\text{.}

Example1.22

Suppose that ff and gg are differentiable functions on R.{\mathbb R}\text{.} We can define an equivalence relation on such functions by letting f(x)g(x)f(x) \sim g(x) if f(x)=g(x).f'(x) = g'(x)\text{.} It is clear that \sim is both reflexive and symmetric. To demonstrate transitivity, suppose that f(x)g(x)f(x) \sim g(x) and g(x)h(x).g(x) \sim h(x)\text{.} From calculus we know that f(x)g(x)=c1f(x) - g(x) = c_1 and g(x)h(x)=c2,g(x)- h(x) = c_2\text{,} where c1c_1 and c2c_2 are both constants. Hence,

f(x)h(x)=(f(x)g(x))+(g(x)h(x))=c1c2\begin{equation*} f(x) - h(x) = ( f(x) - g(x)) + ( g(x)- h(x)) = c_1 - c_2 \end{equation*}

and f(x)h(x)=0.f'(x) - h'(x) = 0\text{.} Therefore, f(x)h(x).f(x) \sim h(x)\text{.}

Example1.23

For (x1,y1)(x_1, y_1 ) and (x2,y2)(x_2, y_2) in R2,{\mathbb R}^2\text{,} define (x1,y1)(x2,y2)(x_1, y_1 ) \sim (x_2, y_2) if x12+y12=x22+y22.x_1^2 + y_1^2 = x_2^2 + y_2^2\text{.} Then \sim is an equivalence relation on R2.{\mathbb R}^2\text{.}

Example1.24

Let AA and BB be 2×22 \times 2 matrices with entries in the real numbers. We can define an equivalence relation on the set of 2×22 \times 2 matrices, by saying ABA \sim B if there exists an invertible matrix PP such that PAP1=B.PAP^{-1} = B\text{.} For example, if

A=(1211)andB=(18331120),\begin{equation*} A = \begin{pmatrix} 1 & 2 \\ -1 & 1 \end{pmatrix} \quad \text{and} \quad B = \begin{pmatrix} -18 & 33 \\ -11 & 20 \end{pmatrix}, \end{equation*}

then ABA \sim B since PAP1=BPAP^{-1} = B for

P=(2513).\begin{equation*} P = \begin{pmatrix} 2 & 5 \\ 1 & 3 \end{pmatrix}. \end{equation*}

Let II be the 2×22 \times 2 identity matrix; that is,

I=(1001).\begin{equation*} I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}. \end{equation*}

Then IAI1=IAI=A;IAI^{-1} = IAI = A\text{;} therefore, the relation is reflexive. To show symmetry, suppose that AB.A \sim B\text{.} Then there exists an invertible matrix PP such that PAP1=B.PAP^{-1} = B\text{.} So

A=P1BP=P1B(P1)1.\begin{equation*} A = P^{-1} B P = P^{-1} B (P^{-1})^{-1}. \end{equation*}

Finally, suppose that ABA \sim B and BC.B \sim C\text{.} Then there exist invertible matrices PP and QQ such that PAP1=BPAP^{-1} = B and QBQ1=C.QBQ^{-1} = C\text{.} Since

C=QBQ1=QPAP1Q1=(QP)A(QP)1,\begin{equation*} C = QBQ^{-1} = QPAP^{-1} Q^{-1} = (QP)A(QP)^{-1}, \end{equation*}

the relation is transitive. Two matrices that are equivalent in this manner are said to be .

A P{\mathcal P} of a set XX is a collection of nonempty sets X1,X2,X_1, X_2, \ldots such that XiXj=X_i \cap X_j = \emptyset for iji \neq j and kXk=X.\bigcup_k X_k = X\text{.} Let \sim be an equivalence relation on a set XX and let xX.x \in X\text{.} Then [x]={yX:yx}[x] = \{ y \in X : y \sim x \} is called the of x.x\text{.} We will see that an equivalence relation gives rise to a partition via equivalence classes. Also, whenever a partition of a set exists, there is some natural underlying equivalence relation, as the following theorem demonstrates.

Theorem1.25

Given an equivalence relation \sim on a set X,X\text{,} the equivalence classes of XX form a partition of X.X\text{.} Conversely, if P={Xi}{\mathcal P} = \{ X_i\} is a partition of a set X,X\text{,} then there is an equivalence relation on XX with equivalence classes Xi.X_i\text{.}

Proof

Suppose there exists an equivalence relation \sim on the set X.X\text{.} For any xX,x \in X\text{,} the reflexive property shows that x[x]x \in [x] and so [x][x] is nonempty. Clearly X=xX[x].X = \bigcup_{x \in X} [x]\text{.} Now let x,yX.x, y \in X\text{.} We need to show that either [x]=[y][x] = [y] or [x][y]=.[x] \cap [y] = \emptyset\text{.} Suppose that the intersection of [x][x] and [y][y] is not empty and that z[x][y].z \in [x] \cap [y]\text{.} Then zxz \sim x and zy.z \sim y\text{.} By symmetry and transitivity xy;x \sim y\text{;} hence, [x][y].[x] \subset [y]\text{.} Similarly, [y][x][y] \subset [x] and so [x]=[y].[x] = [y]\text{.} Therefore, any two equivalence classes are either disjoint or exactly the same.

Conversely, suppose that P={Xi}{\mathcal P} = \{X_i\} is a partition of a set X.X\text{.} Let two elements be equivalent if they are in the same partition. Clearly, the relation is reflexive. If xx is in the same partition as y,y\text{,} then yy is in the same partition as x,x\text{,} so xyx \sim y implies yx.y \sim x\text{.} Finally, if xx is in the same partition as yy and yy is in the same partition as z,z\text{,} then xx must be in the same partition as z,z\text{,} and transitivity holds.

Corollary1.26

Two equivalence classes of an equivalence relation are either disjoint or equal.

Let us examine some of the partitions given by the equivalence classes in the last set of examples.

Example1.27

In the equivalence relation in Example 1.21, two pairs of integers, (p,q)(p,q) and (r,s),(r,s)\text{,} are in the same equivalence class when they reduce to the same fraction in its lowest terms.

Example1.28

In the equivalence relation in Example 1.22, two functions f(x)f(x) and g(x)g(x) are in the same partition when they differ by a constant.

Example1.29

We defined an equivalence class on R2{\mathbb R}^2 by (x1,y1)(x2,y2)(x_1, y_1 ) \sim (x_2, y_2) if x12+y12=x22+y22.x_1^2 + y_1^2 = x_2^2 + y_2^2\text{.} Two pairs of real numbers are in the same partition when they lie on the same circle about the origin.

Example1.30

Let rr and ss be two integers and suppose that nN.n \in {\mathbb N}\text{.} We say that rr is to ss n,n\text{,} or rr is congruent to ss mod n,n\text{,} if rsr - s is evenly divisible by n;n\text{;} that is, rs=nkr - s = nk for some kZ.k \in {\mathbb Z}\text{.} In this case we write rs(modn).r \equiv s \pmod{n}\text{.} For example, 4117(mod8)41 \equiv 17 \pmod{ 8} since 4117=2441 - 17=24 is divisible by 8. We claim that congruence modulo nn forms an equivalence relation of Z.{\mathbb Z}\text{.} Certainly any integer rr is equivalent to itself since rr=0r - r = 0 is divisible by n.n\text{.} We will now show that the relation is symmetric. If rs(modn),r \equiv s \pmod{ n}\text{,} then rs=(sr)r - s = -(s -r) is divisible by n.n\text{.} So srs - r is divisible by nn and sr(modn).s \equiv r \pmod{ n}\text{.} Now suppose that rs(modn)r \equiv s \pmod{ n} and st(modn).s \equiv t \pmod{ n}\text{.} Then there exist integers kk and ll such that rs=knr -s = kn and st=ln.s - t = ln\text{.} To show transitivity, it is necessary to prove that rtr - t is divisible by n.n\text{.} However,

rt=rs+st=kn+ln=(k+l)n,\begin{equation*} r - t = r - s + s - t = kn + ln = (k + l)n, \end{equation*}

and so rtr - t is divisible by n.n\text{.}

If we consider the equivalence relation established by the integers modulo 3, then

[0]={,3,0,3,6,},[1]={,2,1,4,7,},[2]={,1,2,5,8,}.\begin{align*} {[0]} & = \{ \ldots, -3, 0, 3, 6, \ldots \},\\ {[1]} & = \{ \ldots, -2, 1, 4, 7, \ldots \},\\ {[2]} & = \{ \ldots, -1, 2, 5, 8, \ldots \}. \end{align*}

Notice that [0][1][2]=Z[0] \cup [1] \cup [2] = {\mathbb Z} and also that the sets are disjoint. The sets [0],[0]\text{,} [1],[1]\text{,} and [2][2] form a partition of the integers.

The integers modulo nn are a very important example in the study of abstract algebra and will become quite useful in our investigation of various algebraic structures such as groups and rings. In our discussion of the integers modulo nn we have actually assumed a result known as the division algorithm, which will be stated and proved in Chapter 2.