Functions: Examples
Madhavan Mukund
[Link]
Mathematics for Data Science 1
Week 1
Functions
A rule to map inputs to outputs
x 7→ x 2 , g (x) = x 2
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 2/6
Functions
A rule to map inputs to outputs
x 7→ x 2 , g (x) = x 2
Domain, codomain, range
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 2/6
Functions
A rule to map inputs to outputs
x 7→ x 2 , g (x) = x 2
Domain, codomain, range
Associated relation
Rsq = {(x, y ) | x, y ∈ R, y = x 2 }
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 2/6
Functions
A rule to map inputs to outputs
x 7→ x 2 , g (x) = x 2
Domain, codomain, range
Associated relation
Rsq = {(x, y ) | x, y ∈ R, y = x 2 }
Can have functions on other sets:
Mother: People → People
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 2/6
Functions
A rule to map inputs to outputs
x 7→ x 2 , g (x) = x 2
Domain, codomain, range
Associated relation
Rsq = {(x, y ) | x, y ∈ R, y = x 2 }
Can have functions on other sets:
Mother: People → People
Will focus more on functions on numbers
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 2/6
Functions
A rule to map inputs to outputs
x 7→ x 2 , g (x) = x 2
Domain, codomain, range
Associated relation
Rsq = {(x, y ) | x, y ∈ R, y = x 2 }
Can have functions on other sets:
Mother: People → People
Will focus more on functions on numbers
What questions are we interested in?
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 2/6
Range of values
What range of values does the output span
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 3/6
Range of values
What range of values does the output span
f (x) = x 2 is always positive, range is 0 to +∞
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 3/6
Range of values
What range of values does the output span
f (x) = x 2 is always positive, range is 0 to +∞
f (x) = x 3 − 3x 2 + 5 ranges from −∞ to +∞
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 3/6
Range of values
What range of values does the output span
f (x) = x 2 is always positive, range is 0 to +∞
f (x) = x 3 − 3x 2 + 5 ranges from −∞ to +∞
f (x) = 5 sin(x) has a bounded range, from −5
to +5
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 3/6
Maxima and minima
f (x) = x 2 attains a minimum value at x = 0,
no maximum value
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 4/6
Maxima and minima
f (x) = x 2 attains a minimum value at x = 0,
no maximum value
f (x) = x 3 − 3x 2 + 5 has no global minimum or
maximum, but a local maximum at x = 0 and
local minimum at x = 2
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 4/6
Maxima and minima
f (x) = x 2 attains a minimum value at x = 0,
no maximum value
f (x) = x 3 − 3x 2 + 5 has no global minimum or
maximum, but a local maximum at x = 0 and
local minimum at x = 2
f (x) = 5 sin(x) periodically attains minimum
value −5 and maximum value +5, infinitely
often
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 4/6
Comparing functions
Does one function grow faster than another?
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 5/6
Comparing functions
Does one function grow faster than another?
f (x) = x 3 − 3x 2 + 5 grows faster than
g (x) = x 2
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 5/6
Comparing functions
Does one function grow faster than another?
f (x) = x 3 − 3x 2 + 5 grows faster than
g (x) = x 2
Let G (y ) be the number of Data Science
graduates in year y
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 5/6
Comparing functions
Does one function grow faster than another?
f (x) = x 3 − 3x 2 + 5 grows faster than
g (x) = x 2
Let G (y ) be the number of Data Science
graduates in year y
Let J(y ) be the number of new Data Science
jobs in year y
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 5/6
Comparing functions
Does one function grow faster than another?
f (x) = x 3 − 3x 2 + 5 grows faster than
g (x) = x 2
Let G (y ) be the number of Data Science
graduates in year y
Let J(y ) be the number of new Data Science
jobs in year y
Ideally, G (y ) and J(y ) should grow at similar
rates
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 5/6
Comparing functions
Does one function grow faster than another?
f (x) = x 3 − 3x 2 + 5 grows faster than
g (x) = x 2
Let G (y ) be the number of Data Science
graduates in year y
Let J(y ) be the number of new Data Science
jobs in year y
Ideally, G (y ) and J(y ) should grow at similar
rates
If J(y ) grows faster than G (y ), more students
will opt to study Data Science
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 5/6
Summary
We will typically study functions over numbers
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 6/6
Summary
We will typically study functions over numbers
Many properties of functions are interesting
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 6/6
Summary
We will typically study functions over numbers
Many properties of functions are interesting
Range of outputs
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 6/6
Summary
We will typically study functions over numbers
Many properties of functions are interesting
Range of outputs
Inputs for which function attains (local) maximum, minimum value
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 6/6
Summary
We will typically study functions over numbers
Many properties of functions are interesting
Range of outputs
Inputs for which function attains (local) maximum, minimum value
Relative growth rates of functions
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 6/6
Summary
We will typically study functions over numbers
Many properties of functions are interesting
Range of outputs
Inputs for which function attains (local) maximum, minimum value
Relative growth rates of functions
...
Madhavan Mukund Functions: Examples Mathematics for Data Science 1, Week 1 6/6