Algebra ch2
Algebra ch2
1
2
2
Chapter
2.1 Sets
Set builder: we list the property or properties satised by all the elements of the set. We write
{x : P (x)}.
Remark. The elements of a set may be listed in any order. Thus {1, 2, 3} = {2, 1, 3}.
3
R is the set of real numbers.
Denition 2.2. If a is an element of the set A, we say that "a belongs to A" and we denote
a ∈ A.
Universal set: a universal set is the set that contains all the elements or the sets we have under
discussion.
a b
d
4
Example 2.7. Let A = {1, 2, 3} and B = {1, 2, 3, 4, 5}.
Then, every element of A is element of B , so A ⊂ B .
Remark. A is not a subset of B if there is an element x such that x ∈ A and x ∈
/ B , and we
write A 6⊂ B
A 6⊂ B ⇐⇒ ∃x, x ∈ A ∧ x ∈
/B
A B
A∩B
5
Denition 2.7. (Disjoint sets)
Two sets A and B are called disjoint if, and only if their intersection is the empty set.
A and B are disjoint ⇐⇒ A ∩ B = ∅
A B
Example 2.12. Let A = {c} and B = {a, b, λ, 2, O}. A and B are disjoint, because A∩B = ∅
A B
A∪B
6
Notation. The complement of A is also denoted by Ac or {E A.
{A
E
E ⊂ {E .
A ⊂ B ⇐⇒ {B A
E = A.
{E {A
Proof. 1.
A ⊂ B ⇐⇒ ∀x ∈ E(x ∈ A =⇒ x ∈ B)
⇐⇒ ∀x ∈ E(x ∈
/ B =⇒ x ∈
/ A)
⇐⇒ ∀x ∈ E(x ∈ {B
E =⇒ x ∈ {E A)
⇐⇒ {B
E ⊂ {E A
2. Let x ∈ E .
x ∈ {E {A / {A
E ⇐⇒ x ∈ E
⇐⇒ x ∈ A
7
A B
A\B
Example 2.15. Let A = {a, 1, 3, b, 2}, B = {c, 1, x, 2}. Then, A\B = {a, 3, b} and B\A =
{c, x}.
Remark. The dierence of A and B is also called the complement of B with respect to A.
A B
A4B
8
Denition 2.13. (Partition).
A collection of nonempty sets {Ai } ⊂ P(A) is a partition of a set A if and only if
1. A is the union of all the Ai .
2. Ai ∩ Aj = ∅, for i 6= j .
A1
A3
A2 A5
A4
9
1. (x, y) = (x0 , y0 ) ⇐⇒ x = x0 ∧ y = y0 .
2. A × B = B × A ⇐⇒ A = B .
3. R × R = R2 = {(x, y), x ∈ R ∧ y ∈ R}.
2.2 Relations
10
Example 2.24. For E = {1, 2, 3, 4}, let
R1 = {(1, 1), (2, 3), (3, 4), (2, 4)} R2 = {(1, 1), (2, 2), (3, 3), (4, 4), (3, 4), (4, 3)}
x − x = 0 6> 0 =⇒ xRx
6
x − y > 0 =⇒ y − x < 0
6
=⇒ yRx
Example 2.27. Let E = {1, 2, 3} and R = {(1, 1), (2, 2), (3, 3), (2, 3), (3, 2)}.
R is an equivalence relation on E .
Example 2.28. The relation "≤" dened on N is reexive and transitive, but not symmetric.
Thus it is not an equivalence relation.
11
Example 2.29. Let xRy ⇐⇒ x2 = y 2 . Then
0̇ = {y ∈ R, yR0} = {y ∈ R, y 2 = 0} = {0}.
1̇ = {y ∈ R, yR1} = {y ∈ R, y 2 = 1} = {−1, 1}. -1 is also a representative of the class 1̇,
then 1̇ = −1
˙
For x 6= 0, we have ẋ = {y ∈ R, yRx} = {y ∈ R, y2 = x2 } = {−x, x}.
Exercise
Let R be a binary relation on the set Z, such that
12
(ii) Equivalence classes of 0 and 1:
ẋ = {y ∈ Z : yRx}
= {y ∈ Z, y − x = 2k, k ∈ Z}
= {y ∈ Z, y = x + 2k, k ∈ Z}
0̇ = {y ∈ Z, yR0}
= {y ∈ Z, y − 0 = 2k, k ∈ Z}
= {y ∈ Z, y = 2k, k ∈ Z}
= {0, 2, 4, , 6...}
1̇ = {y ∈ Z, yR1}
= {y ∈ Z, y − 1 = 2k, k ∈ Z}
= {y ∈ Z, y = 2k + 1, k ∈ Z}
= {1, 3, 5, 7...}
Theorem 2.3. Let R be an equivalence relation on a set A. Then, the equivalence classes of
R form a partition of A.
Denition 2.22. Let R be an order relation on a set E . R is a total order if and only if
∀x, y ∈ E, xRy ∨ yRx. In the otherwise we say that R is a partial order.
13
1. Show that R is an order relation..
2. Is R a total order ?
Solution:
1. (a) Is R reexive?
Let A ∈ P(E), do we have ARA.
We know that ∀A ∈ P (A), A ⊂ A, then ARA.
Then R is reexive.
(b) Is R antisymmetric?
Let A, B ∈ P(E)
ARB =⇒ A ⊂ B
BRA =⇒ B ⊂ A
We have A ⊂ B and B ⊂ A, then A = B .
Then R is antisymmetric.
(c) Is R transitive ?
Let A, B, C ∈ P(E). Do we have ARB ∧ BRC =⇒ ARC ?
ARB =⇒ A ⊂ B
BRC =⇒ B ⊂ C
We have A ⊂ B and B ⊂ C , then A ⊂ C , then ARC .
Then R is transitive.
Finally, R is an order relation.
2. R is not a total order. Take the counterexample E = {0, 1}, then P(E) = {∅, {0}, {1}, E}.
Note that {0} 6⊂ {1} and {1} 6⊂ {0}.
2.3 Functions
2.3.1 Denitions
Denition 2.23. Let E and F be two nonempty sets. A function from E to F is a binary
relation f such that each element in E is related to a unique element in F .
f : E → F is function ⇐⇒ ∀x ∈ E ∃!y ∈ F such that y = f (x)
14
E F E F E F
R R R
0 a 0 a a
1 b 1 b 1 b
c 2 c 2 c
Remark. A function has only one domain and one range, but many possible codomains, because
any set that includes the range may be considered to be a codomain.
Remark. Dom(f ) = {x, ∃y ∈ F ∧ y = f (x)}.
m
Example 2.33. Let f : Q → Z be a relation dened by f = m for all integers m and
n
n with n 6= 0.
f is not a function because a fractions
have more
than one representation
as quotients
of
3 6 3 6 3 6
integers. For instance, = , but f 6 f
= because f = 3 and f = 6.
1 2 1 2 1 2
15
Example 2.35.
f: R → R
2
x 7→ x + 4.
f: R → R
2
x 7→ x + 4.
b b
c c
E {0, 1}
1A
a
1
b
0
c
E {c}
f
0
1
2 c
16
First projection: Let E and F be two sets. The function
f : E×F → E
(x, y) 7→ x.
is called the rst projection.
For example, E = {1, 2, 3} and F = {a, b, c}.
We have f (1, a) = 1, f (1, b) = 1, f (1, c) = 1, f (2, a) = 2, f (2, b) = 2...etc.
Denition 2.25. Two functions f : E1 → F1 and g : E2 → F2 are said to be equal and we
write f = g if
1. E1 = E2 .
1. F1 = F2 .
2. for all x ∈ E1 , f (x) = g(x).
f g
E F G
g◦f
Determine g ◦ f and f ◦ g.
Solution
g ◦ f : R → R−
x 7→ (g ◦ f )(x) = −x4 − 2x2 − 1.
because
(g ◦ f )(x) = g(f (x)) = g(y) = −y 2 = −(x2 + 1)2 = −x4 − 2x2 − 1
17
f ◦ g is not dened because Codom(g) 6= Dom(f ), i.e. R− 6= R.
1. Determine g ◦ f and f ◦ g.
2. Do we have f ◦ g = g ◦ f ?
3. Determine f ◦ f .
Solution
1.
g◦f : R → R
x 7→ (g ◦ f )(x) = −x4 − 2x2 − 1.
because
(g ◦ f )(x) = g(f (x)) = −f (x)2 = −(x2 + 1)2 = −x4 − 2x2 − 1.
f ◦g : R → R
x 7→ (f ◦ g)(x) = x4 + 1.
because
(f ◦ g)(x) = f (g(x)) = g(x)2 + 1 = (−x2 )2 + 1 = x4 + 1.
The inverse image (or, pre-image) of B by f is the set denoted by f −1 (B) and is dened
by
f −1 (B) = {x ∈ E, f (x) ∈ B}
Example 2.39. Let f : R → R, x 7→ f (x) = x2 . Let A = {0, −1, 2, 3} and B = {−1, 0, 5, 9}.
Determine f (A) and f −1 (B).
Solution:
18
f (A) = {f (x), x ∈ A}
= {f (0), f (−1), f (2), f (3)}
= {0, 1, 4, 9}
f −1 (B) = {x ∈ E, f (x) ∈ B}
= {x ∈ R, f (x) ∈ {−1, 0, 5, 9}}
√ √
= {0, 5, − 5, 3, −3}
Example 2.40.
f : R → R∗
1
x 7→ f (x) = x2
.
f (A) = {f (x), x ∈ A}
1
= {f (x), ≤ x ≤ 1}
4
1
= {f (x), ≤ x2 ≤ 1}
16
1 1
= {f (x), 1 ≤ 2 ≤ }
x 16
1
= {f (x), 1 ≤ f (x) ≤ }
16
= [1, 16]
f −1 (A) = {x ∈ R, f (x) ∈ A}
1 1
= {x ∈ R, ≤ 2 ≤ 1}
4 x
= {x ∈ R, 1 ≤ x2 ≤ 4}
= {x ∈ R, 1 ≤ |x| ≤ 2}
= {x ∈ R, 1 ≤ x ≤ 2} ∪ {x ∈ R, 1 ≤ −x ≤ 2}
= {x ∈ R, 1 ≤ x ≤ 2} ∪ {x ∈ R, − 2 ≤ x ≤ −1}
= [−2, −1] ∪ [1, 2]
Theorem 2.4. Let f be a function from E to F . A and B be two subsets of E , and C and D
be two subsets of F . We have the following properties:
1. f (A ∩ B) ⊂ f (A) ∩ f (B)
2. f (A ∪ B) = f (A) ∪ f (B)
19
3. f −1 (C ∩ D) = f −1 (C) ∩ f −1 (D)
4. f −1 (C ∪ D) = f −1 (C) ∪ f −1 (D)
Denition 2.28. Let f : E → F be a function. Let A and B be two subsets such that A ⊂ E
and E ⊂ B .
The restriction of f to A is the function denoted g = f|A such that ∀x ∈ A, f (x) = g(x).
The extension of f to B is any function h : B → F such that f is the restriction of h to the
set E .
g is the restriction of f to R+ .
f: Z → N g: N → N
x 7→ f (x) = x2 . x 7→ g(x) = x2 .
g is the restriction of f to N.
Example 2.42.
h2 : R → R
f : R+ → R h1 : R → R
x + 1, if x ≥ 0
(
x 7→ x + 1. x 7→ x + 1. x 7→ .
x2 if x < 0
y y y
x x x
the function f the function h1 the function h2
20
or, equivalently
∀x, x0 ∈ E, f (x) = f (x0 ) =⇒ x = x0 .
E F E F
f f
0 a 0 a
1 b 1 b
2 c 2 c
d
not injective function injective function
Denition 2.30. f is called onto or surjective if every element in F has at least one preimage
in E .
∀y ∈ F, ∃x ∈ E, y = f (x)
21
The function f is bijective.
Solution
Injectivity of f:
If we take x = 1 and x0 = −1, we have x = 1 6= x0 = −1. Furthermore, f (1) = f (−1) = 1,
so f is not injective.
Surjectivity of f:
If we take y = −1, we have y = −1 6= x2 for any x ∈ R. Hence, there exists no x ∈ R
such that y = x2 , and therefore, f is not surjective.
Bijection of f:
f is bijective if it is both injective and surjective. Thus, f : R+ → R+ , where x 7→ f (x) =
x.
2
Inverse function f −1 :
√
, where y √7→ f −1 (y) = y.
f −1 : R+ → R+
√ √
We have x = y, so x = y (discarding the other solution x = − y), thus x = y.
2
22
x1 + 1 x2 + 1
= .
x1 + 2 x2 + 2
This implies
(x1 + 1)(x2 + 2) = (x1 + 2)(x2 + 1)
Simplifying further, we have
x1 x2 + 2x1 + x2 + 2 = x1 x2 + x1 + 2x2 + 2
4. To determine G such that f is bijective, we need to nd the image of R∗+ . We have
x = 1−2y
y−1
. For f to be bijective, x must be greater than 0. Therefore, we need 1−2y
y−1
> 0, which
implies y ∈ 2 , 1 , then G = 2 , 1 .
1 1
23