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
How to express in first-order logic “there exists unique y s.t. A(y)”
without using the abbreviation ∃!y A(y) ?
Existence and uniqueness
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).
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)).
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.
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?
x
Is this a function? Yes.
x
Is this a function?
x
Is this a function? Yes.
x
Is this a function?
x
Is this a function? No. More than one value of y is paired with the same value of x.
Are these functions?
x 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
{ 1, 0 , 0, 1 , 1, 2 },
i.e.
x y
1 0
0 1
1 2
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
0
1
2
0 1
x
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
0
1
0
1
2
Are these functions?
-1
0
1
0
1
Yes.
0
1
0
1
2
No.
Are these functions?
0
-1 1
0
1 2
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?
Exercise
Is this a function on R? No.
Exercise
Is this a function on R? No.
Is this a partial function on R?
Exercise
Is this a function on R? No.
Is this a partial function on R? Yes.
Exercise
Is this a function on R? No.
Is this a partial function on R? Yes.
What is the domain of this function?
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}.
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}?
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.
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?
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.
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?
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.
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?
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.
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?
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?
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.
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?
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.
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?
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.
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?
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.
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}?
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.
Exercise
Are the following statements correct?
1. Let f1, f2 be functions.
If domain(f1) = domain(f2) and f1 ⊆ f2, then f1 = f2. 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.
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.
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.
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.
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.
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.
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

27 triple integrals in spherical and cylindrical coordinates
27 triple integrals in spherical and cylindrical coordinates27 triple integrals in spherical and cylindrical coordinates
27 triple integrals in spherical and cylindrical coordinatesmath267
 
2.5 Transformations of Functions
2.5 Transformations of Functions2.5 Transformations of Functions
2.5 Transformations of Functions
smiller5
 
29 conservative fields potential functions
29 conservative fields potential functions29 conservative fields potential functions
29 conservative fields potential functionsmath267
 
Application of derivatives 2 maxima and minima
Application of derivatives 2  maxima and minimaApplication of derivatives 2  maxima and minima
Application of derivatives 2 maxima and minima
sudersana viswanathan
 
7_Intro_to_Functions
7_Intro_to_Functions7_Intro_to_Functions
7_Intro_to_Functionsnechamkin
 
28 work and line integrals
28 work and line integrals28 work and line integrals
28 work and line integralsmath267
 
11 equations of planes
11 equations of planes11 equations of planes
11 equations of planesmath267
 
10 parametric eequations of lines
10 parametric eequations of lines10 parametric eequations of lines
10 parametric eequations of linesmath267
 
Types of function
Types of function Types of function
Types of function
SanaullahMemon10
 
17 tangent planes and total differentials
17 tangent planes and total differentials17 tangent planes and total differentials
17 tangent planes and total differentialsmath267
 
Ideals and factor rings
Ideals and factor ringsIdeals and factor rings
Ideals and factor rings
dianageorge27
 
Relations & functions.pps
Relations  &  functions.ppsRelations  &  functions.pps
Relations & functions.ppsindu psthakur
 
23 general double integrals
23 general double integrals23 general double integrals
23 general double integralsmath267
 
Relations and functions
Relations and functionsRelations and functions
Relations and functions
Thabani Masoka
 
Relations and function class xii copy
Relations and function class xii   copyRelations and function class xii   copy
Relations and function class xii copy
csanjeive
 
Lesson 30: The Definite Integral
Lesson 30: The  Definite  IntegralLesson 30: The  Definite  Integral
Lesson 30: The Definite Integral
Matthew Leingang
 
Survey of the elementary principles
Survey of the elementary principles  Survey of the elementary principles
Survey of the elementary principles
AmeenSoomro1
 
12.5. vector valued functions
12.5. vector valued functions12.5. vector valued functions
12.5. vector valued functionsmath267
 
19 trig substitutions-x
19 trig substitutions-x19 trig substitutions-x
19 trig substitutions-x
math266
 

What's hot (20)

27 triple integrals in spherical and cylindrical coordinates
27 triple integrals in spherical and cylindrical coordinates27 triple integrals in spherical and cylindrical coordinates
27 triple integrals in spherical and cylindrical coordinates
 
