SlideShare a Scribd company logo
Introduction to set theory and to methodology and philosophy of
mathematics and computer programming
Defining and visualizing functions
An overview
by Jan Plaza
c 2017 Jan Plaza
Use under the Creative Commons Attribution 4.0 International License
Version of November 4, 2017
Existence and uniqueness; Functions
How to express in first-order logic “there exists unique y s.t. A(y)”
without using the abbreviation ∃!y A(y) ?
Existence: ∃y A(y).
Uniqueness: ∀y1,y2 (A(y1) ∧ A(y2) → y1 =y2).
Definition
A function is any binary relation f such that ∀x ∀y1,y2 (xfy1 ∧ xfy2 → y1 =y2),
or equivalently, ∀x (∃y xfy → ∀y1,y2 (xfy1 ∧ xfy2 → y1 =y2)).
This means: if there is y s.t. xfy then such a y is unique.
Definition. Let f be a function.
1. Let x ∈ domain(f). The value of f at x , f(x) , is the unique y such that xfy.
2. f maps x to y , denoted f : x → y or x
f
→ y , if xfy.
x
Is this a function? Yes.
x
Is this a function? Yes.
x
Is this a function? No. More than one value of y is paired with the same value of x.
Are these functions?
x
No.
x
Yes.
Are these functions?
{ −1, 1 , 0, 0 , 1, 1 },
i.e.
x y
−1 1
0 0
1 1
Yes.
{ 1, 0 , 0, 1 , 1, 2 },
i.e.
x y
1 0
0 1
1 2
No.
Are these functions?
-1
0
1
-1 0 1
x
Yes.
0
1
2
0 1
x
No.
Are these functions?
-1
0
1
0
1
Yes.
0
1
0
1
2
No.
Are these functions?
0
-1 1
Yes.
0
1 2
No.
Terminology: total/partial, on
Definition. Let f be a function.
f is on X or f is a (total) function on X if domain(f) = X.
Definition. f is a partial function on X if there is X ⊆X s.t. f is a function onX .
Fact. If f is a partial function on X, then f is a total function on domain(f).
If f is a function and X ⊇ domain(f), then f is a partial function on X.
Fact. Consider these conditions:
1. f is a binary relation,
2. domain(f) ⊆ X,
3. for every x ∈ X, f maps x to at most one value,
4. for every x ∈ X, f maps x to least one value.
Then:
f is a function on X iff f satisfies conditions 1-4;
f is a partial function on X iff f satisfies conditions 1-3.
Vertical line tests on the Cartesian plane are the following.
Let G be a subset of the Cartesian plane.
G is the graph of a function from R to R
iff every straight line parallel to the y axis intersects G in exactly one point.
G is the graph of a partial function from R to R
iff every straight line parallel to the y axis intersects G in at most one point.
Vertical line tests in discrete Cartesian diagrams are the following.
Let G be a subset of X × Y in a discrete Cartesian diagram.
G is the graph of a function from X to Y
iff every column in the diagram contains exactly one point of G.
G is the graph of a partial function from X to Y
iff every column in the diagram contains at most one point of G.
Terminology: from, to
Definition. Let f be a function.
1. f is to/into Y if range(f) ⊆ Y .
2. f is (a total function) from X to Y , denoted f : X −→ Y or X
f
−→ Y ,
if domain(f)=X and range(f) ⊆ Y .
Definition
f is a partial function from X to Y , denoted f : X −→ Y or X
f
−→ Y ,
if there exists X ⊆ X such that f : X −→ Y .
f : X −→ Y f : X −→ Y
domain(f) ⊆ X domain(f) = X
range(f) ⊆ Y range(f) ⊆ Y
Our definitions imply that the term “to/into Y ” applies to partial functions as well:
for any partial function f, f is to/into Y iff range(f) ⊆ Y .
Exercise
Is this a function on R? No.
Is this a partial function on R? Yes.
What is the domain of this function? R − {0}.
Is this a function on R − {0}? Yes.
Is it correct to say f : R −→ R? No.
Is it correct to say f : R − {0} −→ R? Yes.
Is it correct to say f : R −→ R? Yes.
Is it correct to say f : R − {0} −→ R? Yes.
Example
1. Let f ={ 0, −1 , 1, 0 , 2, 3 }.
f is a function from {0, 1, 2} to Z.
f is also a function from {0, 1, 2} to {−1, 0, 3}.
2. Alternatively we could specify it as:
a function f on {0, 1, 2} s.t. f(0)=−1, f(1)=0, f(2)=3.
3. Alternatively we could specify it as:
a function f on {0, 1, 2} s.t. f : 0 → −1, f : 1 → 0, f : 2 → 3.
4. Alternatively we could specify it as:
a function f on {0, 1, 2} s.t. f(x)=x2 − 1.
5. Let g be a function on {0, 1, 2, 3} s.t. g(x)=x2 − 1.
Although g and f are defined by the same formula,
they are different functions
because they have different domains.
Example
1. Expression y =
√
1 − x2 does not define a function on R,
but it defines a function on [−1, 1].
2. Expression y = ±
√
1 − x2 specifies coordinates of points of a unit circle,
however it does not define a function on [−1, 1].
Exercise
Consider the formula y =
√
x.
(Recall that for x = 9 we have just y = 3,
because the definition of square root requires it to be non-negative.)
1. Does this formula define a function from R to R? No.
2. Does this formula define a function from {u ∈ R : u 0} to R? Yes.
3. Does this formula define a partial function from R to R? Yes.
4. Does this formula define a function from {u ∈ R : u 0} to Q? No.
5. Does this formula define a function from {u ∈ R : u 0} to {u ∈ R : u 0}?
Yes.
Exercise
Are the following statements correct?
1. Let f1, f2 be functions.
If domain(f1) = domain(f2) and f1 ⊆ f2, then f1 = f2. Yes.
2. Let R1, R2 be binary relations.
If domain(R1) = domain(R2) and R1 ⊆ R2, then R1 = R2. No.
3. Let f1, f2 be partial functions on the same set X.
If f1 ⊆ f2, then f1 = f2. No.
Whenever the answer is negative, provide a counter-example.
Note
1. An attempt to define f : Q −→ Z:
f(m
n ) = m + n, where m, n ∈ Z.
This is not correct, because
1
2 = 2
4 but f(1
2) = 1 + 2 = 3=6 = 2 + 4 = f(2
4)
violating ∀x,y1,y2 (xfy1 ∧ xfy2 → y1 =y2).
2. An attempt to define g : Q −→ Z:
let g(0)=1 and
let g(m
n ) = m + n where m, n ∈ Z, m=0, n > 0,
and m and n do not have a common divisor greater than 1.
This is correct.
(We have used a canonical form of rational numbers.)
3. Every rational number has many representations (1
2 = 2
4 = ...).
To be correct, the definition must be
independent of the representation .
Exercise
Let Q+ be the set of all positive rational numbers.
Are these attempts to define a function correct?
1. f : Q −→ Q s.t. f(m
n ) = n
m where m, n ∈ Z. No.
2. f : Q+ −→ Q+ s.t. f(m
n ) = n
m where m, n ∈ Z. Yes.
Show this by proving:
if m1, n1, m2, n2 ∈ Z and m1
n1
, m2
n2
∈ Q+ and m1
n1
= m2
n2
then n1
m1
= n2
m2
.
Note. An attempt to to model the concept “mother of”:
1. Persons is a non-empty set,
2. Persons is a finite set,
3. motherOf : Persons −→ Persons
(i.e. every person has a unique mother, who is a person),
4. motherOf is a function such that for every p in its domain:
p=motherOf(p),
p=motherOf(motherOf(p)),
p=motherOf(motherOf(motherOf(p))),
etc. (i.e. there are no cycles).
These conditions are contradictory.
(The same problem occurs with theSupervisorOf in employee databases.)
To see why, try drawing directed graphs
showing a function motherOf on a three-element set Persons.

