Why Breakpoints Matter
A formula may change from one part of an interval to another, but continuity is a property of the resulting map, not of the notation used to describe it. On each piece, continuity can be checked using the formula there. At a shared endpoint, the formulas must also give the same value. The pasting lemmas explain why these local checks are enough, and why it matters whether the pieces are open or closed.
Unless stated otherwise, every real interval below has the subspace topology inherited from \(\mathbb{R}\) with its standard topology, and every codomain \(\mathbb{R}\) has its standard topology. A map \(f:X\to Y\) is continuous if the preimage \(f^{-1}(V)\) of every open set \(V\subseteq Y\) is open in \(X\). An open or closed subset of an interval is understood relative to that interval.
Proof. The agreement condition makes the definition \(f(x)=f_i(x)\) for any \(i\) with \(x\in U_i\) independent of the choice of \(i\). It also gives uniqueness, since every point belongs to at least one \(U_i\). Let \(V\subseteq Y\) be open. Then \(f^{-1}(V)=\bigcup_{i\in J} f_i^{-1}(V)\), where each preimage on the right is taken within \(U_i\). Since \(f_i\) is continuous, \(f_i^{-1}(V)\) is open in \(U_i\); since \(U_i\) is open in \(X\), a set open in \(U_i\) is open in \(X\). Thus their union is open in \(X\). The open-preimage definition proves that \(f\) is continuous. \(\square\)
Proof. Agreement on intersections defines a single map \(f\) on all of \(X\). Let \(F\) be closed in \(Y\). By continuity on each \(C_i\), the set \(f_i^{-1}(F)\) is closed in \(C_i\). A subset closed in a closed subspace \(C_i\) is closed in \(X\): it has the form \(C_i\cap D_i\) for some closed \(D_i\subseteq X\), and this intersection is closed in \(X\). Therefore each \(f_i^{-1}(F)\), viewed as a subset of \(X\), is closed. Because the \(C_i\) cover \(X\), \(f^{-1}(F)=\bigcup_{i=1}^{n} f_i^{-1}(F)\). This is a finite union of closed sets, hence closed in \(X\). The closed-set test for continuity now gives continuity of \(f\). \(\square\)
A Criterion for Piecewise Maps on an Interval
Let \(a=x_0<x_1<\cdots<x_n=b\) be a finite partition of a nondegenerate closed interval \([a,b]\). The subintervals \(C_i=[x_{i-1},x_i]\) are closed in \([a,b]\), and their union is the whole interval. Consecutive pieces meet at one breakpoint; nonconsecutive pieces do not meet. This gives a direct test for piecewise formulas.
Proof. The only points assigned by two consecutive branches are their common endpoint \(x_i\). The stated equality gives the same value there, so the definition is well-defined. The pieces form a finite closed cover of \([a,b]\), and each restriction is continuous by assumption. The closed-cover pasting lemma therefore gives continuity of \(f\). Conversely, a single-valued map has only one value at \(x_i\); its restrictions to the two pieces must both equal that value. Hence \(f_i(x_i)=f_{i+1}(x_i)\). \(\square\)
The theorem includes the endpoints \(a\) and \(b\): each belongs to just one piece, so there is no matching condition at an outer endpoint. If the domain consists of a single point, continuity is automatic; the partition criterion above is stated for \(a<b\).
Worked Example: A Tent-Shaped Map
Define \(f:[-2,2]\to\mathbb{R}\) by \(f(x)=x+2\) for \(-2\le x\le0\), and \(f(x)=2-x\) for \(0\le x\le2\). Check continuity using the closed-cover criterion.
The pieces are \(C_1=[-2,0]\) and \(C_2=[0,2]\), closed in \([-2,2]\), and \(C_1\cup C_2=[-2,2]\). Each branch is an affine function and is continuous on its interval. At the shared breakpoint, the first branch gives \(0+2=2\), and the second gives \(2-0=2\). Thus they agree, and the criterion proves that \(f\) is continuous on the entire interval.
Check: at the left endpoint \(f(-2)=-2+2=0\); at the breakpoint \(f(0)=2\) from either branch; and at the right endpoint \(f(2)=2-2=0\). These evaluations confirm the branch values used in the continuity check.
Computing Preimages Branch by Branch
Once continuity has been established, the same piecewise description also helps compute preimages. For a target set \(V\), first solve \(f_i(x)\in V\) on each branch, keeping that branch’s domain restrictions. Then take the union of the solutions. Strict inequalities in an open target set remain strict when solving the branch conditions.
Worked Example: A Piecewise Polynomial and Linear Map
Let \(f:[-1,1]\to\mathbb{R}\) be given by \(f(x)=x^2\) for \(-1\le x\le0\), and \(f(x)=x\) for \(0\le x\le1\). Verify continuity and compute \(f^{-1}((-1/2,1/2))\).
Both branches are continuous. At \(0\), the left branch gives \(0^2=0\) and the right branch gives \(0\), so the closed-cover criterion proves continuity.
On the negative branch, the condition is \(-1\le x\le0\) and \(-1/2<x^2<1/2\). Since \(x^2\ge0\), the lower inequality is automatic. The upper inequality gives \(|x|<\sqrt{1/2}=\sqrt{2}/2\), so this branch contributes \((-\sqrt{2}/2,0]\).
On the nonnegative branch, \(-1/2<x<1/2\) together with \(0\le x\le1\) gives \([0,1/2)\). Taking the union, including the shared point \(0\) only once, yields \(f^{-1}((-1/2,1/2))=(-\sqrt{2}/2,1/2)\).
Check: \(f(-\sqrt{2}/2)=(-\sqrt{2}/2)^2=1/2\), which is excluded from the target, and \(f(1/2)=1/2\), also excluded. The point \(-1\) maps to \(1\), and \(1\) maps to \(1\), so neither endpoint belongs to the preimage. Every point in the stated interval satisfies the appropriate strict inequality on its branch.
When an Open Cover Is More Useful
The closed-cover lemma is natural for a finite partition into closed subintervals. The open-cover lemma is useful when local definitions are given on overlapping open neighborhoods instead. A finite partition such as \([-1,0]\) and \([0,1]\) is not an open cover: its pieces are not open in \([-1,1]\). For instance, every relative neighborhood of \(0\) in \([-1,1]\) contains positive points, so \([-1,0]\) is not relatively open. Agreement at a breakpoint alone does not turn closed pieces into open pieces.
Worked Example: Gluing Across an Open Overlap
Let \(X=[-1,1]\). Set \(U=[-1,3/4)\) and \(V=(1/4,1]\), both with the subspace topology from \(\mathbb{R}\). These are open in \(X\), since \(U=X\cap(-2,3/4)\) and \(V=X\cap(1/4,2)\), and \(U\cup V=X\).
Define \(h_U:U\to\mathbb{R}\) by \(h_U(x)=0\). Define \(h_V:V\to\mathbb{R}\) by \(h_V(x)=0\) when \(x\le3/4\), and \(h_V(x)=(x-3/4)^2\) when \(x\ge3/4\). The two formulas for \(h_V\) agree at \(3/4\), since both give \(0\); they are continuous on their closed subintervals, so the closed-cover lemma shows \(h_V\) is continuous on \(V\). The map \(h_U\) is constant and continuous.
The overlap is \(U\cap V=(1/4,3/4)\). Every \(x\) there satisfies \(x<3/4\), so \(h_V(x)=0=h_U(x)\). The open-cover pasting lemma therefore gives a continuous map \(h:X\to\mathbb{R}\). Explicitly, \(h(x)=0\) for \(-1\le x\le3/4\), and \(h(x)=(x-3/4)^2\) for \(3/4\le x\le1\). At the breakpoint both expressions give \(0\), as required.
Check: at \(x=1\), the second expression gives \((1-3/4)^2=(1/4)^2=1/16\). Points in the overlap, such as \(x=1/2\), give \(0\) from both local maps because \(1/2<3/4\). Thus the local definitions agree precisely where the open-cover lemma requires them to agree.
A Common Mistake and a Practical Check
Common pitfall: applying the open-cover lemma to the closed halves of an interval just because they cover it. For the preceding piecewise polynomial-linear example, \([-1,0]\) and \([0,1]\) cover \([-1,1]\), but neither is open in \([-1,1]\). The open-cover lemma does not apply to those sets. The correction is to use the closed-cover lemma, check that both branches are continuous on their closed pieces, and verify agreement at \(0\).
A second common error is to solve a branch inequality without retaining that branch’s domain restriction. For example, in the polynomial-linear example the condition \(x^2<1/2\) gives \(-\sqrt{2}/2<x<\sqrt{2}/2\) on the real line. But on the negative branch the domain also requires \(x\le0\), so its contribution is only \((-\sqrt{2}/2,0]\), not the entire interval \((-\sqrt{2}/2,\sqrt{2}/2)\). The linear branch must be solved separately. Intersecting each solution with its branch domain before taking the union prevents this error.
For a finite piecewise definition on a closed interval, the reliable procedure is to identify the topology and the pieces, confirm that the pieces cover the domain and are closed, check continuity on each piece, and compare values at every shared breakpoint. For a local definition on open neighborhoods, instead confirm that the sets are open and cover the domain, then check agreement on every overlap. The hypotheses determine which pasting argument is valid.
Check Your Understanding
For each question, identify the relevant branch domains before checking values or solving inequalities.
- Define \(g:[0,2]\to\mathbb{R}\) by \(g(x)=3x\) for \(0\le x\le1\) and \(g(x)=x+2\) for \(1\le x\le2\). Is \(g\) continuous? Verify the breakpoint values.
- For \(f\) in the polynomial-linear example, compute \(f^{-1}((0,1/4))\), keeping the branch restrictions and strict endpoints.
- Explain why the two sets \([0,1]\) and \([1,2]\) are a closed cover of \([0,2]\) but not an open cover in the relative topology.
- In the open-cover example, what is \(h(3/4)\), and why must both local definitions give that value wherever they overlap?
- State the continuity and agreement hypotheses needed to paste finitely many maps defined on closed subsets.