algebra1 week1 logic propositions

Table of contents

  1. Logic, sets, Functions
  2. Sets and Set Operations
  3. Binary Relations
  4. Functions
  5. Images and Preimages
  6. Composition of Functions
  7. Chapter Summary
  8. Equivalence Relations
  9. Order Relations

1. Logic, sets, Functions

1.1 Propositions and truth values

A proposition is a declarative sentence that has exactly one truth value: it is either true or false. An open sentence or predicate, such as P(x):x2>4P(x): x^2 > 4, is not a proposition until a value is assigned to the variable or a quantifier is added.

For example, P(3)P(3) is true, while P(1)P(1) is false 1 2.

1.2 Quantifiers

Quantifiers are symbols used to turn open sentences into propositions.

  • Universal quantifier (∀\forall): Means "for all" or "for every." For example, ∀x∈R,x2≥0\forall x \in \mathbb{R}, x^2 \ge 0 states that for every real number xx, x2x^2 is non-negative.
  • Existential quantifier (∃\exists): Means "there exists." For example, ∃x∈R\exists x \in \mathbb{R} such that x2=4x^2 = 4 is true because x=2x=2 and x=−2x=-2 satisfy the equation 2.

The order of quantifiers matters, especially when they are mixed. ∀x∃yP(x,y)\forall x \exists y P(x, y) is not generally equivalent to ∃y∀xP(x,y)\exists y \forall x P(x, y). However, quantifiers of the same type can be interchanged: ∀x∀yP(x,y)≡∀y∀xP(x,y)\forall x \forall y P(x, y) \equiv \forall y \forall x P(x, y) and ∃x∃yP(x,y)≡∃y∃xP(x,y)\exists x \exists y P(x, y) \equiv \exists y \exists x P(x, y) 2 3.

1.3 Negation

The negation of a proposition PP, denoted by ¬P\neg P, means "not PP." It reverses the truth value of PP 3.

P¬P
TrueFalse
FalseTrue

Negating quantified statements follows specific rules:

  • ¬(∀x,P(x))≡∃x¬P(x)\neg (\forall x, P(x)) \equiv \exists x \neg P(x): The negation of "every" is "there exists at least one... not.".
  • ¬(∃x,P(x))≡∀x¬P(x)\neg (\exists x, P(x)) \equiv \forall x \neg P(x): The negation of "there exists" is "for every... not." 3.

For example, the negation of ∀x∈R,x2+1>0\forall x \in \mathbb{R}, x^2 + 1 > 0 is ∃x∈R\exists x \in \mathbb{R} such that x2+1≤0x^2 + 1 \le 0 4.

1.4 Logical connectives

Logical connectives combine propositions.

  • Conjunction (P∧QP \wedge Q): Means "P and Q." It is true only when both PP and QQ are true.
  • Disjunction (P∨QP \vee Q): Means "P or Q." In mathematics, "or" is inclusive, meaning P∨QP \vee Q is true if at least one of PP or QQ is true 4.
  • Implication (P⇒QP \Rightarrow Q): Means "if P, then Q." It is equivalent to (¬P)∨Q(\neg P) \vee Q and is false only when PP is true and QQ is false 5.
  • Biconditional (P⇔QP \Leftrightarrow Q): Means "P if and only if Q." It is true when PP and QQ have the same truth value, equivalent to (P⇒Q)∧(Q⇒P)(P \Rightarrow Q) \wedge (Q \Rightarrow P) 6.

Two propositions are logically equivalent (P≡QP \equiv Q) if they have the same truth value in all cases 6.

1.5 Related statements to implication

An implication P⇒QP \Rightarrow Q has related statements:

NameStatement
Original implicationP ⇒ Q
ConverseQ ⇒ P
Inverse¬P ⇒ ¬Q
Contrapositive¬Q ⇒ ¬P

An implication is logically equivalent to its contrapositive (P⇒Q≡¬Q⇒¬PP \Rightarrow Q \equiv \neg Q \Rightarrow \neg P), but not generally to its converse 6.

  • PP is a sufficient condition for QQ.
  • QQ is a necessary condition for PP 7.

1.6 Introduction to proof methods

A proof is a logically valid argument that establishes the truth of a conclusion from accepted hypotheses.

1.7 Logical laws

A logical law, or tautology, is a proposition that is always true, regardless of the truth values of its propositional variables. For example, P∨¬PP \vee \neg P is a logical law.

De Morgan's laws are important logical laws 7:

  • ¬(P∧Q)≡¬P∨¬Q\neg (P \wedge Q) \equiv \neg P \vee \neg Q
  • ¬(P∨Q)≡¬P∧¬Q\neg (P \vee Q) \equiv \neg P \wedge \neg Q 8.

1.8 Direct proof

To prove P⇒QP \Rightarrow Q directly:

  1. Assume PP is true.
  2. Use definitions and known results.
  3. Derive QQ 8.