More Related Content

What's hot

Maths-double integrals
Maths-double integralsMaths-double integrals
Maths-double integrals
mihir jain
 
3.2 Power sets
3.2 Power sets3.2 Power sets
3.2 Power sets
Jan Plaza
 
1.4 review on log exp-functions
1.4 review on log exp-functions1.4 review on log exp-functions
1.4 review on log exp-functionsmath265
 
Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)
Matthew Leingang
 
Ασκήσεις πολλαπλού τύπου για τη Γ Λυκείου
Ασκήσεις πολλαπλού τύπου για τη Γ ΛυκείουΑσκήσεις πολλαπλού τύπου για τη Γ Λυκείου
Ασκήσεις πολλαπλού τύπου για τη Γ Λυκείου
Μάκης Χατζόπουλος
 
composite functions
composite functionscomposite functions
composite functions
Glory Codilla
 
7 cavalieri principle-x
7 cavalieri principle-x7 cavalieri principle-x
7 cavalieri principle-x
math266
 
1.5 algebraic and elementary functions
1.5 algebraic and elementary functions1.5 algebraic and elementary functions
1.5 algebraic and elementary functionsmath265
 
Διαγώνισμα + λύσεις από το Β΄ Αρσάκειο Εκάλης 21/10/2019
Διαγώνισμα + λύσεις από το Β΄ Αρσάκειο Εκάλης 21/10/2019Διαγώνισμα + λύσεις από το Β΄ Αρσάκειο Εκάλης 21/10/2019
Διαγώνισμα + λύσεις από το Β΄ Αρσάκειο Εκάλης 21/10/2019
Μάκης Χατζόπουλος
 
