Equivalence of definitions of connected component

Statement
We would like to show that the following definitions of connected component make sense and are equivalent.

Definition as a subset
A connected component of a topological space is defined as a subset satisfying the following two conditions:


 * 1) It is a connected subset, i.e., it is a connected space with the subspace topology.
 * 2) It is not properly contained in any bigger subset that is connected.

Definition in terms of equivalence relation
For a topological space $$X$$, consider the following relation: $$a \sim b$$ if there exists a subset of $$X$$ containing both $$a$$ and $$b$$ that is a connected space under the subspace topology. Then, it turns out that $$\! \sim$$ is an equivalence relation on $$X$$. The equivalence classes under $$\! \sim $$ are termed the connected components of $$X$$.

Facts used

 * 1) uses::Connected union of connected subsets is connected

Proof that the specified relation is an equivalence relation
We prove all three aspects of an equivalence relation:

Proof from equivalence relation to subset definition
Since $$\! \sim$$ is an equivalence relation, its equivalence classes are subsets. We now want to argue that:


 * 1) Each equivalence class is a connected subset: This follows essentially from Fact (1). Let $$C$$ be an equivalence class. Pick any point $$a$$ in an equivalence class. Then, for any point $$b$$ in the class, let $$D(a,b)$$ be a connected subset containing both $$a$$ and $$b$$. The whole equivalence class is a union $$\bigcup_{b \in C} D(a,b)$$ and hence, by Fact (1), is connected.
 * 2) No equivalence class is contained in a bigger connected subset: If it were, then elements outside the subset would be related to elements inside the subset, contradicting its definition as an equivalence class.

Proof from subset definition to equivalence relation
For this, suppose $$C$$ is any maximal connected subset and suppose it is not an equivalence class. Let $$a \in C$$ and let $$D$$ be the equivalence class of $$a$$. Then, we just noted that $$D$$ is connected, so $$C \cup D$$ is connected by Fact (1), hence contradicting the maximality of $$C$$.