Example: Prove that if nn is even, then n2n^2 is even. Proof: Assume nn is even.

Then n=2kn = 2k for some integer kk. Thus, n2=(2k)2=4k2=2(2k2)n^2 = (2k)^2 = 4k^2 = 2(2k^2).

Since 2k22k^2 is an integer, n2n^2 is even 9.

1.9 Proof by contrapositive

To prove P⇒QP \Rightarrow Q, prove the equivalent statement ¬Q⇒¬P\neg Q \Rightarrow \neg P. This is often useful when ¬Q\neg Q provides a more convenient starting point 9.

Example: Prove that if n2n^2 is odd, then nn is odd. Proof: We prove the contrapositive: If nn is even, then n2n^2 is even.

As shown above, this is true. Therefore, the original statement is true 9.

1.10 Proof by contradiction

To prove a proposition PP by contradiction:

  1. Assume ¬P\neg P.
  2. Derive an impossibility or contradiction.
  3. Conclude that PP must be true 9.

Example: Let a,b≥0a, b \ge 0. Prove by contradiction that if a1+b=b1+a\frac{a}{1+b} = \frac{b}{1+a}, then a=ba=b.

Proof: Assume a1+b=b1+a\frac{a}{1+b} = \frac{b}{1+a} and a≠ba \ne b. This leads to a(1+a)=b(1+b)a(1+a) = b(1+b), so a+a2=b+b2a+a^2 = b+b^2, which means a2−b2+a−b=0a^2-b^2 + a-b = 0.

Factoring gives (a−b)(a+b)+(a−b)=0(a-b)(a+b) + (a-b) = 0, so (a−b)(a+b+1)=0(a-b)(a+b+1) = 0. Since a,b≥0a, b \ge 0, a+b+1>0a+b+1 > 0.

If a≠ba \ne b, then a−b≠0a-b \ne 0. This implies (a−b)(a+b+1)≠0(a-b)(a+b+1) \ne 0, which contradicts our derivation.

Therefore, the assumption a≠ba \ne b must be false, so a=ba=b 10.

📝 The statement ∀x∈R,x2>x\forall x \in \mathbb{R}, x^2 > x is false. A counterexample is x=1x=1, because 12=11^2 = 1, which is not greater than 11 10.

1.11 Disproof by counterexample

To disprove a universal statement ∀x,P(x)\forall x, P(x), find one value x0x_0 for which P(x0)P(x_0) is false 10.

Example: The statement ∀x∈R,x2>x\forall x \in \mathbb{R}, x^2 > x is false. A counterexample is x=1x=1, because 12=11^2 = 1, which is not greater than 11 10.

1.12 Proof by cases

If the possible values of a variable can be divided into mutually exclusive and exhaustive cases, prove the proposition in each case separately 10.

Example: Prove that ∀x∈R,∣x−1∣≤x2−x+1\forall x \in \mathbb{R}, |x - 1| \le x^2 - x + 1. Proof:

  • Case 1: x≥1x \ge 1. Then ∣x−1∣=x−1|x - 1| = x - 1. We need to show x−1≤x2−x+1x - 1 \le x^2 - x + 1, which simplifies to 0≤x2−2x+20 \le x^2 - 2x + 2. This is (x−1)2+1>0(x-1)^2 + 1 > 0, which is true.
  • Case 2: x<1x < 1. Then ∣x−1∣=1−x|x - 1| = 1 - x. We need to show 1−x≤x2−x+11 - x \le x^2 - x + 1, which simplifies to 0≤x20 \le x^2. This is true for all x∈Rx \in \mathbb{R}. Since the inequality holds in both cases, it is true for all x∈Rx \in \mathbb{R} 11.

📝 Negate the statement ∀x∈R,x+1>0\forall x \in \mathbb{R}, x + 1 > 0. Negation: ∃x∈R\exists x \in \mathbb{R} such that x+1≤0x + 1 \le 0 12.

1.13 Guided classroom exercises

