Topological spaces and Path-connected space

Let $$\{A_i\}$$ a family of connected subsets on topological space $$X$$ and let $$A_0 \in \{A_i\}$$ such that $$A_i \cap A_0 \neq \emptyset.$$ Prove that $$\bigcup A_i$$ is connected.

My Attempt:

Call $$S= \bigcup A_i$$, obviously $$A_0 \subset S$$. We have $$A_0 \cap A_i$$ is clopen in $$A_i$$ and $$A_i$$ is connected then the only clopens in $$A_i$$ are $$A_i$$ and $$\emptyset$$, since $$A_0 \cap A_i \neq \emptyset$$ so $$A_0 \cap Ai = A_i$$, that is, $$A_i \subset A_0$$ for all $$i$$. Futhermore $$S \subset A_0$$ so $$S = A_0.$$

We conclude that the only set $$A_0$$ such that $$A_0 \cap A_i \neq \emptyset$$ is $$S$$, then $$S$$ is a disjointed union of non empty sets then $$S$$ isn't connected.

Where is my wrong??

There is a variation of this question and I need tips:

Let $$\{A_i\}$$ a family of path-connected subsets on topological space $$X$$ and let $$A_0 \in \{A_i\}$$ such that $$A_i \cap A_0 \neq \emptyset.$$ Prove that $$\bigcup A_i$$ is path-connected.

• Why is $A_0 \cap A_i$ clopen in $A_i$? For the second question, construct paths through the intersection $A_i \cap A_0$ – skullph Jun 20 at 21:41
• If $X=\Bbb R$ and $\{A_i\}=\{A_0,A_1\}=\{[0,2],[1,3]\}$ then $A_0\cap A_1=[1,2]$ is not clopen in $A_0$ nor in $A_1.$ – DanielWainfleet Jun 21 at 9:39

Suppose that $$C$$ is a clopen and non-empty subset of $$A:= \bigcup_i A_i$$ (i.e. clopen in its subspace topology). We must show $$C=A$$ for connectedness. Pick $$p \in C$$ and fix $$i_1$$ such that $$p \in A_{i_1}$$.

Because subspace topologies are transitive, $$C \cap A_{i_1}$$ is clopen in $$A_{i_1}$$ and non-empty as it still contains $$p$$. So by connectedness of $$A_{i_1}$$ we have

$$C\cap A_{i_1} = A_{i_1} \implies A_{i_1} \subseteq C\tag{1}$$

Also, by assumption, $$A_0 \cap A_{i_1} \neq \emptyset$$, so by $$(1)$$ we see that $$C\cap A_0$$ is clopen in $$A_0$$ and non-empty, as it contains $$A_{i_1} \cap A_0$$, so again by connectedness of $$A_0$$:

$$C\cap A_0 = A_0 \implies A_0 \subseteq C\tag{2}$$

Now for an arbitary $$i$$, $$\emptyset \neq A_i \cap A_0 \subseteq A_i \cap C$$, the latter set is clopen in $$A_i$$ so again $$A_i \subseteq C$$ and as this holds for all $$i$$, $$A \subseteq C$$ so $$A=C$$ and $$A$$ is connected.

For path connectedness we use the standard composition of paths: if $$p_1:[0,1]\to X$$ is a path from $$x_0$$ to $$x_1$$ and $$p_2: [0,1]\to X$$ is one from $$x_1$$ to $$x_2$$, the map $$p_1 \ast p_2: [0,1]\to X$$ can be defined as $$(p_1 \ast p_2)(t)=p_1(2t)$$ for $$t \in [0,\frac12]$$ and $$(p_1 \ast p_2)(t)=p_2(2t-1)$$ for $$t \in [\frac12,1]$$ and by the pasting lemma $$p_1 \ast p_2$$ is continuous and a path from $$x_0$$ to $$x_2$$. This can be iterated via a third point as well, etc.

Apply this to $$A$$ for path-connected $$A_i$$: if $$x,y \in A$$ so $$x \in A_{i_x}$$ for some $$i_x$$ and $$y \in A_{i_y}$$ for some $$i_y$$, then fix $$x' \in A_0 \cap A_{i_x}$$ and $$x'' \in A_0 \cap A_{i_y}$$ and then combine a path $$p_1$$ from $$x$$ to $$x'$$ (both in the path-connected $$A_{i_x}$$), a path $$p_2$$ from $$x'$$ to $$x''$$ (both in $$A_0$$) and $$p_3$$ from $$x''$$ to $$y$$ (both in $$A_{i_y}$$) to get a path from $$x$$ to $$y$$ in $$A_{i_x} \cup A_0 \cup A_{i_y} \subseteq A$$.