Lecture 20 - Notes
Functions
- Know how to identify a function’s domain,
codomain, and range.
- Be able to define, apply, and prove or disprove these properties of
functions:
- injective
- surjective
- bijective
- Know the definition of an identity function and an
inverse function.
Announcements
- Midterm details (first announced in L17) are now also included in
the study guide.
- Reminder: today’s office hours are 1:30-2 (instead of the usual
1-2). Extra office hours 3:30-4.
- A4 due tonight
- Please fill out Week 4 Survey by tonight
Functions - Domain,
Range, and Codomain
Definition: If \(f : A
\rightarrow B\), then
- \(A\) is the
domain (the set of possible inputs for \(f\))
- \(B\) is the
codomain (the set of things \(f\) might map elements of \(A\) to)
- \(\{f(a): a \in A\}\) is the
range (i.e., the set of things \(f\) actually does map elements of
\(A\) to)
Example: For \(f:
\mathbb{Z} \rightarrow \mathbb{N} = \{(n, |n| + 2) : n \in
\mathbb{Z}\}\) from above:
- The domain is \(\mathbb{Z}\).
- The codomain is \(\mathbb{N}\)
- The range is \(\{n \in
\mathbb{N} : n \ge 2\}\)
Do Exercises Part A
Properties of Functions
Definition: A function \(f: A \rightarrow B\) is:
- injective, or one-to-one, if for
all \(a, a' \in A\), \(a \ne a'\) implies \(f(a) \ne f(a')\).
- intuition: no two elements of \(a\) map to the same element of \(b\).
- surjective, or onto, if for all
\(b \in B\) there is an \(a \in A\) with \(f(a) = b\)
- intuition: every element of \(b\) is mapped to by some element of \(a\)
- bijective if \(f\)
is both injective and surjective
Example: \(f: \mathbb{Z}
\rightarrow \mathbb{N} = \{(n, |n| + 2) : n \in \mathbb{Z}\}\)
is:
- not injective because \(f(-2) = f(2) = 4\).
- not surjective because there is no \(a\) such that \(f(a) = 1\).
- not bijective
Example: If \(f :
\mathbb{Z} \rightarrow \mathbb{N}\) is defined as \(f(n) = |n|+ 1\), then \(f\) is:
- not injective, for the same reason as the above
example
- surjective because for all \(n \in \mathbb{N}\), it is the case that
\(f(n-1) = n\)
- not bijective
Here are two ways to prove that a function is
injective:
And here is an approach for proving that a function is
surjective:
Do Exercises Part B
Inverses
This is likely familiar to you, but we’ll state it here just for
completeness:
Definition: Given a relation \(R\) on sets \(A\) and \(B\), the inverse relation
is the relation \(R^{-1} = \{(y, x) : (x, y)
\in R\}\).
Fact: Given a function \(f
: A \rightarrow B\), the inverse relation \(f^{-1}\) is a function \(f^{-1}: B \rightarrow A\) if and only if
\(f\) is bijective.
Do Exercises Part C