Exercise 1: propositions or not?

  • (a) 9 is divisible by 3. (Proposition; true).
  • (b) x + 5 = 12. (Not a proposition; truth depends on x).
  • (c) Find all solutions of x^2 = 1. (Not a proposition; it's an instruction).
  • (d) Every prime number is odd. (Proposition; false, as 2 is prime and even).
  • (e) 2 < 5 and 7 > 3. (Proposition; true) 12.

Exercise 3: translate into symbols (Domain: R)

  • (a) ∀x∈R,x2≥0\forall x \in \mathbb{R}, x^2 \ge 0.
  • (b) ∃x∈R,x2=9\exists x \in \mathbb{R}, x^2 = 9.
  • (c) ∀x∈R,x2≠−1\forall x \in \mathbb{R}, x^2 \ne -1 12 13.

Exercise 4: negation

  • (a) ∀x∈R,x+1>0\forall x \in \mathbb{R}, x + 1 > 0. Negation: ∃x∈R\exists x \in \mathbb{R} such that x+1≤0x + 1 \le 0.
  • (b) ∃n∈N,n2=25\exists n \in \mathbb{N}, n^2 = 25. Negation: ∀n∈N,n2≠25\forall n \in \mathbb{N}, n^2 \ne 25.
  • (c) ∀x∈R,∃y∈R,y>x\forall x \in \mathbb{R}, \exists y \in \mathbb{R}, y > x. Negation: ∃x∈R\exists x \in \mathbb{R} such that ∀y∈R,y≤x\forall y \in \mathbb{R}, y \le x 12 13.

Exercise 6: proof Prove that if aa and bb are even integers, then a+ba + b is even. Proof: Let a=2ma = 2m and b=2nb = 2n for some integers m,nm, n.

Then a+b=2m+2n=2(m+n)a + b = 2m + 2n = 2(m + n). Since m+nm + n is an integer, a+ba + b is even 12 13.

Exercise 7: counterexample Give a counterexample to ∀a,b∈R,a+b=a+b\forall a, b \in \mathbb{R}, \sqrt{a + b} = \sqrt{a} + \sqrt{b}. Counterexample: Let a=1,b=1a = 1, b = 1.

Then 1+1=2\sqrt{1 + 1} = \sqrt{2}, while 1+1=1+1=2\sqrt{1} + \sqrt{1} = 1 + 1 = 2. Since 2≠2\sqrt{2} \ne 2, the statement is false 12 13.

1.14 Summary sheet 14

ConceptKey fact
Negation¬P reverses the truth value of P.
ConjunctionP ∧Q is true only when both are true.
DisjunctionP ∨Q is true when at least one is true.
ImplicationP ⇒Q is false only for P = True and Q = False.
BiconditionalP ⇔Q means both directions hold.
ContrapositiveP ⇒Q ≡¬Q ⇒¬P.
Universal quantifier∀ means “for every”.
Existential quantifier∃ means “there exists”.
Negating ∀¬(∀x P(x)) ≡∃x ¬P(x).
Negating ∃¬(∃x P(x)) ≡∀x ¬P(x).
CounterexampleOne counterexample disproves a universal statement.

2. Sets and Set Operations

2.1 Sets and membership

A set is a collection of distinct objects, known as its elements. Membership in a set is denoted by the symbol ∈.

If an object x is an element of set A, we write x ∈ A. Conversely, if x is not an element of A, we write x ∉ A.

Sets can be described using two primary notations: roster notation, where elements are listed explicitly, and set-builder notation, where elements are defined by a specific property.

  • Roster notation: Elements are listed within curly braces. For example, A = {1, 2, 3, 4}.
  • Set-builder notation: Elements are described by a property. For example, A=x∈Z:−2≤x≤2A = {x ∈ Z: −2 ≤ x ≤ 2} defines the set of integers between -2 and 2, inclusive. This set would be A = {-2, -1, 0, 1, 2} 15.

2.2 Equality and inclusion 15 16

Two sets, A and B, are considered equal if they contain precisely the same elements. This is formally expressed as A = B if and only if for every element x, x is in A if and only if x is in B (∀x, (x ∈ A ⇔ x ∈ B)).

A set A is a subset of a set B, denoted A ⊆ B, if every element in A is also an element in B. This means that for all x, if x is in A, then x must also be in B (∀x, x ∈ A ⇒ x ∈ B).

The equality of two sets can be proven by demonstrating that each set is a subset of the other. This method is called double inclusion.

  • Equality condition: A = B if and only if A ⊆ B and B ⊆ A.
  • Proof strategy: To prove A = B, prove A ⊆ B and then prove B ⊆ A.
Set ASet BCondition
{x ∈ R:x≤ 2}

📝 To prove that the set of real numbers xx such that ∣x∣≤2|x| \le 2 is equal to the closed interval [−2,2][-2, 2], we show that if x∈{x∈R:∣x∣≤2}x \in \{x \in \mathbb{R}: |x| \le 2\}, then ∣x∣≤2|x| \le 2, which implies −2≤x≤2-2 \le x \le 2, so x∈[−2,2]x \in [-2, 2]. Conversely, if x∈[−2,2]x \in [-2, 2], then −2≤x≤2-2 \le x \le 2, which implies ∣x∣≤2|x| \le 2, so x∈{x∈R:∣x∣≤2}x \in \{x \in \mathbb{R}: |x| \le 2\}. 16

2.3 Union, intersection, difference, and complement 17 18

Let E be a universal set and A and B be subsets of E. These operations define new sets based on the elements of A and B.

  • Union (A ∪ B): The set of all elements that belong to A or B (or both). A ∪ B = {x ∈ E: x ∈ A or x ∈ B}.
  • Intersection (A ∩ B): The set of all elements that belong to both A and B. A ∩ B = {x ∈ E: x ∈ A and x ∈ B}.
  • Difference (A \ B): The set of all elements that belong to A but not to B. A \ B = {x ∈ E: x ∈ A and x ∉ B}.
  • Complement (Aᶜ): The set of all elements in the universal set E that do not belong to A. Aᶜ = E \ A = {x ∈ E: x ∉ A}.

These set operations correspond directly to logical connectives: union with disjunction (∨), intersection with conjunction (∧), and complement with negation (¬).

Set OperationLogical ConnectiveDefinition
Union (A ∪ B)OR (∨){x ∈ E: x ∈ A or x ∈ B}
Intersection (A ∩ B)AND (∧){x ∈ E: x ∈ A and x ∈ B}
Complement (Aᶜ)NOT (¬){x ∈ E: x ∉ A}

2.4 Set identities 18 19

Set identities are fundamental laws that govern set operations, analogous to logical laws. These identities are crucial for simplifying set expressions and proving set equalities.

  • Commutative laws: A ∪ B = B ∪ A and A ∩ B = B ∩ A.
  • Associative laws: (A ∪ B) ∪ C = A ∪ (B ∪ C) and (A ∩ B) ∩ C = A ∩ (B ∩ C).
  • Distributive laws: A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) and A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C).
  • De Morgan's laws: (A ∪ B)ᶜ = Aᶜ ∩ Bᶜ and (A ∩ B)ᶜ = Aᶜ ∪ Bᶜ.

