Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 1 of 4

Partial functions: keep the domain in the proof

Track defined inputs through composition and repair injectivity, surjectivity and inverse arguments when an operation is partial.

Loading your saved responses…

Try the optional starting-point checks and targeted refreshers. You can continue directly into this lesson.

Try

A two-stage lookup can lose inputs. Imagine a local catalog that translates numbered requests into category codes, followed by a second catalog that translates supported categories into display labels. A missing entry means undefined: it is not a label called “missing,” zero, or a failed request counted as an ordinary output.

Let the source A contain 0, 1 and 2. The first lookup f sends both 0 and 1 to u and sends 2 to v. The second lookup g has just one entry: v goes to z. Before reading further, write the inputs for which the entire lookup finishes. Does finishing on fewer inputs repair the collision between 0 and 1?

Input xFirst value f(x)Is g defined there?Composite value
0uNoUndefined
1uNoUndefined
2vYesz

The complete composite has only the entry 2↦z. It is injective on its singleton domain: there are no two distinct eligible inputs with the same output. But f still has the collision f(0)=f(1). The second lookup has concealed it, not separated it. Writing “undefined” in the table is explanatory notation, not an extra output shared by 0 and 1.

Predict

Now add a new input 3, let f(3)=w, and add g(w)=q with q different from z. Predict the new composite domain and whether the conclusion changes. It has entries 2↦z and 3↦q. Thus the same phenomenon occurs with two distinct surviving inputs; it is not an artifact of a singleton domain.

Change something else: define g(u)=z. All four inputs now survive, and 0 and 1 still collide after composition. In fact 2 also reaches z. No deterministic function applied to equal intermediate values can make them different. The crucial question is whether the intermediate value is eligible for the next stage.

Keep these three statements separate: f is defined on all of its named source; f has no collisions on its defined inputs; f reaches every element of its named codomain. They are called totality, injectivity and surjectivity, respectively. None is a synonym for either of the others.

Experiment

Make a paper table with source inputs a, b, c, d, e and first-stage entries a↦red, b↦red, c↦blue, d↦green; leave e undefined. Give the second stage blue↦square and green↦circle. Record every surviving input and output. Then change only green’s output to square. Identify which claim fails after that change and which domains remain unchanged.

Compare the complete table and the changed case

Initially the composite has domain consisting of c and d, with different outputs square and circle, so it is injective. The first map is not injective because a and b share red. After changing green’s output, c and d share square and the composite is no longer injective. Its domain is still c and d. An output change can alter injectivity without changing eligibility. The input e never reaches the second lookup at all.

Next allow the second lookup to accept red. Can any chosen output restore injectivity of the composite on all four defined first-stage inputs? No: a and b must receive the same output. This is a small investigation of the general proof below, not a proof for every possible pair of maps.

Understand

We use an explicit convention. A partial map f:A⇀B has an actual domain dom(f) contained in A and assigns one value f(x) in B to each x in dom(f). It is total on A exactly when dom(f)=A. Its image f(dom(f)) consists of its actual outputs. It is injective when equality f(x)=f(y) for x,y in dom(f) forces x=y, and it is onto B when f(dom(f))=B. An empty-domain map is injective; it is onto its codomain only when that codomain is empty.

For g:B⇀C, the composite has domain

dom(g∘f) = the set of x in dom(f) for which f(x) belongs to dom(g).

Both directions matter. If the composite is defined, f must first produce a value and that value must be eligible for g. Conversely those two conditions permit the two successive evaluations, producing g(f(x)). Do not evaluate f(x) outside dom(f) merely to test the second condition. Two partial maps with the same named source and codomain are equal only if their actual domains and values agree.

Suppose g∘f is injective. For x,y in its domain, f(x)=f(y) gives g(f(x))=g(f(y)), so x=y. This proves injectivity of f restricted to the composite domain. It proves injectivity on all of dom(f) if we additionally know f(dom(f)) is contained in dom(g), equivalently dom(g∘f)=dom(f). Under that coverage hypothesis every possible collision of f can be passed through g. Injectivity of g is not needed for this implication. Coverage is a sufficient hypothesis; a particular f might already be injective without it.

