MTH 114 · Introduction to Sets, Logic and Algebra
Our notes
2 min readDefinition
A mapping (function) f : A → B assigns to each element of A exactly one element of B. A is the domain, B the codomain; the range (image) f(A) is the set of values actually taken.
Types of mapping
- Injective (one-to-one): different inputs give different outputs: f(a₁) = f(a₂) implies a₁ = a₂.
- Surjective (onto): every element of B is an output: range = codomain.
- Bijective: both. Only bijections have inverses.
Worked examples.
- f : R → R, f(x) = 2x + 3. Injective: 2a + 3 = 2b + 3 gives a = b. Surjective: for any y, x = (y − 3)/2 gives f(x) = y. Bijective, inverse f⁻¹(y) = (y − 3)/2. Check: f(f⁻¹(7)) = 2(2) + 3 = 7. ✓
- g : R → R, g(x) = x². Not injective (g(−2) = g(2) = 4); not surjective (−1 is never an output). Restricted to g : [0, ∞) → [0, ∞) it becomes a bijection with inverse √y.
- h : Z → Z, h(n) = 2n. Injective but not surjective (odd numbers are missed).
Composition
(g ∘ f)(x) = g(f(x)): apply f first, then g.
Example. f(x) = 2x + 3, g(x) = x². (g ∘ f)(x) = (2x + 3)²; (f ∘ g)(x) = 2x² + 3. At x = 1: g ∘ f gives 25, f ∘ g gives 5, so composition is not commutative. It is associative: h ∘ (g ∘ f) = (h ∘ g) ∘ f.
For bijections, (g ∘ f)⁻¹ = f⁻¹ ∘ g⁻¹ (undo in reverse order, like taking off socks and shoes).
Counting mappings (|A| = m, |B| = n)
- All mappings A → B: nᵐ.
- Injective mappings (m ≤ n): n(n − 1)...(n − m + 1).
Example. A = {1, 2, 3}, B = {x, y}. Mappings: 2³ = 8. Injective: none (3 inputs cannot all have different outputs among 2). Surjective: all except the 2 constant mappings: 8 − 2 = 6.
Exams usually ask: decide whether a given mapping is injective, surjective or bijective and prove it; find an inverse; compute g ∘ f and f ∘ g; count mappings between small sets.
Common mistake: finding a "formula" for the inverse of a mapping that is not bijective. Check bijectivity first, or restrict the domain.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
NOUN MTH 211: Set Theory and Abstract Algebra
NOUN course book (PDF, about 1.2 MB). Module 1 covers sets, relations, equivalence relations and mappings with solved problems; module 2 starts group theory.
(opens nou.edu.ng in a new tab)
-
College Algebra 2e, 3.7 Inverse Functions
(opens openstax.org in a new tab)
OpenStax, College Algebra 2e, 3.7 Inverse Functions, CC BY-NC-SA 4.0 · licence
-
Bijection, injection and surjection
(opens en.wikipedia.org in a new tab)
Wikipedia, Bijection, injection and surjection, CC BY-SA 4.0 · licence
-
Levin, Discrete Mathematics: An Open Introduction, Section 5.2 Functions
(opens discrete.openmathbooks.org in a new tab)
Levin, Discrete Mathematics: An Open Introduction, Levin, Discrete Mathematics: An Open Introduction, Section 5.2 Functions, CC BY-NC-SA 4.0 · licence
-
Hammack, Book of Proof, 3rd edition (whole free textbook)
A free proof textbook used in many universities (PDF, about 1.8 MB): sets, logic, direct and contrapositive proof, contradiction, induction, relations, functions, cardinality.
(opens richardhammack.github.io in a new tab)
Hammack, Book of Proof, CC BY-NC-ND 4.0 · licence
-
Levin, Discrete Mathematics: An Open Introduction, 4th edition (whole free textbook)
The whole book online with interactive exercises; a free PDF is linked from the front page.
(opens discrete.openmathbooks.org in a new tab)
Levin, Discrete Mathematics: An Open Introduction, Levin, Discrete Mathematics: An Open Introduction, 4th edition (whole free textbook), CC BY-NC-SA 4.0 · licence
-
OpenStax, College Algebra 2e (whole free textbook)
The whole book, free to read online or download as a PDF (the PDF is large: Wi-Fi).
(opens openstax.org in a new tab)
OpenStax, OpenStax, College Algebra 2e (whole free textbook), CC BY-NC-SA 4.0 · licence
Watch
-
Best pick INJECTIVE, SURJECTIVE, and BIJECTIVE FUNCTIONS - DISCRETE MATHEMATICS
17 min · ≈ 77 MB · about ₦43
(opens youtube.com in a new tab)
-
Surjective (onto) and injective (one-to-one) functions | Linear Algebra | Khan Academy
10 min · ≈ 45 MB · about ₦25
(opens youtube.com in a new tab)
-
Composite Functions
5 min · ≈ 23 MB · about ₦13
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.