These identities can be proven using logical equivalences, similar to how set definitions relate to logical connectives. For example, proving A \ (B ∪ C) = (A \ B) ∩ (A \ C) involves showing that an element x is in A \ (B ∪ C) if and only if it is in (A \ B) ∩ (A \ C).

IdentityDescription
A \ (B ∪ C) = (A \ B) ∩ (A \ C)Difference and Union/Intersection
A \ (B ∩ C) = (A \ B) ∪ (A \ C)Difference and Intersection/Union

2.5 Cartesian product

An ordered pair (a, b) consists of two objects where the order matters. Two ordered pairs (a, b) and (c, d) are equal if and only if a = c and b = d.

The Cartesian product of two sets A and B, denoted A × B, is the set of all possible ordered pairs where the first element comes from A and the second element comes from B. Formally, A × B = {(a, b): a ∈ A, b ∈ B}.

  • The order of sets in a Cartesian product matters: A × B is generally not equal to B × A.
  • For finite sets, the number of elements in the Cartesian product is the product of the number of elements in each set: |A × B| = |A| |B|.
  • ℝ² (R-squared) represents the Cartesian product of the set of real numbers with itself (ℝ × ℝ), which is the set of all ordered pairs of real numbers.

Let A = {0, 1} and B = {1, 2, 3}.

  • A × B = {(0, 1), (0, 2), (0, 3), (1, 1), (1, 2), (1, 3)}.
  • B × A = {(1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2), (3, 0), (3, 1), (3, 2)}. These two sets are not equal 19 20.

📝 Let A={0,1}A = \{0, 1\} and B={1,2,3}B = \{1, 2, 3\}. Then A×B={(0,1),(0,2),(0,3),(1,1),(1,2),(1,3)}A \times B = \{(0, 1), (0, 2), (0, 3), (1, 1), (1, 2), (1, 3)\}. 20

2.6 Power set

The power set of a set A, denoted P(A), is the set containing all possible subsets of A. Formally, P(A) = {X: X ⊆ A}.

  • The empty set (∅) is always a subset of any set, and thus is an element of its power set.
  • A set is always a subset of itself, so a set is also an element of its own power set.

If A = {a, b}, then P(A) = {∅, {a}, {b}, {a, b}}.

For a finite set A with n elements, the number of elements in its power set is 2ⁿ. This is because for each element in A, there are two choices when forming a subset: either include the element or exclude it.

Common mistake: Do not confuse an element x ∈ A with a singleton set {x} ⊆ A. The former refers to membership, while the latter refers to a subset 20.

3. Binary Relations

3.1 Definition of a binary relation

A binary relation from set E to set F is defined as a subset of their Cartesian product, R⊆E×FR \subseteq E \times F. When an ordered pair (x,y)(x, y) is an element of this subset, denoted as (x,y)∈R(x, y) \in R, it is written as xRyx R y, signifying that xx is related to yy.

A relation on a set E is specifically a subset of E×EE \times E 21.

For example, consider the relation R on the set of integers Z where xRyx R y if and only if x−yx - y is an even number. In this case, 2R62 R 6 because 2−6=−42 - 6 = -4, which is even.

However, 2R̸52 \not R 5 because 2−5=−32 - 5 = -3, which is odd 21.

3.2 Basic properties of relations

A relation R on a set E can possess several fundamental properties:

  • Reflexive: For every element xx in E, xRxx R x holds true.
  • Symmetric: If for any elements xx and yy in E, xRyx R y is true, then yRxy R x must also be true.
  • Antisymmetric: If for any elements xx and yy in E, both xRyx R y and yRxy R x are true, then it must be that x=yx = y.
  • Transitive: If for any elements x,y,zx, y, z in E, xRyx R y and yRzy R z are both true, then xRzx R z must also be true 22.

