Does a Connected Graph Imply That a Function Is Continuous?
At a glance
- 1. Choose an example
On [0,1], set f(0)=0 and f(x)=sin(1/x) for x>0.
- 2. Check discontinuity
As x approaches zero, f(x) takes values 1 and −1 along sequences, so it has no limit.
- 3. Check connectedness
The graph over (0,1] is connected, and (0,0) is in its closure; adjoining that point preserves connectedness.
A function can be discontinuous even if its graph is a connected subset of the plane. The key is that connectedness rules out a separation into two disjoint relatively open pieces; it does not require the graph to vary continuously with the input.
A standard example is the function on defined by
This function is not continuous at , but its graph is connected in .
Why the function is discontinuous
Continuity at zero would require to approach as approaches zero from the right. Instead, the function continues to oscillate between and .
For example, take the sequences
Both sequences approach zero. But
for every nonnegative integer . Since these values do not approach a common limit, is not continuous at zero. In particular, its limit at zero does not exist.
Why the graph is connected
Let be the part of the graph corresponding to :
The interval is connected, and the map is continuous on that interval. The continuous image of a connected set is connected, so is connected.
The full graph adds just one point, . That point lies in the closure of : for instance, tends to zero and, for positive integers , . Thus the graph contains points approaching .
A useful general fact is that if is connected and a point lies in the closure of , then is connected. To see why, suppose this union could be split into two disjoint, nonempty, relatively open sets. Connectedness forces all of to lie in one side. The other side would then contain only ; but because is in the closure of , no relative neighborhood of can avoid . That contradicts the supposed separation. Applying this fact to and proves that the full graph is connected.
What connectedness does and does not tell you
For a continuous function on a connected domain, the graph is connected: the graph is the continuous image of the domain under . The example shows that the reverse implication fails. A connected graph may have increasingly rapid oscillations near a point, as long as the graph does not split into two separated pieces.
Connectedness is a topological property of the graph as a whole. Continuity is a local condition on the function: nearby inputs must produce nearby outputs. One property does not substitute for the other.
Common mistakes
- Confusing the graph with its closure. The example’s graph is connected, but it is not closed. Its closure includes the entire vertical segment , since values near zero accumulate throughout that interval. The graph itself contains only above .
- Assuming oscillation makes the graph disconnected. Oscillation prevents a limit, but does not by itself create a separation of the graph into disjoint relatively open pieces.
- Checking only one sequence. To show discontinuity, it is enough to find sequences approaching the input along which the function values have incompatible limits. Here one sequence gives values constantly equal to , and another gives values constantly equal to .
So a connected graph is not enough to conclude continuity. You need the function’s values to approach the value at each point, not merely for the graph to form one connected set.
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.