CSCI 301 L20 Notes

Lecture 20 - Notes

Functions

Announcements

Functions - Domain, Range, and Codomain

Definition: If \(f : A \rightarrow B\), then

Example: For \(f: \mathbb{Z} \rightarrow \mathbb{N} = \{(n, |n| + 2) : n \in \mathbb{Z}\}\) from above:

Do Exercises Part A

Properties of Functions

Definition: A function \(f: A \rightarrow B\) is:

Example: \(f: \mathbb{Z} \rightarrow \mathbb{N} = \{(n, |n| + 2) : n \in \mathbb{Z}\}\) is:

Example: If \(f : \mathbb{Z} \rightarrow \mathbb{N}\) is defined as \(f(n) = |n|+ 1\), then \(f\) is:

Here are two ways to prove that a function is injective:

injective_proof

And here is an approach for proving that a function is surjective:

surjective_proof

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