Ma · Mathematics

How to Show That X Is Path Connected

Published By the 9to5Science editorial team

At a glance

  1. 1. Find a rational coordinate

    For each point in X, use whichever coordinate is rational; at least one is rational by definition.

  2. 2. Join the origin

    Move along a segment that keeps the rational coordinate fixed, then along an axis to the origin.

  3. 3. Join two points

    Connect each point to the origin and reverse one of the paths to get a path between them.

Advertisement

Let

X={(x,y)∈R2:x∈Q or y∈Q}.X=\{(x,y)\in\mathbb{R}^2 : x\in\mathbb{Q}\text{ or }y\in\mathbb{Q}\}.

To prove that XX is path connected, it is enough to show that any two of its points can be joined by a continuous path lying entirely in XX. The useful feature of the definition is that every point has at least one rational coordinate. Keep that coordinate fixed while moving to an axis, then use an axis segment to reach the origin.

Join any point to the origin

Take an arbitrary point p=(a,b)∈Xp=(a,b)\in X. There are two cases.

If a∈Qa\in\mathbb{Q}, first move vertically from (a,b)(a,b) to (a,0)(a,0). Every point on this segment has first coordinate aa, so it belongs to XX. Then move horizontally from (a,0)(a,0) to (0,0)(0,0). Along this second segment the second coordinate is 00, which is rational, so it too lies in XX.

If instead b∈Qb\in\mathbb{Q}, first move horizontally from (a,b)(a,b) to (0,b)(0,b). The second coordinate remains the rational number bb, so this segment lies in XX. Then move vertically from (0,b)(0,b) to (0,0)(0,0). Here the first coordinate is 0∈Q0\in\mathbb{Q}, so this segment lies in XX as well.

If both coordinates are rational, either construction works. Thus every point in XX can be joined to the origin by a path contained in XX.

Turn the paths into a path between two points

Let p,q∈Xp,q\in X. Choose a path γp:[0,1]→X\gamma_p:[0,1]\to X from pp to the origin, and a path γq:[0,1]→X\gamma_q:[0,1]\to X from qq to the origin, as above. Travel from pp to the origin, then follow the second path backward to qq:

γ(t)={γp(2t),0≤t≤12,γq(2−2t),12≤t≤1.\gamma(t)= \begin{cases} \gamma_p(2t), & 0\le t\le \tfrac12,\\ \gamma_q(2-2t), & \tfrac12\le t\le 1. \end{cases}

The two formulas agree at t=12t=\tfrac12, where both give the origin. Each part is continuous, so the joined path is continuous; its image stays in XX because each of the original paths does. It starts at pp and ends at qq. Since pp and qq were arbitrary, XX is path connected.

A concrete example

Consider p=(2,1/3)p=(\sqrt{2},1/3) and q=(2/7,π)q=(2/7,\pi). The first point has rational second coordinate. Join it to the origin using

(2,1/3)⟶(0,1/3)⟶(0,0).(\sqrt{2},1/3)\longrightarrow(0,1/3)\longrightarrow(0,0).

The first segment stays on the horizontal line y=1/3y=1/3, and the second stays on the vertical line x=0x=0. The second point has rational first coordinate, so use

(2/7,π)⟶(2/7,0)⟶(0,0).(2/7,\pi)\longrightarrow(2/7,0)\longrightarrow(0,0).

This path stays on the vertical line x=2/7x=2/7 and then the horizontal line y=0y=0. Following the first route backward from the origin and then the second route forward gives a path from pp to qq in XX.

Why the axis segments always work

The set can be written as the union

X=(Q×R)∪(R×Q).X=(\mathbb{Q}\times\mathbb{R})\cup(\mathbb{R}\times\mathbb{Q}).

It contains every vertical line whose xx-coordinate is rational and every horizontal line whose yy-coordinate is rational. In particular, the entire yy-axis and the entire xx-axis lie in XX. The point (0,0)(0,0) is where these two axes meet, making it a convenient common point for the paths.

The proof does not depend on rational numbers being dense, nor does it require a complicated curve. It uses only the coordinate condition defining XX and the fact that a line segment with one fixed rational coordinate remains in the set.

Common mistakes

  • Assuming the straight segment between any two points works. It need not. For example, (0,1)(0,1) and (1,0)(1,0) belong to XX, but their straight segment contains points with both coordinates irrational, such as (2/2,1−2/2)(\sqrt{2}/2,1-\sqrt{2}/2). Use the two-segment route through the origin instead.
  • Checking only the endpoints of a segment. Membership in XX must hold at every point along the path. The construction guarantees this by keeping one coordinate rational throughout each segment.
  • Showing only that the set is connected. Path connectedness asks for a continuous map from an interval between each pair of points. Constructing the paths explicitly proves the stronger, requested property.

Because path-connected spaces are connected, this also shows that XX is connected.

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.