Επαναληπτικό διαγώνισμα μέχρι την αντίστροφη συνάρτηση - Αρσάκειο 2017 - 18
Επαναληπτικό διαγώνισμα μέχρι την αντίστροφη συνάρτηση - Αρσάκειο 2017 - 18Επαναληπτικό διαγώνισμα μέχρι την αντίστροφη συνάρτηση - Αρσάκειο 2017 - 18
Επαναληπτικό διαγώνισμα μέχρι την αντίστροφη συνάρτηση - Αρσάκειο 2017 - 18
Μάκης Χατζόπουλος
 
4.1 derivatives as rates linear motions
4.1 derivatives as rates linear motions4.1 derivatives as rates linear motions
4.1 derivatives as rates linear motionsmath265
 
4.6 Relations And Functions
4.6 Relations And Functions4.6 Relations And Functions
4.6 Relations And Functionsguestd1dc2e
 
Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)
Matthew Leingang
 
Διαγώνισμα στη Γ Λυκείου έως ακρότατα
Διαγώνισμα στη Γ Λυκείου έως ακρόταταΔιαγώνισμα στη Γ Λυκείου έως ακρότατα
Διαγώνισμα στη Γ Λυκείου έως ακρότατα
Μάκης Χατζόπουλος
 
2 integration and the substitution methods x
2 integration and the substitution methods x2 integration and the substitution methods x
2 integration and the substitution methods x
math266
 
Functions
FunctionsFunctions
Functions
Gaditek
 
Exponential functions
Exponential functionsExponential functions
Exponential functions
omar_egypt
 
Επαναληπτικό διαγώνισμα μέχρι συνέπειες του ΘΜΤ + λύσεις + word
Επαναληπτικό διαγώνισμα μέχρι συνέπειες του ΘΜΤ + λύσεις + wordΕπαναληπτικό διαγώνισμα μέχρι συνέπειες του ΘΜΤ + λύσεις + word
Επαναληπτικό διαγώνισμα μέχρι συνέπειες του ΘΜΤ + λύσεις + word
Μάκης Χατζόπουλος
 

What's hot (20)

Maths-double integrals
Maths-double integralsMaths-double integrals
Maths-double integrals
 
3.2 Power sets
3.2 Power sets3.2 Power sets
3.2 Power sets
 
1.4 review on log exp-functions
1.4 review on log exp-functions1.4 review on log exp-functions
1.4 review on log exp-functions
 
Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)
 
Ασκήσεις πολλαπλού τύπου για τη Γ Λυκείου
Ασκήσεις πολλαπλού τύπου για τη Γ ΛυκείουΑσκήσεις πολλαπλού τύπου για τη Γ Λυκείου
Ασκήσεις πολλαπλού τύπου για τη Γ Λυκείου
 
composite functions
composite functionscomposite functions
composite functions
 
7 cavalieri principle-x
7 cavalieri principle-x7 cavalieri principle-x
7 cavalieri principle-x
 