It is important to note that symmetric and antisymmetric are not opposite properties; a relation can be both symmetric and antisymmetric. Equality on any set serves as an example of such a relation 22.

PropertyCondition
Reflexive∀x ∈E, xRx
Symmetric∀x, y ∈E, xRy ⇒ yRx
Antisymmetric∀x, y ∈E, (xRy and yRx) ⇒ x = y
Transitive∀x, y, z ∈E, (xRy and yRz) ⇒ xRz

3.3 Equivalence relations

A relation R on a set E is classified as an equivalence relation if it satisfies three specific properties: reflexivity, symmetry, and transitivity 22.

3.4 Congruence modulo n

A common example of an equivalence relation is congruence modulo n, defined for integers a,b∈Za, b \in Z as a≡b(modn)a \equiv b \pmod{n} if and only if nn divides (a−b)(a - b). This relation is reflexive because a−a=0a - a = 0 is divisible by any nn.

It is symmetric because if nn divides (a−b)(a - b), it also divides (b−a)(b - a). It is transitive because if nn divides (a−b)(a - b) and (b−c)(b - c), then nn also divides their sum, (a−b)+(b−c)=a−c(a - b) + (b - c) = a - c 23.

3.5 Equivalence classes

For an equivalence relation R on a set E, the equivalence class of an element x∈Ex \in E, denoted as [x][x], is the set of all elements y∈Ey \in E such that yRxy R x 23.

For congruence modulo 3:

  • [0]={...,−6,−3,0,3,6,...}[0] = \{..., -6, -3, 0, 3, 6,...\}
  • [1]={...,−5,−2,1,4,7,...}[1] = \{..., -5, -2, 1, 4, 7,...\}
  • [2]={...,−4,−1,2,5,8,...}[2] = \{..., -4, -1, 2, 5, 8,...\} 23.

A key property of equivalence relations is that any two equivalence classes are either identical or completely disjoint. This means an equivalence relation partitions a set into non-overlapping subsets 23.

A partition of a set E is a collection of non-empty subsets of E where distinct subsets are disjoint, and their union equals E. Equivalence relations and partitions represent the same fundamental concept: grouping elements based on a shared equivalence criterion 23.

3.6 Order relations

A relation ≼\preccurlyeq on a set E is termed a partial order if it is reflexive, antisymmetric, and transitive. The pair (E,≼)(E, \preccurlyeq) is then referred to as a partially ordered set, or poset 24.

The standard relation ≤\leq on the set of real numbers R\mathbb{R} is an order relation. Similarly, the inclusion relation ⊆\subseteq is an order relation on the power set P(E)P(E) 24.

An order relation ≼\preccurlyeq on E is considered a total order if every pair of elements in E is comparable, meaning for any x,y∈Ex, y \in E, either x≼yx \preccurlyeq y or y≼xy \preccurlyeq x. While ≤\leq on R\mathbb{R} is a total order, ⊆\subseteq on P(E)P(E) is typically only a partial order.

For instance, in P({1,2,3})P(\{1, 2, 3\}), the sets A={1}A = \{1\} and B={2}B = \{2\} are not comparable because neither A⊆BA \subseteq B nor B⊆AB \subseteq A is true 24.

TypeProperties
Partial OrderReflexive, Antisymmetric, Transitive
Total OrderReflexive, Antisymmetric, Transitive, and Comparable elements (∀x, y ∈E, x ⪯y or y ⪯x)

📝 Consider the set of natural numbers N∗={1,2,3,...}\mathbb{N}^\ast = \{1, 2, 3,...\} with the relation a≼ba \preccurlyeq b if and only if aa divides bb (a∣ba | b).

  1. Reflexive: For any a∈N∗a \in \mathbb{N}^\ast, a∣aa | a is true since a=1⋅aa = 1 \cdot a.
  2. Antisymmetric: If a∣ba | b and b∣ab | a, then b=kab = ka and a=lba = lb for some integers k,lk, l. Substituting, a=l(ka)=(lk)aa = l(ka) = (lk)a. Since a≠0a \neq 0, lk=1lk = 1. As a,ba, b are positive, kk and ll must be positive integers, so k=1k=1 and l=1l=1. This implies a=ba=b.
  3. Transitive: If a∣ba | b and b∣cb | c, then b=kab = ka and c=lbc = lb for integers k,lk, l. Substituting, c=l(ka)=(lk)ac = l(ka) = (lk)a, so a∣ca | c.

Thus, ≼\preccurlyeq is a partial order. It is not a total order because, for example, 2∤32 \nmid 3 and 3∤23 \nmid 2 24.

4. Functions

4.1 Definition of a function

A function ff from a set EE to a set FF, denoted f:E→Ff: E \to F, assigns exactly one element f(x)f(x) in FF to every element xx in EE. The set EE is known as the domain, and FF is the codomain.

