Tutorials › Real Analysis › Composition of Continuous Maps

Topology · Tutorial 726 of 1000

Composition of Continuous Maps

Learn how continuity behaves under composition and when a continuous inverse on one side lets you test continuity of a map from its composite.

Advanced 9 min read

What You'll Learn

  • Track the domains and codomains in a composition of maps
  • Use the composition theorem from earlier in the course
  • Prove continuity tests using continuous right inverses
  • Prove the corresponding test using continuous left inverses
  • Identify why continuity of a map cannot usually be inferred from a continuous composite
  • Check the hypotheses in examples where composition hides a discontinuity

Composition and Continuity

A map built in stages is often easiest to study one stage at a time. If \(f:X\to Y\) and \(g:Y\to Z\), their composition \(g\circ f:X\to Z\) first applies \(f\), then applies \(g\). The intermediate space \(Y\) must match: the output of the first map is an input to the second. When the stages are continuous, continuity passes to the composite.

The pointwise composition theorem from “Continuity in Topological Spaces” says that \(f\) is continuous at \(x\) and \(g\) is continuous at \(f(x)\) imply that \(g\circ f\) is continuous at \(x\). Applying it at every \(x\in X\) gives the familiar global rule. We will use that earlier result rather than re-prove it. The more delicate question is whether continuity can be inferred in the reverse direction: if \(g\circ f\) is continuous, must either \(f\) or \(g\) be continuous? In general, neither conclusion follows. Certain continuous inverse maps provide useful, carefully delimited tests.

Definition: A map \(s:Y\to X\) is a right inverse (or section) of \(f:X\to Y\) if \(f\circ s=\operatorname{id}_Y\). A map \(r:Z\to Y\) is a left inverse of \(g:Y\to Z\) if \(r\circ g=\operatorname{id}_Y\).

The equations specify which map is undone. A right inverse of \(f\) chooses, for each \(y\in Y\), a point \(s(y)\in X\) that \(f\) sends back to \(y\). In particular, \(f\) must be onto when it has a right inverse. A left inverse of \(g\) recovers \(y\) from \(g(y)\); in particular, \(g\) must be one-to-one. These are algebraic conditions. The continuity of the inverse map is an additional topological condition.

A Continuity Test from a Right Inverse

Theorem: Let \(f:X\to Y\) be continuous and suppose it has a continuous right inverse \(s:Y\to X\), so \(f\circ s=\operatorname{id}_Y\). For any topological space \(Z\) and any map \(g:Y\to Z\), \(g\) is continuous if and only if \(g\circ f\) is continuous.

Proof. If \(g\) is continuous, then \(f\) is continuous by hypothesis. The composition theorem gives continuity of \(g\circ f\).

Conversely, suppose \(g\circ f\) is continuous. Using \(f\circ s=\operatorname{id}_Y\), we have the exact identity $$ g=g\circ\operatorname{id}_Y =g\circ(f\circ s) =(g\circ f)\circ s. $$ Both maps on the right of the last composition are continuous: \(g\circ f\) by assumption and \(s\) by hypothesis. The composition theorem therefore shows that \(g\) is continuous. This proves both implications. \(\square\)

The assumption that \(f\) is continuous is needed for the forward implication. The continuous right inverse alone only proves the reverse implication, because it is used to express \(g\) as \((g\circ f)\circ s\). The next example shows why the extra assumption cannot be dropped when claiming an equivalence.

Worked Example: Testing a Map after a Projection

Let \(A\) and \(Y\) be topological spaces, with \(A\) nonempty, and give \(A\times Y\) the topology whose basic open sets are \(U\times V\) with \(U\) open in \(A\) and \(V\) open in \(Y\) (the product topology, studied formally in a later tutorial). Choose \(a_0\in A\). Define \(p:A\times Y\to Y\) by \(p(a,y)=y\), and define \(s:Y\to A\times Y\) by \(s(y)=(a_0,y)\). Then \(p\circ s=\operatorname{id}_Y\).