1.5 algebraic and elementary functions
1.5 algebraic and elementary functions1.5 algebraic and elementary functions
1.5 algebraic and elementary functions
 
7 functions
7   functions7   functions
7 functions
 
Διαγώνισμα + λύσεις από το Β΄ Αρσάκειο Εκάλης 21/10/2019
Διαγώνισμα + λύσεις από το Β΄ Αρσάκειο Εκάλης 21/10/2019Διαγώνισμα + λύσεις από το Β΄ Αρσάκειο Εκάλης 21/10/2019
Διαγώνισμα + λύσεις από το Β΄ Αρσάκειο Εκάλης 21/10/2019
 
Επαναληπτικό διαγώνισμα μέχρι την αντίστροφη συνάρτηση - Αρσάκειο 2017 - 18
Επαναληπτικό διαγώνισμα μέχρι την αντίστροφη συνάρτηση - Αρσάκειο 2017 - 18Επαναληπτικό διαγώνισμα μέχρι την αντίστροφη συνάρτηση - Αρσάκειο 2017 - 18
Επαναληπτικό διαγώνισμα μέχρι την αντίστροφη συνάρτηση - Αρσάκειο 2017 - 18
 
4.1 derivatives as rates linear motions
4.1 derivatives as rates linear motions4.1 derivatives as rates linear motions
4.1 derivatives as rates linear motions
 
4.6 Relations And Functions
4.6 Relations And Functions4.6 Relations And Functions
4.6 Relations And Functions
 
Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)
 
Διαγώνισμα στη Γ Λυκείου έως ακρότατα
Διαγώνισμα στη Γ Λυκείου έως ακρόταταΔιαγώνισμα στη Γ Λυκείου έως ακρότατα
Διαγώνισμα στη Γ Λυκείου έως ακρότατα
 
Inverse functions
Inverse functionsInverse functions
Inverse functions
 
2 integration and the substitution methods x
2 integration and the substitution methods x2 integration and the substitution methods x
2 integration and the substitution methods x
 
Functions
FunctionsFunctions
Functions
 
Exponential functions
Exponential functionsExponential functions
Exponential functions
 
Επαναληπτικό διαγώνισμα μέχρι συνέπειες του ΘΜΤ + λύσεις + word
Επαναληπτικό διαγώνισμα μέχρι συνέπειες του ΘΜΤ + λύσεις + wordΕπαναληπτικό διαγώνισμα μέχρι συνέπειες του ΘΜΤ + λύσεις + word
Επαναληπτικό διαγώνισμα μέχρι συνέπειες του ΘΜΤ + λύσεις + word
 

Similar to 5.1 Defining and visualizing functions. A handout.

5.6 Function inverse. A handout.
5.6 Function inverse. A handout.5.6 Function inverse. A handout.
5.6 Function inverse. A handout.
Jan Plaza
 
Functions
FunctionsFunctions
Functions
Bhagwan Das
 
3. Functions II.pdf
3. Functions II.pdf3. Functions II.pdf
Inverse.pptx
Inverse.pptxInverse.pptx
Inverse.pptx
ROLLYBALO1
 
Inverse functions and relations
Inverse functions and relationsInverse functions and relations
Inverse functions and relationsJessica Garcia
 
2. Functions I.pdf
2. Functions I.pdf2. Functions I.pdf
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
Functions
FunctionsFunctions
FunctionsSPSV
 
Complex analysis
Complex analysisComplex analysis
Complex analysis
A. Dally Maria Evangeline
 
Relations & functions
Relations & functionsRelations & functions
Relations & functions
indu thakur
 
03 convexfunctions
03 convexfunctions03 convexfunctions
03 convexfunctions
Sufyan Sahoo
 
Calculus 1 Lecture Notes (Functions and Their Graphs)
Calculus 1 Lecture Notes (Functions and Their Graphs)Calculus 1 Lecture Notes (Functions and Their Graphs)
Calculus 1 Lecture Notes (Functions and Their Graphs)
Mohammed Matar
 
237654933 mathematics-t-form-6
237654933 mathematics-t-form-6237654933 mathematics-t-form-6
237654933 mathematics-t-form-6
homeworkping3
 
