📘 Lesson 4 of 9 · Discrete Mathematics

🎛️ Functions

A function is a special type of relation where every input maps to exactly one output — one of the most fundamental building blocks across all of mathematics.

Course progress: 44%

01 Key Concepts

Function Definition

A relation from A to B where every element of A is paired with exactly one element of B.

Injective (One-to-One)

A function where different inputs always produce different outputs — no two inputs share the same output.

Surjective (Onto)

A function where every element of the output set (codomain) is actually reached by at least one input.

Bijective

A function that is both injective and surjective — every output is hit exactly once, creating a perfect pairing between inputs and outputs.

Composition of Functions

Applying one function to the result of another: (f composed with g)(x) = f(g(x)) — compute the inner function first.

02 Key Formulas

03 Solved Examples

Example 1 Is f(x) = x^2 injective on all real numbers?
  1. Check if different inputs can give the same output.
  2. f(2) = 4 and f(-2) = 4 — two different inputs give the same output.
Answer: No, f(x)=x^2 is not injective (fails at x=2 and x=-2)
Example 2 Is f(x) = x + 3 injective on all real numbers?
  1. Suppose f(a) = f(b): a+3 = b+3.
  2. This forces a = b, so different inputs always give different outputs.
Answer: Yes, f(x) = x+3 is injective
Example 3 Let f(x) = x+1 and g(x) = 2x. Find (f composed with g)(3).
  1. First apply g: g(3) = 2(3) = 6.
  2. Then apply f to the result: f(6) = 6+1.
Answer: (f composed with g)(3) = 7

04 Practice Questions

1Let f(x)=2x and g(x)=x+5. Find (f composed with g)(2).
f(g(2))=f(7)=14
2Is f(x) = 3x injective?
Yes
3Is f(x) = |x| injective on all real numbers?
No, f(2)=f(-2)=2
4What does 'bijective' mean?
Both injective and surjective
5Let f(x)=x^2, g(x)=x+1. Find (g composed with f)(3).
g(f(3))=g(9)=10

📄 Functions — Downloadable Worksheet

10 questions with a full answer key. Grab the PDF to print, or try the interactive version in your browser.