The notation x↦f(x)x \mapsto f(x) indicates that element xx from the domain is mapped to element f(x)f(x) in the codomain. It is crucial to remember that a function's definition includes both its formula and its specified domain and codomain 25.

4.2 Graph of a function

The graph of a function f:E→Ff: E \to F is the set of ordered pairs (x,f(x))(x, f(x)) for all xx in the domain EE. This set is formally defined as Γf={(x,f(x)):x∈E}\Gamma_f = \{(x, f(x)): x \in E\}.

While every function defines a binary relation, not all binary relations represent functions 25.

📝 The function f:R→[0,+∞)f: \mathbb{R} \to [0, +\infty) defined by f(x)=x2f(x) = x^2 is surjective. For any y≥0y \geq 0 in the codomain, we can choose x=yx = \sqrt{y} from the domain, and f(x)=(y)2=yf(x) = (\sqrt{y})^2 = y 27.

4.3 Injective functions

A function f:E→Ff: E \to F is injective, or one-to-one, if distinct elements in the domain EE are mapped to distinct elements in the codomain FF. This property can be stated as: for any x1,x2∈Ex_1, x_2 \in E, if f(x1)=f(x2)f(x_1) = f(x_2), then it must be that x1=x2x_1 = x_2.

The contrapositive statement is also true: if x1≠x2x_1 \neq x_2, then f(x1)≠f(x2)f(x_1) \neq f(x_2) 26.

  • Example: The function f:R→Rf: \mathbb{R} \to \mathbb{R} defined by f(x)=2x+1f(x) = 2x + 1 is injective. If f(x1)=f(x2)f(x_1) = f(x_2), then 2x1+1=2x2+12x_1 + 1 = 2x_2 + 1, which simplifies to x1=x2x_1 = x_2 26.

4.4 Surjective functions

A function f:E→Ff: E \to F is surjective, or onto, if every element in the codomain FF has at least one corresponding element in the domain EE that maps to it. Formally, for every y∈Fy \in F, there exists at least one x∈Ex \in E such that f(x)=yf(x) = y 26.

  • Example: The function f:R→[0,+∞)f: \mathbb{R} \to [0, +\infty) defined by f(x)=x2f(x) = x^2 is surjective. For any y≥0y \geq 0 in the codomain, we can choose x=yx = \sqrt{y} from the domain, and f(x)=(y)2=yf(x) = (\sqrt{y})^2 = y 27.

4.5 Bijective functions

A function is bijective if it possesses both injective and surjective properties. In a bijective function, every element in the codomain has exactly one preimage from the domain 27.

  • Proposition: A function f:E→Ff: E \to F is bijective if and only if there exists an inverse function f−1:F→Ef^{-1}: F \to E such that the composition of f−1f^{-1} with ff is the identity function on EE (f−1∘f=idEf^{-1} \circ f = \text{id}_E), and the composition of ff with f−1f^{-1} is the identity function on FF (f∘f−1=idFf \circ f^{-1} = \text{id}_F) 27.

  • Example: For the function f:R→Rf: \mathbb{R} \to \mathbb{R} defined by f(x)=3x−2f(x) = 3x - 2, we can solve y=3x−2y = 3x - 2 for xx to find the inverse. Rearranging gives x=y+23x = \frac{y+2}{3}. Thus, the inverse function is f−1(y)=y+23f^{-1}(y) = \frac{y+2}{3} 28.

4.6 Image and preimage of a subset

If f:E→Ff: E \to F is a function and AA is a subset of the domain EE (A⊆EA \subseteq E), the image of AA under ff is the set of all elements in FF that are mapped to by elements in AA. This is denoted as f(A)={f(x):x∈A}f(A) = \{f(x): x \in A\}.

Equivalently, f(A)={y∈F:∃x∈A,y=f(x)}f(A) = \{y \in F: \exists x \in A, y = f(x)\}. The image of the entire domain, f(E)f(E), is also referred to as the range or image of the function 28.

5. Images and Preimages

5.1 Image of a subset

The image of a subset AA of the domain EE under a function f:E→Ff: E \to F, denoted f(A)f(A), is the set of all values in FF that are outputs of ff for inputs in AA. It represents how the function ff maps the subset AA to a subset within the codomain FF 29.

  • Image notation: f(A)={f(x)∣x∈A}f(A) = \{f(x) \mid x \in A\}.
  • The image f(A)f(A) is a subset of the codomain FF 29.

📝 For the function f(x)=x2f(x) = x^2 where f:R→Rf: \mathbb{R} \to \mathbb{R}, if A=[−2,1]A = [-2, 1], then the image f(A)f(A) is [0,4][0, 4] 29.

5.2 Preimage of a subset

