If $S$ is a metric space and $U(x)$ is the component of $S$ containing $x$, then is $U(x)$ open in $S$?
Attempt: $U(x)$ is the union of all connected subsets of $S$ containing $\{x\}$. Hence, $U(x)$ is the maximal connected subset of $S$ which contains $\{x\}$.
Now, let $y \in S -U(x)$, then : consider the open ball $B_S(y,r_y) = \{z \in S : d_S(z,y)<r \}$
For some $r_y>0: B_S(y,r_y)$ cannot contain any member of $U(x)$ else, if it contains a member $q \in U(x)$, then $y$ can be path wise connected to $q$ and hence $B_S(y,r_y) \bigcup U(x)$ is connected
which means the component of $x$ should now become $U(x) \bigcup B_S(y,r_y)$ which is a contradiction to the maximality of $U(x)$ .
Hence, our assumption that $B_S(y,r_y)$ cannot contain any member of $U(x)$ is false.
which means $B_S(y,r_y) \subseteq S-U(x)$ and hence, $S-U(x)$ is open and hence, $U(x)$ is closed.
Did I attempt this correctly?
Thank you for your help..
Your proof is not correct in its current state : beware the confusion between connected and pathwise connected. The latter implies the first, but for instance $\mathbb{Q}$ is connected but not pathwise connected.
As the statement to prove is strictly topological and not metric, I would personally prove it without using any metric :
Let $x \in S$, $U_x$ the union of all connected subsets of $S$ containing $x$, and $V_x$ the intersection of all subsets of $S$ containing $x$ that are both open and closed.
You want to prove $U_x = V_x$.
Clearly, $U_x \subset V_x$ because by the very definition any connected set cannot contain strictly a subset both open and closed.
Conversely, let $y \not\in U_x$, and let $W_y$ be an open and closed subset of $S$ containing $y$. Then $W_x$ is not connected, hence can be partitioned into two open and closed subsets $A$ and $B$, with one containing $x$ and the other containing $y$. Let's say $A$ contains $x$. Then $A$ is both open and closed, thus $V_x \subset A$, thus $y \not\in V_x$. So $V_x \subset U_x$, and we're done.