CS2050 L11 Functions and Bijections
Overview
CS2050 develops a set-theoretic account of functions as total, single-valued relations, then uses domain, codomain, image, injectivity, surjectivity, and bijectivity to analyze concrete maps. Proofs show that affine maps with nonzero slope are bijections from the reals to the reals, the naturals can be paired with the integers, compositions preserve injectivity and surjectivity, and finite sets have equal cardinality exactly when a bijection exists.
Key takeaways
- A function from A to B is a total relation that assigns exactly one output in B to every input in A; its graph is a set of ordered pairs.
- For f(x) = x² with domain and codomain R, the image is [0, ∞), demonstrating why image and codomain must be distinguished.
- For f(x) = ax + b on R with a ≠ 0, injectivity follows by cancellation and surjectivity follows by choosing x = (y − b)/a.
- Using naturals indexed from 1, the rules n ↦ −n/2 for even n and n ↦ (n + 1)/2 for odd n define a bijection from the naturals to the integers.
- Compositions of injections are injective, compositions of surjections are surjective, and therefore compositions of bijections remain bijections.
- For finite sets, equal cardinality is equivalent to the existence of a bijection: unequal sizes force a map to fail either injectivity or surjectivity.
Chapters
- A relation from A to B is a subset of the Cartesian product A × B, so its elements are ordered pairs.
- A function relation cannot pair one input a with two distinct outputs b and b′.
- Totality requires every a in A to map to some element of B, though elements of B may be left unused.
- The vertical line test for graphs is a visual instance of the single-output condition.
- For a function f: A → B, A is the domain and B is the codomain.
- The image contains exactly the codomain elements b for which some a in A satisfies f(a) = b.
- For f: R → R defined by f(x) = x², the image is the nonnegative reals, not the entire codomain.
- The lecture avoids “range” because texts use it ambiguously for either image or codomain.
- For any subset S of A, f(S) is the set of outputs f(a) for inputs a in S.
- The definition can also be expressed as the set of b values reached by at least one a in S.
- For the real squaring function, the image of the integers is the set of perfect squares, including zero.
- Applying f to its entire domain, f(A), gives the image of f.
- Functions with the same domain and codomain are equal when they map every input to the same output.
- Because functions are sets of ordered pairs, equality follows from set extensionality: each pair belongs to one function exactly when it belongs to the other.
- Multiple inputs can be treated as one ordered-pair input, allowing the same set-based definition to cover functions with several arguments.
- If f: A → B and g: B → C, then g ∘ f: A → C is defined by (g ∘ f)(a) = g(f(a)).
- The codomain of f must match the domain expected by g for the composition to be defined.
- The composition remains a function because each stage supplies a unique output for its input.
- The rational-indicator function on R assigns one to rational inputs and zero to irrational inputs.
- Rationals and irrationals are both dense in R, so the indicator function is not a typical continuous graph.
- The transformation g(x) = |2f(x) − 1| turns either indicator output, zero or one, into one, producing a constant function.
- Set-based function definitions allow irregular functions without restricting attention to continuous or differentiable examples.
- A function is injective when a ≠ a′ implies f(a) ≠ f(a′), also called one-to-one.
- For finite A, an injective function maps its elements to the same number of distinct image elements.
- A practical proof method starts with f(a) = f(a′) and derives a = a′, using the contrapositive of the definition.
- The successor function’s injectivity is reflected in the arithmetic property S(n) = S(m) only when n = m.
- A function is surjective, or onto, when every b in the codomain has a preimage a in the domain.
- A bijection is both injective and surjective, pairing every domain element uniquely with a codomain element.
- Mapping diagrams distinguish injection only, surjection only, both, and neither; a relation with multiple outputs for one input is not a function.
- Surjectivity proofs typically begin with an arbitrary codomain element and produce an input that maps to it.
- For real a ≠ 0, define f: R → R by f(x) = ax + b.
- For injectivity, f(x) = f(x′) reduces to ax + b = ax′ + b; subtracting b and dividing by a yields x = x′.
- For surjectivity, given y in R, choose x = (y − b)/a, which gives f(x) = y.
- The same argument does not automatically apply to integer inputs because it relies on division by a.
- An enumeration alternates positive and negative integers, showing how an infinite set can correspond to a proper-looking subset of itself.
- With naturals indexed from 1, define f(n) = −n/2 for even n and f(n) = (n + 1)/2 for odd n.
- Injectivity follows by separating even and odd inputs, then solving the corresponding formula within each case.
- For surjectivity, a negative integer z is reached by n = −2z, while a nonnegative z is reached by n = 2z − 1.
- For f: A → B, surjectivity is equivalent to f(A) = B.
- If the image equals B, every codomain element is reached by definition of image, so f is surjective.
- If f is surjective, each b in B has a preimage in A, proving B is contained in f(A); the reverse containment follows from f(A) ⊆ B.
- The proof uses equality of sets by showing both inclusions.
- For f: A → B and g: B → C, if both maps are injective, equality g(f(a)) = g(f(a′)) first gives f(a) = f(a′), then a = a′.
- If both maps are surjective, f(A) = B and g(B) = C, so the image of g ∘ f is C.
- Therefore, the composition of two bijections is a bijection.
- The inverse of a bijection is also a bijection, a related result noted for further study.
- For finite sets A and B with n elements each, label them a₁ through aₙ and b₁ through bₙ.
- Define f(aᵢ) = bᵢ; distinct labels establish injectivity.
- Every bᵢ is reached from aᵢ, establishing surjectivity.
- The explicit pairing proves that finite sets with equal cardinality admit a bijection.
- Assume finite A and B have a bijection but different cardinalities, so either |A| < |B| or |A| > |B|.
- If |A| < |B|, injectivity makes the image the same size as A, leaving elements of B unreached and contradicting surjectivity.
- If |A| > |B|, there are too many domain elements to map injectively into B, contradicting injectivity.
- Together with the explicit construction, this proves that finite sets have equal cardinality if and only if a bijection exists.
Transcript excerpt
0:01 All right, let's get started. Uh, this is CS2050. The topic of today is functions. Just real basic. I mean, a the functions are the most wellstudied objects in mathematics. But like, do you actually know what a function is? We're just sort of you've been kind of taught like analytically what that there are functions but maybe you don't actually know like formally what functions are. Today will just simply be a retreatment of functions but from a more formal perspective. Every function is a relation but what is a relation? A relation is any subset R of a cartisian product of A * B for A and B sets. So it is
0:51 simply ordered pairs. So when we write uh a comma b is an element of the relation more normally we denote it as a relates to b and we say this as a relates to b and then this capital r is left generic but it can often be replaced with any symbol that is a relation equality congruence things like that right so r is really more one of those symbols we'll come back to a closer treatment of relations in two weeks maybe something like this but for now we know that every function is a relation but this is just what a relation is. Now we will specify relations um so that we get a definition of a function. we say f is a function uh that is a relation
1:43 I'll say f is a relation sorry that is a function and let f again be uh a subset of a * b if two things must be true one uh if a comma b and are in f and a comma b prime are in f. This implies that b equals b prime.
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Abrahim Ladha.