The preimage (or inverse image) of a subset BB of the codomain FF under a function f:E→Ff: E \to F, denoted f−1(B)f^{-1}(B), is the set of all elements in the domain EE that map to elements within BB under ff. This notation is valid for any function, regardless of whether it is bijective 29.

  • Preimage notation: f−1(B)={x∈E∣f(x)∈B}f^{-1}(B) = \{x \in E \mid f(x) \in B\}.
  • It is crucial not to confuse the preimage of a set with the inverse function. The inverse function f−1:F→Ef^{-1}: F \to E exists only if ff is bijective, whereas the preimage f−1(B)f^{-1}(B) is defined for any function ff and any subset B⊆FB \subseteq F 29.

📝 For the function f(x)=x2f(x) = x^2 where f:R→Rf: \mathbb{R} \to \mathbb{R}, if B=[1,4]B = [1, 4], then the preimage f−1(B)f^{-1}(B) is [−2,−1]∪[1,2][-2, -1] \cup [1, 2] 30.

5.3 Useful identities for images and preimages

Certain identities govern how images and preimages behave with respect to set operations like union and intersection. These identities are fundamental for manipulating sets under function mappings 30.

OperationImage IdentityPreimage Identity
Unionf(A1 ∪ A2) = f(A1) ∪ f(A2)f−1(B1 ∪ B2) = f−1(B1) ∪ f−1(B2)
Intersectionf(A1 ∩ A2) ⊆ f(A1) ∩ f(A2)f−1(B1 ∩ B2) = f−1(B1) ∩ f−1(B2)
Complement—f−1(F \ B1) = E \ f−1(B1)
  • The inclusion f(A1∩A2)⊆f(A1)∩f(A2)f(A_1 \cap A_2) \subseteq f(A_1) \cap f(A_2) may be strict. Equality holds for all subsets A1,A2A_1, A_2 if ff is injective 30.

📝 For f(x)=x2f(x) = x^2, determine f([−3,−1])f([-3, -1]), f−1([0,9])f^{-1}([0, 9]), and f−1((4,∞))f^{-1}((4, \infty)) 30.

6. Composition of Functions

6.1 Definition of function composition

The composition of two functions, gg with ff, denoted as g∘fg \circ f, creates a new function where the output of ff becomes the input of gg. If ff maps from set EE to set FF (f:E→Ff: E \to F) and gg maps from set FF to set GG (g:F→Gg: F \to G), then their composition g∘fg \circ f maps from EE to GG (g∘f:E→Gg \circ f: E \to G).

The operation is defined as (g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x)), meaning ff is applied first, and then gg is applied to the result 31.

📝 Let f(x)=x+1f(x) = x + 1 and g(x)=x2g(x) = x^2. The composition (g∘f)(x)(g \circ f)(x) is found by substituting f(x)f(x) into g(x)g(x), resulting in (x+1)2(x+1)^2. In contrast, (f∘g)(x)(f \circ g)(x) involves substituting g(x)g(x) into f(x)f(x), yielding x2+1x^2 + 1. This demonstrates that the order of composition matters, as (g∘f)(x)≠(f∘g)(x)(g \circ f)(x) \neq (f \circ g)(x) in this case 31.

6.2 Properties of function composition 31 32

Function composition exhibits several key properties related to associativity and the nature of the component functions (injective, surjective, bijective).

PropertyDescription
AssociativityComposition is associative: h∘(g∘f)=(h∘g)∘fh \circ (g \circ f) = (h \circ g) \circ f.
InjectivityIf both ff and gg are injective, then their composition g∘fg \circ f is also injective.
SurjectivityIf both ff and gg are surjective, then their composition g∘fg \circ f is also surjective.
BijectivityIf both ff and gg are bijective, then g∘fg \circ f is bijective, and its inverse is (g∘f)−1=f−1∘g−1(g \circ f)^{-1} = f^{-1} \circ g^{-1}.

7. Chapter Summary

7.1 Cardinality and Infinite Sets

An infinite set can have the same size as a proper subset of itself. This is demonstrated by the bijection f(n)=2nf(n) = 2n between the set of natural numbers NN and the set of even natural numbers 2N2N.

This function shows that ∣N∣=∣2N∣|N| = |2N|, even though 2N2N is a proper subset of NN 33.

A set AA is countably infinite if there exists a bijection f:N→Af: N \to A. A set is countable if it is either finite or countably infinite.

Informally, a set is countable if its elements can be arranged in a list a0,a1,a2,…a_0, a_1, a_2, \dots without missing any element 33.

The sets of natural numbers (NN), integers (ZZ), and rational numbers (QQ) are all countable. The integers can be listed as 0,1,−1,2,−2,3,−3,…0, 1, -1, 2, -2, 3, -3, \dots, demonstrating their countability.

A finite Cartesian product of countable sets is also countable, meaning N×NN \times N is countable. This fact is used to show that QQ is countable, as any rational number can be represented by a pair of integers (p,q)(p, q) where q≠0q \neq 0 33.

