In Discrete Mathematics, **functions** play a crucial role in mapping elements from one set to
another. A function \( f \) from a set \( A \) to a set \( B \) (denoted as \( f: A \to B \)) assigns each
element in \( A \) exactly one element in \( B \).
### **Key Types of Functions:**
1. **One-to-One (Injective) Function**
- A function \( f: A \to B \) is **injective** if different elements in \( A \) map to different elements
in \( B \).
- Example: \( f(x) = 2x \) for \( x \in \mathbb{Z} \) (integers) is injective.
2. **Onto (Surjective) Function**
- A function \( f: A \to B \) is **surjective** if every element in \( B \) has at least one pre-image
in \( A \).
- Example: \( f(x) = x^3 \) for \( x \in \mathbb{R} \) (real numbers) is surjective because every real
number has a cube root.
3. **Bijective Function**
- A function is **bijective** if it is both injective and surjective, meaning there is a perfect one-to-
one correspondence between sets \( A \) and \( B \).
- Example: \( f(x) = x + 1 \) for \( x \in \mathbb{Z} \) (integers) is bijective if \( A = B = \mathbb{Z} \).
4. **Identity Function**
- Maps every element to itself: \( f(x) = x \).
- Example: If \( A = \{1, 2, 3\} \), then \( f(1) = 1 \), \( f(2) = 2 \), etc.
5. **Constant Function**
- Maps every element of \( A \) to a single fixed element in \( B \).
- Example: \( f(x) = 5 \) for all \( x \in \mathbb{Z} \).
6. **Composition of Functions**
- Given two functions \( f: A \to B \) and \( g: B \to C \), their composition \( g \circ f: A \to C \) is
defined by \( (g \circ f)(x) = g(f(x)) \).
7. **Inverse Function**
- A function \( f \) has an **inverse** \( f^{-1} \) if \( f \) is bijective.
- Example: If \( f(x) = 3x + 2 \), then its inverse is \( f^{-1}(y) = \frac{y - 2}{3} \).
8. **Even and Odd Functions**
- Even: \( f(-x) = f(x) \) (e.g., \( f(x) = x^2 \)).
- Odd: \( f(-x) = -f(x) \) (e.g., \( f(x) = x^3 \)).
Would you like examples or problems related to any specific type of function?
Great! Let’s go through some examples and problems for each type of function.
### **1. One-to-One (Injective) Function**
**Example:**
Let \( f: \mathbb{Z} \to \mathbb{Z} \) be defined as \( f(x) = 2x + 3 \). Show that \( f \) is injective.
**Solution:**
To check injectivity, assume \( f(x_1) = f(x_2) \), meaning:
\[
2x_1 + 3 = 2x_2 + 3
\]
Subtract 3 from both sides:
\[
2x_1 = 2x_2
\]
Divide by 2:
\[
x_1 = x_2
\]
Since the only way \( f(x_1) = f(x_2) \) is if \( x_1 = x_2 \), \( f(x) \) is **injective**.
### **2. Onto (Surjective) Function**
**Problem:**
Let \( g: \mathbb{R} \to \mathbb{R} \) be defined as \( g(x) = 5x - 2 \). Prove that \( g \) is onto.
**Hint for Solution:**
A function is onto if, for every \( y \in \mathbb{R} \), there exists an \( x \) such that \( g(x) = y \).
Solve for \( x \) in terms of \( y \) and show it is always possible.
### **3. Bijective Function**
**Problem:**
Is \( h: \mathbb{Z} \to \mathbb{Z} \) defined by \( h(x) = x^2 \) bijective?
**Hint:**
- Check injectivity: Does \( x^2 = y^2 \) always imply \( x = y \)?
- Check surjectivity: Can every integer be obtained as \( x^2 \) for some \( x \in \mathbb{Z} \)?
### **4. Identity Function**
**Example:**
The function \( f: \mathbb{R} \to \mathbb{R} \) defined by \( f(x) = x \) is an identity function
because it maps each element to itself.
### **5. Constant Function**
**Problem:**
Let \( c: \mathbb{R} \to \mathbb{R} \) be defined by \( c(x) = 7 \). Is this function injective, surjective,
or bijective?
### **6. Composition of Functions**
**Problem:**
Let \( f(x) = 2x + 1 \) and \( g(x) = x^2 \). Find \( (f \circ g)(x) \) and \( (g \circ f)(x) \).
### **7. Inverse Function**
**Problem:**
Find the inverse of \( f(x) = \frac{x - 4}{3} \).