Surjectivity uses a different argument. If g∘f is onto C, then each c in C has an input x producing it; the intermediate value f(x) witnesses that g is onto C. If f is onto B and g is onto C, choose a preimage y in dom(g) of c, then a preimage x in dom(f) of y. That x belongs to the composite domain, proving the composite onto. These proofs require neither partial map to be total.

For another familiar implication, assume g is injective and the composite is onto C. For y in dom(g), choose x with g(f(x))=g(y). Injectivity gives f(x)=y. We have proved that f reaches dom(g), not necessarily every element of B. Requiring g to be total on B repairs the stronger conclusion that f is onto B. For example, with B consisting of u and v, g defined only at u, and f reaching only u, the composite can be onto a singleton C while f misses v.

Apply

Consider the real partial map F(x)=1/x and the total map G(x)=x−2. Determine both domains before simplifying. G∘F is defined for every real x except 0 and has value 1/x−2. F∘G is defined for every real x except 2 and has value 1/(x−2). The excluded input is determined by the intermediate value, not by the printed name of the outer function alone.

For a domain-only surprise, let J(x)=x²/x on the real numbers where the quotient exists. Cancellation gives J(x)=x for x≠0. It does not turn J into the total identity: its graph lacks the pair 0↦0. Adding that pair creates an extension. Write a sentence explaining why a table and an algebraic formula require the same domain bookkeeping.

Check the explanation and an inverse boundary

Cancellation proves equality of values on an existing domain, not the existence of a previously undefined value. Similarly, an injective partial lookup can be reversed on its image: the two composites fix the original actual domain and its image. They need not fix every element of the named ambient source and codomain, because some of those inputs remain undefined. Calling a map an inverse therefore requires specifying the sets on which the identity claims hold.

Continue

In the practice tasks, supply domains beside every composite, and separate examples from general proofs. One task asks for associativity: the two groupings must have the same domain before their nested output formulas can establish equality. Another asks you to repair a surjectivity implication by stating exactly which map must be total.

Before accepting any composition argument, ask: Which inputs were quantified over? Are both intermediate values defined? Does “onto” refer to the image, the next map’s actual domain, or its named codomain? These questions expose the hidden assumption rather than discarding the useful total-function theorem.

Apply · explain · revise

Practice and reasoning

Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.

Let A={0,1,2,3,4}, B={u,v,w}, C={r,s}. The partial map f has entries 0↦u, 1↦u, 2↦v, 3↦w and is undefined at 4. The partial map g has entries v↦r, w↦s and is undefined at u. Give the complete composite table and its domain. Decide whether f and g∘f are injective and total on A. Explain why this is a nonsingleton counterexample to an injectivity claim.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

For partial maps f:A⇀B, g:B⇀C and h:C⇀E, prove that h∘(g∘f) and (h∘g)∘f have exactly the same domain and values. Give the domain as sequential membership conditions. Explain why writing h(g(f(x))) alone is insufficient.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Suppose g∘f is injective. Prove f restricted to dom(g∘f) is injective. Prove the stronger conclusion that f is injective on dom(f) under the condition f(dom(f))⊆dom(g). Is this condition necessary for every particular injective f? Supply a counterexample if not.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Use the convention that a partial map is onto its named codomain when its image equals that codomain. Prove: if g∘f is onto C then g is onto C; if f is onto B and g is onto C then g∘f is onto C. If g is injective and g∘f is onto C, must f be onto B? Give a counterexample and state an additional hypothesis that restores this conclusion.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Let A={0,1,2}, B={x,y,z}, and f:A⇀B have only 0↦x and 2↦y. Construct its inverse on its image as a partial map h:B⇀A. Determine both composites with their domains. Are they the identities on A and B? Explain the relation to a bijection between smaller sets.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

On the real numbers let f(x)=(x²−1)/(x−1) with its natural domain, and let g(x)=x−1 be total. Find both g∘f and f∘g as formulas with exact domains. Explain why cancellation cannot establish either as the identity on all real numbers. Then define an extension of f that would make both composites the total identity.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Reflect and continue

Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.