Both maps are continuous. For an open \(V\subseteq Y\), \(p^{-1}(V)=A\times V\), which is open in the product topology. To check \(s\), take a basic open set \(U\times V\subseteq A\times Y\), where \(U\) is open in \(A\) and \(V\) is open in \(Y\). Its preimage is \(V\) if \(a_0\in U\), and is empty if \(a_0\notin U\); either way it is open in \(Y\). Preimages of arbitrary open sets are also open, since every open set in the product is a union of basic open sets.

The theorem now applies: for any \(g:Y\to Z\), \(g\) is continuous exactly when the map \((a,y)\mapsto g(y)\) from \(A\times Y\) to \(Z\) is continuous. Thus a continuous map defined on \(Y\) can be tested after pulling it back along this projection, because the projection has a continuous section.

A Continuity Test from a Left Inverse

There is a complementary test when the map applied second has a continuous left inverse. It uses a different factorization: the left inverse recovers the original map from the composite. This time continuity of the second-stage map is the assumption that makes the forward implication work.

Theorem: Let \(g:Y\to Z\) be continuous and suppose it has a continuous left inverse \(r:Z\to Y\), so \(r\circ g=\operatorname{id}_Y\). For any topological space \(X\) and any map \(f:X\to Y\), \(f\) is continuous if and only if \(g\circ f\) is continuous.

Proof. If \(f\) is continuous, then \(g\) is continuous by hypothesis, so the composition theorem gives continuity of \(g\circ f\). Conversely, suppose \(g\circ f\) is continuous. The left-inverse identity gives $$ f=\operatorname{id}_Y\circ f =(r\circ g)\circ f =r\circ(g\circ f). $$ The map \(r\) is continuous by hypothesis, and \(g\circ f\) is continuous by assumption. The composition theorem shows that \(f\) is continuous. Hence the two conditions are equivalent. \(\square\)

Worked Example: Adding a Fixed Coordinate

Give \(\mathbb{R}^2\) its usual product topology and define \(g:\mathbb{R}\to\mathbb{R}^2\) by \(g(y)=(y,0)\). Let \(r:\mathbb{R}^2\to\mathbb{R}\) be the first-coordinate projection, \(r(u,v)=u\). Then \(r\circ g=\operatorname{id}_{\mathbb{R}}\), and both maps are continuous. For \(g\), the preimage of a basic open rectangle \(U\times V\) is \(U\) if \(0\in V\) and empty otherwise; for \(r\), the preimage of an open \(U\subseteq\mathbb{R}\) is \(U\times\mathbb{R}\).

For any \(f:X\to\mathbb{R}\), the composite is \(x\mapsto(f(x),0)\). The left-inverse theorem says that this map into the plane is continuous if and only if \(f\) is continuous. In particular, adding a fixed zero coordinate neither creates nor conceals a failure of continuity. The left inverse, rather than a guess based on the formula, supplies the rigorous test.

Why the Inverse Hypotheses Matter

Without a suitable inverse, a composite can lose information. If \(f\) sends every point of \(X\) to one point of \(Y\), then \(g\circ f\) only records the value of \(g\) at that single point. Its continuity gives no control over how \(g\) behaves elsewhere. Likewise, a map applied after \(g\) could identify distinct outputs and obscure differences that matter for continuity. The following examples make these limitations explicit.

Worked Example: A Constant First Map Hides a Discontinuity

Let \(Y=\{0,1\}\) have the indiscrete topology \(\{\varnothing,Y\}\), and let \(Z=\{0,1\}\) have the discrete topology, in which every subset is open. Define \(g:Y\to Z\) by \(g(0)=0\) and \(g(1)=1\). This map is not continuous: \(\{0\}\) is open in \(Z\), but $$ g^{-1}(\{0\})=\{0\} $$ is not open in the indiscrete space \(Y\).