Composition and inverse of functions
Composition  and inverse of functionsComposition  and inverse of functions
Composition and inverse of functions
Charliez Jane Soriano
 
Math presentation on domain and range
Math presentation on domain and rangeMath presentation on domain and range
Math presentation on domain and range
Touhidul Shawan
 
5.6 Function inverse. Dynamic slides.
5.6 Function inverse. Dynamic slides.5.6 Function inverse. Dynamic slides.
5.6 Function inverse. Dynamic slides.
Jan Plaza
 

Similar to 5.1 Defining and visualizing functions. A handout. (20)

5.6 Function inverse. A handout.
5.6 Function inverse. A handout.5.6 Function inverse. A handout.
5.6 Function inverse. A handout.
 
Functions
FunctionsFunctions
Functions
 
.
..
.
 
Ch07
Ch07Ch07
Ch07
 
3. Functions II.pdf
3. Functions II.pdf3. Functions II.pdf
3. Functions II.pdf
 
Inverse.pptx
Inverse.pptxInverse.pptx
Inverse.pptx
 
Inverse functions and relations
Inverse functions and relationsInverse functions and relations
Inverse functions and relations
 
2. Functions I.pdf
2. Functions I.pdf2. Functions I.pdf
2. Functions I.pdf
 
Functions (Theory)
Functions (Theory)Functions (Theory)
Functions (Theory)
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Functions
FunctionsFunctions
Functions
 
Calc 5.3
Calc 5.3Calc 5.3
Calc 5.3
 
Complex analysis
Complex analysisComplex analysis
Complex analysis
 
Relations & functions
Relations & functionsRelations & functions
Relations & functions
 
03 convexfunctions
03 convexfunctions03 convexfunctions
03 convexfunctions
 
Calculus 1 Lecture Notes (Functions and Their Graphs)
Calculus 1 Lecture Notes (Functions and Their Graphs)Calculus 1 Lecture Notes (Functions and Their Graphs)
Calculus 1 Lecture Notes (Functions and Their Graphs)
 
237654933 mathematics-t-form-6
237654933 mathematics-t-form-6237654933 mathematics-t-form-6
237654933 mathematics-t-form-6
 
Composition and inverse of functions
Composition  and inverse of functionsComposition  and inverse of functions
Composition and inverse of functions
 
Math presentation on domain and range
Math presentation on domain and rangeMath presentation on domain and range
Math presentation on domain and range
 
5.6 Function inverse. Dynamic slides.
5.6 Function inverse. Dynamic slides.5.6 Function inverse. Dynamic slides.
5.6 Function inverse. Dynamic slides.
 

More from Jan Plaza

6.3 Equivalences versus partitions
6.3 Equivalences versus partitions6.3 Equivalences versus partitions
6.3 Equivalences versus partitions
Jan Plaza
 
6.1 Partitions
6.1 Partitions6.1 Partitions
6.1 Partitions
Jan Plaza
 
6.2 Reflexivity, symmetry and transitivity (dynamic slides)
6.2 Reflexivity, symmetry and transitivity (dynamic slides)6.2 Reflexivity, symmetry and transitivity (dynamic slides)
6.2 Reflexivity, symmetry and transitivity (dynamic slides)
Jan Plaza
 
6.2 Reflexivity, symmetry and transitivity (handout)
6.2 Reflexivity, symmetry and transitivity (handout)6.2 Reflexivity, symmetry and transitivity (handout)
6.2 Reflexivity, symmetry and transitivity (handout)
Jan Plaza
 
5.8 Permutations (handout)
5.8 Permutations (handout)5.8 Permutations (handout)
5.8 Permutations (handout)
Jan Plaza
 
5.8 Permutations (dynamic slides)
5.8 Permutations (dynamic slides)5.8 Permutations (dynamic slides)
5.8 Permutations (dynamic slides)
Jan Plaza
 
5.7 Function powers
5.7 Function powers5.7 Function powers
5.7 Function powers
Jan Plaza
 
5.5 Injective and surjective functions. A handout.
5.5 Injective and surjective functions. A handout.5.5 Injective and surjective functions. A handout.
5.5 Injective and surjective functions. A handout.
Jan Plaza
 