2.5 Transformations of Functions
2.5 Transformations of Functions2.5 Transformations of Functions
2.5 Transformations of Functions
 
29 conservative fields potential functions
29 conservative fields potential functions29 conservative fields potential functions
29 conservative fields potential functions
 
Relations and functions
Relations and functionsRelations and functions
Relations and functions
 
Application of derivatives 2 maxima and minima
Application of derivatives 2  maxima and minimaApplication of derivatives 2  maxima and minima
Application of derivatives 2 maxima and minima
 
7_Intro_to_Functions
7_Intro_to_Functions7_Intro_to_Functions
7_Intro_to_Functions
 
28 work and line integrals
28 work and line integrals28 work and line integrals
28 work and line integrals
 
11 equations of planes
11 equations of planes11 equations of planes
11 equations of planes
 
10 parametric eequations of lines
10 parametric eequations of lines10 parametric eequations of lines
10 parametric eequations of lines
 
Types of function
Types of function Types of function
Types of function
 
17 tangent planes and total differentials
17 tangent planes and total differentials17 tangent planes and total differentials
17 tangent planes and total differentials
 
Ideals and factor rings
Ideals and factor ringsIdeals and factor rings
Ideals and factor rings
 
Relations & functions.pps
Relations  &  functions.ppsRelations  &  functions.pps
Relations & functions.pps
 
23 general double integrals
23 general double integrals23 general double integrals
23 general double integrals
 
Relations and functions
Relations and functionsRelations and functions
Relations and functions
 
Relations and function class xii copy
Relations and function class xii   copyRelations and function class xii   copy
Relations and function class xii copy
 
Lesson 30: The Definite Integral
Lesson 30: The  Definite  IntegralLesson 30: The  Definite  Integral
Lesson 30: The Definite Integral
 
Survey of the elementary principles
Survey of the elementary principles  Survey of the elementary principles
Survey of the elementary principles
 
12.5. vector valued functions
12.5. vector valued functions12.5. vector valued functions
12.5. vector valued functions
 
19 trig substitutions-x
19 trig substitutions-x19 trig substitutions-x
19 trig substitutions-x
 

Similar to 5.1 Defining and visualizing functions. Dynamic slides.

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
 
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
 
Complex analysis
Complex analysisComplex analysis
Complex analysis
A. Dally Maria Evangeline
 
4.1 Inverse Functions
4.1 Inverse Functions4.1 Inverse Functions
4.1 Inverse Functions
smiller5
 
Domain-and-Range-of-a-Function
Domain-and-Range-of-a-FunctionDomain-and-Range-of-a-Function
Domain-and-Range-of-a-Function
EmeraldAcaba
 
Functions and graphs
Functions and graphsFunctions and graphs
Functions and graphsSujata Tapare
 
Inverse function
Inverse function Inverse function
Inverse function
RidhimaPangtey
 
Relations & functions
Relations & functionsRelations & functions
Relations & functions
indu thakur
 
CMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions RepresentationsCMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions Representations
allyn joy calcaben
 
4.1 Inverse Functions
4.1 Inverse Functions4.1 Inverse Functions
4.1 Inverse Functions
smiller5
 
3. Functions II.pdf
3. Functions II.pdf3. Functions II.pdf
237654933 mathematics-t-form-6
237654933 mathematics-t-form-6237654933 mathematics-t-form-6
237654933 mathematics-t-form-6
homeworkping3
 
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
 
function
functionfunction
function
som allul
 
Inverse.pptx
Inverse.pptxInverse.pptx
Inverse.pptx
ROLLYBALO1
 
Functions
Functions Functions
Functions
Tyler Murphy
 