Now take \(X=\{*\}\) with its unique topology and let \(f:X\to Y\) be given by \(f(*)=0\). Every map from a one-point space is continuous: the preimage of any set is either empty or all of \(X\). In particular, \(f\) is continuous. The composite \(g\circ f:X\to Z\) is constant, so it too is continuous by the same preimage check, although \(g\) is not. The map \(f\) has no right inverse \(Y\to X\), since it is not onto. This illustrates why the right-inverse condition cannot simply be omitted.

Worked Example: A Continuous Right Inverse Is Not Enough by Itself

Let \(X=\{0,1\}\) have the indiscrete topology and let \(Y=\{0,1\}\) have the discrete topology. Let \(f:X\to Y\) and \(s:Y\to X\) both be the identity on the underlying set. The map \(s\) is continuous: the only open sets in its target \(X\) are \(\varnothing\) and \(X\), whose preimages are open in \(Y\). Also, \(f\circ s=\operatorname{id}_Y\).

However, \(f\) is not continuous. The set \(\{0\}\) is open in \(Y\), while \(f^{-1}(\{0\})=\{0\}\) is not open in \(X\). Take \(g=\operatorname{id}_Y\). The map \(g\) is continuous, but \(g\circ f=f\) is not. Thus a continuous right inverse \(s\) does not suffice for the forward implication of the right-inverse theorem: continuity of \(f\) is also required. The reverse implication still follows whenever \(s\) is continuous, since \(g=(g\circ f)\circ s\).

Choosing and Using a Composition Test

The two cancellation tests have parallel algebraic forms, but their hypotheses belong to different maps. For a right inverse \(s\) of \(f\), the factorization is \(g=(g\circ f)\circ s\), and the theorem assumes both \(f\) and \(s\) continuous. For a left inverse \(r\) of \(g\), the factorization is \(f=r\circ(g\circ f)\), and the theorem assumes both \(g\) and \(r\) continuous. In each case, the inverse identity gives the reverse implication, while continuity of the original stage gives the forward implication.

SetupFactorization recoveredContinuity assumptions
\(f:X\to Y\) has right inverse \(s:Y\to X\)\(g=(g\circ f)\circ s\)\(f\) and \(s\) are continuous
\(g:Y\to Z\) has left inverse \(r:Z\to Y\)\(f=r\circ(g\circ f)\)\(g\) and \(r\) are continuous

When faced with a claim about continuity of a composite, first check the direction of each arrow and write down the types of the maps. Then ask whether a map can be recovered from the composite by composing with a continuous inverse on one side. An algebraic inverse that is not continuous does not justify a continuity conclusion: the composition theorem requires every map in the recovered factorization to be continuous. The open-set and closed-set criteria from the two preceding tutorials remain available for checking any individual stage, but they do not replace these hypotheses.

Finally, composition is associative: whenever the domains match, \((h\circ g)\circ f=h\circ(g\circ f)\). This identity concerns the values of the maps, not their continuity. It permits a chain of maps to be grouped in either way, while the composition theorem shows that a finite chain of continuous maps is continuous. Neither associativity nor continuity of the whole chain alone makes every intermediate map continuous; the inverse tests above specify circumstances in which such a conclusion is valid.

Check Your Understanding

Use the factorizations and hypotheses in this tutorial to answer the following questions.

  1. If \(f:X\to Y\) and \(g:Y\to Z\) are continuous, what can be concluded about \(g\circ f\)?
  2. State the two hypotheses about \(f\) and its right inverse needed for the right-inverse continuity test.
  3. If \(r\circ g=\operatorname{id}_Y\), write \(f\) as a composition involving \(r\) and \(g\circ f\).
  4. Why is a constant map \(f\) generally unsuitable for recovering continuity of \(g\) from \(g\circ f\)?
  5. In the indiscrete-to-discrete example, identify an open target set whose preimage under \(f\) is not open.