5.3 Basic functions. A handout.
5.3 Basic functions. A handout.5.3 Basic functions. A handout.
5.3 Basic functions. A handout.
Jan Plaza
 
5.3 Basic functions. Dynamic slides.
5.3 Basic functions. Dynamic slides.5.3 Basic functions. Dynamic slides.
5.3 Basic functions. Dynamic slides.
Jan Plaza
 
1.4 Abstract objects and expressions
1.4 Abstract objects and expressions1.4 Abstract objects and expressions
1.4 Abstract objects and expressions
Jan Plaza
 
1.2 Axiom of pair
1.2 Axiom of pair1.2 Axiom of pair
1.2 Axiom of pair
Jan Plaza
 
1.11 Mathematical induction
1.11 Mathematical induction1.11 Mathematical induction
1.11 Mathematical induction
Jan Plaza
 
1.7 The sets of numbers
1.7 The sets of numbers1.7 The sets of numbers
1.7 The sets of numbers
Jan Plaza
 
1.6 Subsets
1.6 Subsets1.6 Subsets
1.6 Subsets
Jan Plaza
 
1.1 Notions of set and membership
1.1 Notions of set and membership1.1 Notions of set and membership
1.1 Notions of set and membership
Jan Plaza
 
5.2. Function composition
5.2. Function composition5.2. Function composition
5.2. Function composition
Jan Plaza
 
4.7 Powers of binary relations
4.7 Powers of binary relations4.7 Powers of binary relations
4.7 Powers of binary relations
Jan Plaza
 
4.6 Relative product and composition
4.6 Relative product and composition4.6 Relative product and composition
4.6 Relative product and composition
Jan Plaza
 
3.7 Indexed families of sets
3.7 Indexed families of sets3.7 Indexed families of sets
3.7 Indexed families of sets
Jan Plaza
 

More from Jan Plaza (20)

6.3 Equivalences versus partitions
6.3 Equivalences versus partitions6.3 Equivalences versus partitions
6.3 Equivalences versus partitions
 
6.1 Partitions
6.1 Partitions6.1 Partitions
6.1 Partitions
 
6.2 Reflexivity, symmetry and transitivity (dynamic slides)
6.2 Reflexivity, symmetry and transitivity (dynamic slides)6.2 Reflexivity, symmetry and transitivity (dynamic slides)
6.2 Reflexivity, symmetry and transitivity (dynamic slides)
 
6.2 Reflexivity, symmetry and transitivity (handout)
6.2 Reflexivity, symmetry and transitivity (handout)6.2 Reflexivity, symmetry and transitivity (handout)
6.2 Reflexivity, symmetry and transitivity (handout)
 
5.8 Permutations (handout)
5.8 Permutations (handout)5.8 Permutations (handout)
5.8 Permutations (handout)
 
5.8 Permutations (dynamic slides)
5.8 Permutations (dynamic slides)5.8 Permutations (dynamic slides)
5.8 Permutations (dynamic slides)
 
5.7 Function powers
5.7 Function powers5.7 Function powers
5.7 Function powers
 
5.5 Injective and surjective functions. A handout.
5.5 Injective and surjective functions. A handout.5.5 Injective and surjective functions. A handout.
5.5 Injective and surjective functions. A handout.
 
5.3 Basic functions. A handout.
5.3 Basic functions. A handout.5.3 Basic functions. A handout.
5.3 Basic functions. A handout.
 
5.3 Basic functions. Dynamic slides.
5.3 Basic functions. Dynamic slides.5.3 Basic functions. Dynamic slides.
5.3 Basic functions. Dynamic slides.
 
1.4 Abstract objects and expressions
1.4 Abstract objects and expressions1.4 Abstract objects and expressions
1.4 Abstract objects and expressions
 
1.2 Axiom of pair
1.2 Axiom of pair1.2 Axiom of pair
1.2 Axiom of pair
 
1.11 Mathematical induction
1.11 Mathematical induction1.11 Mathematical induction
1.11 Mathematical induction
 
1.7 The sets of numbers
1.7 The sets of numbers1.7 The sets of numbers
1.7 The sets of numbers
 
1.6 Subsets
1.6 Subsets1.6 Subsets
1.6 Subsets
 
1.1 Notions of set and membership
1.1 Notions of set and membership1.1 Notions of set and membership
1.1 Notions of set and membership
 