Similar to 5.1 Defining and visualizing functions. Dynamic slides. (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
 
Calc 5.3
Calc 5.3Calc 5.3
Calc 5.3
 
5.6 Function inverse. Dynamic slides.
5.6 Function inverse. Dynamic slides.5.6 Function inverse. Dynamic slides.
5.6 Function inverse. Dynamic slides.
 
.
..
.
 
Complex analysis
Complex analysisComplex analysis
Complex analysis
 
4.1 Inverse Functions
4.1 Inverse Functions4.1 Inverse Functions
4.1 Inverse Functions
 
Domain-and-Range-of-a-Function
Domain-and-Range-of-a-FunctionDomain-and-Range-of-a-Function
Domain-and-Range-of-a-Function
 
Functions and graphs
Functions and graphsFunctions and graphs
Functions and graphs
 
Inverse function
Inverse function Inverse function
Inverse function
 
Relations & functions
Relations & functionsRelations & functions
Relations & functions
 
CMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions RepresentationsCMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions Representations
 
4.1 Inverse Functions
4.1 Inverse Functions4.1 Inverse Functions
4.1 Inverse Functions
 
3. Functions II.pdf
3. Functions II.pdf3. Functions II.pdf
3. Functions II.pdf
 
237654933 mathematics-t-form-6
237654933 mathematics-t-form-6237654933 mathematics-t-form-6
237654933 mathematics-t-form-6
 
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.
 
function
functionfunction
function
 
Inverse.pptx
Inverse.pptxInverse.pptx
Inverse.pptx
 
Functions (Theory)
Functions (Theory)Functions (Theory)
Functions (Theory)
 
Functions
Functions Functions
Functions
 

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.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
 
3.6 Families ordered by inclusion
3.6 Families ordered by inclusion3.6 Families ordered by inclusion
3.6 Families ordered by inclusion
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.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
 
3.6 Families ordered by inclusion
3.6 Families ordered by inclusion3.6 Families ordered by inclusion
3.6 Families ordered by inclusion
 

Recently uploaded

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
ShivajiThube2
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
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
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 

Recently uploaded (20)

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
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...
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 

5.1 Defining and visualizing functions. Dynamic slides.

  • 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 How to express in first-order logic “there exists unique y s.t. A(y)” without using the abbreviation ∃!y A(y) ?
  • 3. Existence and uniqueness 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).
  • 4. 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)).
  • 5. 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.
  • 6. 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.
  • 7. x Is this a function?
  • 8. x Is this a function? Yes.
  • 9. x Is this a function?
  • 10. x Is this a function? Yes.
  • 11. x Is this a function?
  • 12. x Is this a function? No. More than one value of y is paired with the same value of x.
  • 15. Are these functions? { −1, 1 , 0, 0 , 1, 1 }, i.e. x y −1 1 0 0 1 1 { 1, 0 , 0, 1 , 1, 2 }, i.e. x y 1 0 0 1 1 2
  • 16. 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.
  • 17. Are these functions? -1 0 1 -1 0 1 x 0 1 2 0 1 x
  • 18. Are these functions? -1 0 1 -1 0 1 x Yes. 0 1 2 0 1 x No.
  • 22. Are these functions? 0 -1 1 Yes. 0 1 2 No.
  • 23. 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.
  • 24. 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.
  • 25. 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 .
  • 26. Exercise Is this a function on R?
  • 27. Exercise Is this a function on R? No.
  • 28. Exercise Is this a function on R? No. Is this a partial function on R?
  • 29. Exercise Is this a function on R? No. Is this a partial function on R? Yes.
  • 30. Exercise Is this a function on R? No. Is this a partial function on R? Yes. What is the domain of this function?
  • 31. 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}.
  • 32. 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}?
  • 33. 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.
  • 34. 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?
  • 35. 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.
  • 36. 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?
  • 37. 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.
  • 38. 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?
  • 39. 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.
  • 40. 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?
  • 41. 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.
  • 42. 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.
  • 43. 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].
  • 44. 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?
  • 45. 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.
  • 46. 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?
  • 47. 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.
  • 48. 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?
  • 49. 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.
  • 50. 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?
  • 51. 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.
  • 52. 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}?
  • 53. 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.
  • 54. Exercise Are the following statements correct? 1. Let f1, f2 be functions. If domain(f1) = domain(f2) and f1 ⊆ f2, then f1 = f2.
  • 55. Exercise Are the following statements correct? 1. Let f1, f2 be functions. If domain(f1) = domain(f2) and f1 ⊆ f2, then f1 = f2. Yes.
  • 56. 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.
  • 57. 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.
  • 58. 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.
  • 59. 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.
  • 60. 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 .
  • 61. 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.
  • 62. 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.
  • 63. 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.
  • 64. 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 .
  • 65. 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.