Functions and Relations

Relations:

Def 1:

  • a binary relation R consists
    • set A: domain of R
    • set B: codomain of R
    • subset of A x B: graph of R
  • example:
    • A = {1,2}
    • B = {a,b,c},
    • R = {(1,a),(1,b),(2,c)} is a relation from A to B, or a subset of A x B
  • note:
    • : R is a relation from A to B
    • "": the pair (a, b) in the graph of R
  • confusing example:

Relation Types:

Def 2 (Reflexitivity, symmetry, transitivity)

  • A relation R on set S is:
  • Reflexive:
    • every element in S is related to itself
    • if for all
    • eg: the β€œequal” relation is reflexive, as every number is equal to itself
    • tips: is x β€œthe relation” to x correct
  • Symmetric:
    • order of elements in the pair don’t matter
    • , then
    • eg. the β€œis sibling of relation is symmetric” as if x is sibling of y, then y is also sibling of x
  • Transitive: (suy ra)
    • if x related to y, y related to z, then x is also related to z
    • if , and , then

Def 3 (Functions) ❓❓❓

  • a function is a mapping from set S to elements in set T, to which each element in 1 set (domain set) is mapped to exactly 1 element in another set (codomain set)
    • f: function
    • S: domain
    • T: codomain
    • f is a relation between S and T. For each in S there is a unique element in T so that
    • image / range of is set of all values can produce
  • note:
    • image: set of output that the function actually produce for a particular input
    • range: set of output that the function could produced, eh

Def 4 (Injection / One-to-one)

  • a function is β€œinjective” if for every , there exists AT MOST one such that
  • one output is mapped to AT MOST one input
  • prove:
    • assume for in S
    • show that this implies

Def 5 (Surjection / Onto) ❓❓❓

  • a function is β€œsurjective” (onto) if the image of f equals its range, or for each , there is AT LEAST one such that
  • prove:
    • let f(s) = t β‡’ s = …
    • as , if β†’ surjective

Def 6 (Bijection / One to one correspondence)

  • a function is β€œbijective” if it is injective and surjective
  • every element of the codomain corresponds to exactly one element of the domain

Function Composition & Inverse

Def 7 (Composition)

  • for and
  • , if well defined

Inverse relation

  • of is the relation from B to A defined by
  • change the position & reverse arrow sign: into

Def 9: identity function

  • identity function is a function returning the same output as its input
  • - a function maps set A to itself
  • eg
    • A is set of real numbers
    • , ; for eg , then
  • prove
    • for every x in domain f,

Def 10: left / right inverse

  • β‡’ f is left inverse of g, g is right inverse of f

Def 10: two-sided inverse

  • f is both left and right inverse of g β†’ f and g are two sided inverses of each other

Def 12:

  • f from A to B is total when f(x) exists for all

Claim 13, 14, 15: work for both sides

  • f is injective and total ⇐> f has left inverse
  • f is surjective ⇐> f has right inverse
  • f is bijective ⇐> f has a two-sided inverse

Set cardinality

  • review definition in lec 1
  • set cardinality: number of elements in a set, either finite or infinite
  • Two setsΒ Β and Β have the same cardinality (written as ) IFF there exists a bijectionΒ 
  • Set Β has cardinality set Β (written as ) IFF there exists
    • an injectionΒ 
    • a surjection

Set countability

Countable & Uncountable Set

  • countable if it has same number of elements as some subset of or itself
  • include finite and infinite set that is bijective with
  • a set is countable IFF
  • eg:
    • set is also countable: alternating between non-negative and negative numbers β†’ here
  • prove S is countable set:
    • find a bijection between the set S and
  • a set not countable is uncountable
    • Proposition 2: eg. set of (0, 1); is uncountable

Cantor-Bernstein-Schroeder

  • if is injective (or ) and (or ) is injective β‡’ there is a bijective

Theorem 18

  • if A and B are countable sets, is also countable

Rational and irrational numbers

  • rational numbers: any number expressed as the fraction with p, q are integers
  • irrational numbers: real number that cannot be expressed as fraction of 2 int (eg. pi, e, sqrt(2))