5.2. Function composition
5.2. Function composition5.2. Function composition
5.2. Function composition
 
4.7 Powers of binary relations
4.7 Powers of binary relations4.7 Powers of binary relations
4.7 Powers of binary relations
 
4.6 Relative product and composition
4.6 Relative product and composition4.6 Relative product and composition
4.6 Relative product and composition
 
3.7 Indexed families of sets
3.7 Indexed families of sets3.7 Indexed families of sets
3.7 Indexed families of sets
 

Recently uploaded

Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 

Recently uploaded (20)

Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 

5.1 Defining and visualizing functions. A handout.

  • 1. Introduction to set theory and to methodology and philosophy of mathematics and computer programming Defining and visualizing functions An overview by Jan Plaza c 2017 Jan Plaza Use under the Creative Commons Attribution 4.0 International License Version of November 4, 2017
  • 2. Existence and uniqueness; Functions How to express in first-order logic “there exists unique y s.t. A(y)” without using the abbreviation ∃!y A(y) ? Existence: ∃y A(y). Uniqueness: ∀y1,y2 (A(y1) ∧ A(y2) → y1 =y2). Definition A function is any binary relation f such that ∀x ∀y1,y2 (xfy1 ∧ xfy2 → y1 =y2), or equivalently, ∀x (∃y xfy → ∀y1,y2 (xfy1 ∧ xfy2 → y1 =y2)). This means: if there is y s.t. xfy then such a y is unique. Definition. Let f be a function. 1. Let x ∈ domain(f). The value of f at x , f(x) , is the unique y such that xfy. 2. f maps x to y , denoted f : x → y or x f → y , if xfy.
  • 3. x Is this a function? Yes.
  • 4. x Is this a function? Yes.
  • 5. x Is this a function? No. More than one value of y is paired with the same value of x.
  • 7. Are these functions? { −1, 1 , 0, 0 , 1, 1 }, i.e. x y −1 1 0 0 1 1 Yes. { 1, 0 , 0, 1 , 1, 2 }, i.e. x y 1 0 0 1 1 2 No.
  • 8. Are these functions? -1 0 1 -1 0 1 x Yes. 0 1 2 0 1 x No.
  • 10. Are these functions? 0 -1 1 Yes. 0 1 2 No.
  • 11. Terminology: total/partial, on Definition. Let f be a function. f is on X or f is a (total) function on X if domain(f) = X. Definition. f is a partial function on X if there is X ⊆X s.t. f is a function onX . Fact. If f is a partial function on X, then f is a total function on domain(f). If f is a function and X ⊇ domain(f), then f is a partial function on X. Fact. Consider these conditions: 1. f is a binary relation, 2. domain(f) ⊆ X, 3. for every x ∈ X, f maps x to at most one value, 4. for every x ∈ X, f maps x to least one value. Then: f is a function on X iff f satisfies conditions 1-4; f is a partial function on X iff f satisfies conditions 1-3.
  • 12. Vertical line tests on the Cartesian plane are the following. Let G be a subset of the Cartesian plane. G is the graph of a function from R to R iff every straight line parallel to the y axis intersects G in exactly one point. G is the graph of a partial function from R to R iff every straight line parallel to the y axis intersects G in at most one point. Vertical line tests in discrete Cartesian diagrams are the following. Let G be a subset of X × Y in a discrete Cartesian diagram. G is the graph of a function from X to Y iff every column in the diagram contains exactly one point of G. G is the graph of a partial function from X to Y iff every column in the diagram contains at most one point of G.
  • 13. Terminology: from, to Definition. Let f be a function. 1. f is to/into Y if range(f) ⊆ Y . 2. f is (a total function) from X to Y , denoted f : X −→ Y or X f −→ Y , if domain(f)=X and range(f) ⊆ Y . Definition f is a partial function from X to Y , denoted f : X −→ Y or X f −→ Y , if there exists X ⊆ X such that f : X −→ Y . f : X −→ Y f : X −→ Y domain(f) ⊆ X domain(f) = X range(f) ⊆ Y range(f) ⊆ Y Our definitions imply that the term “to/into Y ” applies to partial functions as well: for any partial function f, f is to/into Y iff range(f) ⊆ Y .
  • 14. Exercise Is this a function on R? No. Is this a partial function on R? Yes. What is the domain of this function? R − {0}. Is this a function on R − {0}? Yes. Is it correct to say f : R −→ R? No. Is it correct to say f : R − {0} −→ R? Yes. Is it correct to say f : R −→ R? Yes. Is it correct to say f : R − {0} −→ R? Yes.
  • 15. Example 1. Let f ={ 0, −1 , 1, 0 , 2, 3 }. f is a function from {0, 1, 2} to Z. f is also a function from {0, 1, 2} to {−1, 0, 3}. 2. Alternatively we could specify it as: a function f on {0, 1, 2} s.t. f(0)=−1, f(1)=0, f(2)=3. 3. Alternatively we could specify it as: a function f on {0, 1, 2} s.t. f : 0 → −1, f : 1 → 0, f : 2 → 3. 4. Alternatively we could specify it as: a function f on {0, 1, 2} s.t. f(x)=x2 − 1. 5. Let g be a function on {0, 1, 2, 3} s.t. g(x)=x2 − 1. Although g and f are defined by the same formula, they are different functions because they have different domains.
  • 16. Example 1. Expression y = √ 1 − x2 does not define a function on R, but it defines a function on [−1, 1]. 2. Expression y = ± √ 1 − x2 specifies coordinates of points of a unit circle, however it does not define a function on [−1, 1].
  • 17. Exercise Consider the formula y = √ x. (Recall that for x = 9 we have just y = 3, because the definition of square root requires it to be non-negative.) 1. Does this formula define a function from R to R? No. 2. Does this formula define a function from {u ∈ R : u 0} to R? Yes. 3. Does this formula define a partial function from R to R? Yes. 4. Does this formula define a function from {u ∈ R : u 0} to Q? No. 5. Does this formula define a function from {u ∈ R : u 0} to {u ∈ R : u 0}? Yes.
  • 18. Exercise Are the following statements correct? 1. Let f1, f2 be functions. If domain(f1) = domain(f2) and f1 ⊆ f2, then f1 = f2. Yes. 2. Let R1, R2 be binary relations. If domain(R1) = domain(R2) and R1 ⊆ R2, then R1 = R2. No. 3. Let f1, f2 be partial functions on the same set X. If f1 ⊆ f2, then f1 = f2. No. Whenever the answer is negative, provide a counter-example.
  • 19. Note 1. An attempt to define f : Q −→ Z: f(m n ) = m + n, where m, n ∈ Z. This is not correct, because 1 2 = 2 4 but f(1 2) = 1 + 2 = 3=6 = 2 + 4 = f(2 4) violating ∀x,y1,y2 (xfy1 ∧ xfy2 → y1 =y2). 2. An attempt to define g : Q −→ Z: let g(0)=1 and let g(m n ) = m + n where m, n ∈ Z, m=0, n > 0, and m and n do not have a common divisor greater than 1. This is correct. (We have used a canonical form of rational numbers.) 3. Every rational number has many representations (1 2 = 2 4 = ...). To be correct, the definition must be independent of the representation .
  • 20. Exercise Let Q+ be the set of all positive rational numbers. Are these attempts to define a function correct? 1. f : Q −→ Q s.t. f(m n ) = n m where m, n ∈ Z. No. 2. f : Q+ −→ Q+ s.t. f(m n ) = n m where m, n ∈ Z. Yes. Show this by proving: if m1, n1, m2, n2 ∈ Z and m1 n1 , m2 n2 ∈ Q+ and m1 n1 = m2 n2 then n1 m1 = n2 m2 .
  • 21. Note. An attempt to to model the concept “mother of”: 1. Persons is a non-empty set, 2. Persons is a finite set, 3. motherOf : Persons −→ Persons (i.e. every person has a unique mother, who is a person), 4. motherOf is a function such that for every p in its domain: p=motherOf(p), p=motherOf(motherOf(p)), p=motherOf(motherOf(motherOf(p))), etc. (i.e. there are no cycles). These conditions are contradictory. (The same problem occurs with theSupervisorOf in employee databases.) To see why, try drawing directed graphs showing a function motherOf on a three-element set Persons.