Not every infinite set is countable. Cantor's theorem states that for any set EE, there is no surjective function f:E→P(E)f: E \to P(E), where P(E)P(E) is the power set of EE.

This implies that ∣E∣<∣P(E)∣|E| < |P(E)|. The proof proceeds by contradiction, defining a set A={x∈E:x∉f(x)}A = \{x \in E: x \notin f(x)\}.

If such a surjective function ff existed, we would reach a contradiction by considering whether a∈Aa \in A for a specific element a∈Ea \in E such that f(a)=Af(a) = A. The interval (0,1)(0, 1) is an example of an uncountable set, and it has the same cardinality as the set of real numbers RR 34.

7.2 Exercises on Countability

  1. Show that the set of odd natural numbers is countably infinite.
  2. Construct a bijection between NN and {3,6,9,12,… }\{3, 6, 9, 12, \dots\} 35.
  3. Give an explicit bijection between NN and the set A={5,10,15,20,… }A = \{5, 10, 15, 20, \dots\} 36.

8. Equivalence Relations

8.1 Definition of an equivalence relation

An equivalence relation on a set E is a relation R that satisfies three properties: reflexivity, symmetry, and transitivity. These properties ensure that the relation behaves consistently and partitions the set into distinct, non-overlapping subsets 37.

  • Reflexivity: For every element x in set E, x is related to itself (xRx).
  • Symmetry: If element x is related to element y (xRy), then element y is also related to element x (yRx).
  • Transitivity: If element x is related to element y (xRy) and element y is related to element z (yRz), then element x is also related to element z (xRz) 37.

8.2 Parallel lines as an equivalence relation

Consider the set E of all lines in a plane. The relation R defined by d1Rd2 ⇐⇒ d1 ∥ d2 (d1 is parallel to d2) is an equivalence relation.

  • Reflexivity: A line is parallel to itself.
  • Symmetry: If line d1 is parallel to line d2, then d2 is parallel to d1.
  • Transitivity: If d1 is parallel to d2, and d2 is parallel to d3, then d1 is parallel to d3 37.

8.3 Congruence modulo n as an equivalence relation

For an integer n ≥ 2, the relation aRb ⇐⇒ a ≡ b (mod n) on the set of integers Z is an equivalence relation. This means n divides the difference (a - b).

  • Reflexivity: a - a = 0, and n divides 0.
  • Symmetry: If n divides (a - b), then n also divides (b - a).
  • Transitivity: If n divides (a - b) and n divides (b - c), then n divides (a - c) 37.

8.4 Equivalence classes

For an equivalence relation R on a set E, the equivalence class of an element x, denoted by [x], is the set of all elements y in E such that y is related to x (yRx) 38.

  • Modulo n equivalence class: For congruence modulo n, the equivalence class of an integer a is [a] = {b ∈ Z: b ≡ a (mod n)}.
  • For example, modulo 3:
  • [0] = {..., −6, −3, 0, 3, 6,...}.
  • [1] = {..., −5, −2, 1, 4, 7,...}.
  • [2] = {..., −4, −1, 2, 5, 8,...} 38.

8.5 Equivalence classes and partitions

The collection of all equivalence classes of an equivalence relation on a set E forms a partition of E. This means two conditions are met 38:

  • Every element of E belongs to exactly one equivalence class.
  • Any two distinct equivalence classes are either identical or completely disjoint (they have no elements in common).
  • The union of all equivalence classes is equal to the entire set E: E = ⋃_{x∈E} [x] 38.

📝 Consider the relation xRy ⇐⇒ 2x + y is divisible by 3 on the set of natural numbers N. This relation is an equivalence relation. The equivalence classes are [0], [1], and [2], where [0] = {y ∈ N: y ≡ 0 (mod 3)}, [1] = {y ∈ N: y ≡ 1 (mod 3)}, and [2] = {y ∈ N: y ≡ 2 (mod 3)}. These three classes partition the set of natural numbers 39.

9. Order Relations

9.1 Partial order relation

A relation R on a set E is a partial order relation if it satisfies three properties: reflexivity, antisymmetry, and transitivity. When a set E and a partial order relation R are paired as (E, R), they form a partially ordered set, often denoted as a poset.

The symbol ⪯ is commonly used to represent an order relation 40.

  • Reflexive: For every element x in E, x is related to itself (xRx).
  • Antisymmetric: If x is related to y and y is related to x, then x must be equal to y (∀x, y ∈ E, (xRy and yRx) ⇒ x = y).
  • Transitive: If x is related to y and y is related to z, then x is also related to z (∀x, y, z ∈ E, (xRy and yRz) ⇒ xRz) 40.

9.2 Examples of partially ordered sets 40 41

Several common mathematical structures serve as examples of partially ordered sets. These examples illustrate the abstract properties of order relations in concrete contexts.

Set (E)Relation (R)Description
Real numbers (R)≤The usual order on real numbers
Positive integers (N*)——
Power set of X (P(X))⊆The inclusion relation on subsets of X

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also