Connectivity and Components

Suppose a network engineer wants to know whether every server in a data center can send a message to every other server. Suppose an epidemiologist wants to know how far a disease can spread through a contact network. Both questions reduce to a single combinatorial idea: can you walk from one vertex to another along the edges of a graph? This article develops that idea rigorously. It starts from reachability between two vertices. It builds up to the notion of a connected graph and its connected components. Connectivity is one of the most basic structural questions one can ask about a graph. Yet it organizes an enormous amount of graph theory. Once we know a graph splits into pieces that cannot reach each other, we can study each piece separately. Many theorems about graphs are really theorems about connected graphs. These theorems extend to general graphs component by component. The idea also gives graph theory its first genuine equivalence relation. It turns "being connected" from a vague description into a precise partition of the vertex set. The big picture is this: reachability by walks (or equivalently by paths) is an equivalence relation on vertices. Its equivalence classes are the connected components of the graph. A graph is connected exactly when it has a single component. This sounds almost too simple to be a theorem. But proving it carefully — checking reflexivity, symmetry, transitivity, and the path-vs-walk subtlety — is exactly the kind of rigor that separates casual intuition from a working mathematical tool. This article gives the formal definitions of connectedness, components, and reachability. It proves that reachability is an equivalence relation whose classes are the components. It proves a companion characterization of components via maximal connected subgraphs. It works two nontrivial examples. It shows what breaks if a natural-looking hypothesis is dropped. It closes by connecting this material to the deeper measures of connectivity — vertex and edge connectivity. It also connects to the structural role connectivity plays in the theory of trees.

Key takeaways
  • Two vertices are connected if some walk (equivalently, some path) joins them; a graph is connected if every pair of vertices is.
  • Reachability is an equivalence relation on the vertex set: reflexive, symmetric, transitive.
  • Its equivalence classes are exactly the connected components of the graph — maximal connected subgraphs.
  • A graph is connected iff it has exactly one connected component.
  • Every walk between two vertices can be shortened to a path between them, so "connected by a walk" and "connected by a path" agree.
  • Key idea: connectivity partitions any graph into independent connected pieces, and studying one connected graph at a time loses no generality.

Where this lives today

Connected components are computed by standard graph-search algorithms (breadth-first and depth-first search), which run in linear time in the size of the graph; this makes connectivity-checking one of the cheapest nontrivial questions in all of algorithmic graph theory, and it underlies union-find data structures used throughout computer science. In network engineering, checking whether a communication network stays connected after link failures is literally the question "is c(G)c(G) still 11?" In social network analysis, connected components identify separate communities or clusters that share no path of acquaintance. In image processing, "connected component labeling" segments a binary image into blobs of touching pixels, a direct pixel-grid instance of this theorem. In percolation theory and statistical physics, the emergence of a single giant connected component in a random graph as edge density increases is a phase transition studied via exactly the equivalence-class machinery proved here. In cryptographic protocol design and distributed computing, connectivity of the underlying communication graph is a baseline assumption for consensus and broadcast protocols to even be possible. And in pure graph theory, connectivity is the natural first step before finer invariants: it sets up Vertex and Edge Connectivity (how many vertices or edges must be removed to disconnect a graph) and is exactly the hypothesis needed to state the defining property of trees as minimal connected graphs.

Ask the tutor: How do breadth-first search and depth-first search each compute the connected components of a graph, and why do both run in linear time?

DefinitionConnectivity, components, and reachability

Let G=(V,E)G = (V,E) be a graph (finite, undirected, simple unless stated otherwise; loops and multiple edges do not affect the definitions below).

Reachability. A vertex u∈Vu \in V is said to reach a vertex v∈Vv \in V, written u∼vu \sim v, if u=vu = v or there exists a walk in GG from uu to vv, i.e. a sequence of vertices

u=w0,w1,w2,…,wk=vu = w_0, w_1, w_2, \dots, w_k = v

with k≥0k \geq 0 and {wi−1,wi}∈E\{w_{i-1}, w_i\} \in E for each i=1,…,ki = 1, \dots, k.

Connected graph. GG is connected if u∼vu \sim v for every pair u,v∈Vu, v \in V; equivalently, V≠∅V \neq \varnothing and there is a path between every pair of vertices (the equivalence of "walk" and "path" versions is proved below). By convention, the graph with a single vertex and no edges is connected; some authors also allow the empty graph to be vacuously connected, but we will only discuss graphs with V≠∅V \ne \varnothing.

Connected component. A connected component of GG is a maximal connected subgraph of GG: a subgraph HH that is connected, and such that no strictly larger subgraph of GG containing HH is connected. Equivalently (as we will prove), a connected component is the subgraph induced on an equivalence class of the relation ∼\sim. We write c(G)c(G) for the number of connected components of GG. Thus GG is connected precisely when c(G)=1c(G) = 1.

Intuition

Picture a graph as a collection of islands (vertices) linked by bridges (edges). The relation u∼vu \sim v says: you can walk from island uu to island vv crossing only bridges that exist. If every island can reach every other island, the whole archipelago is "one piece" — connected. If not, the archipelago naturally splits into clusters of islands that are internally fully reachable but mutually unreachable across clusters. Those clusters are the connected components. The key mental habit to build is that reachability behaves like an equivalence relation, the same kind of object as "same remainder mod nn" or "same parity." Once you see ∼\sim as an equivalence relation, the whole theory of components becomes a special case of a fact you already know: an equivalence relation partitions a set into disjoint classes. The only graph-theoretic work is showing that walks compose (to get transitivity), reverse (to get symmetry), and that a single vertex reaches itself (reflexivity).

Figure
A disconnected graph with three components, each shown as a maximal connected piece
v1 v2 v3 v4 v5 component C1 (5 vertices) v6 v7 v8 component C2 (3 vertices) v9 component C3 (isolated)
TheoremReachability, components, and connectedness

Let G=(V,E)G = (V,E) be a graph with V≠∅V \neq \varnothing. Then: 1. The relation ∼\sim defined by u∼vu \sim v iff u=vu = v or there is a walk from uu to vv is an equivalence relation on VV. 2. For every pair of vertices u,vu,v, u∼vu \sim v if and only if there is a path from uu to vv (not merely a walk). 3. The equivalence classes of ∼\sim are precisely the vertex sets of the connected components of GG: each equivalence class, together with all edges of GG joining two vertices in that class, is a maximal connected subgraph, and every maximal connected subgraph arises this way. 4. Consequently the connected components partition VV and partition EE (every edge lies in exactly one component), and

G is connected  ⟺  c(G)=1.G \text{ is connected} \iff c(G) = 1.
Proof

We prove the four parts in order, using the definitions above and basic facts about walks.

(1) ∼\sim is an equivalence relation. Reflexivity. For any u∈Vu \in V, u∼uu \sim u holds by the "u=vu=v" clause in the definition (the trivial walk of length 00). Symmetry. Suppose u∼vu \sim v. If u=vu = v this is symmetric trivially. Otherwise there is a walk

u=w0,w1,…,wk=v,k≥1,u = w_0, w_1, \dots, w_k = v, \qquad k \geq 1,

with {wi−1,wi}∈E\{w_{i-1},w_i\} \in E for each ii. Since the graph is undirected, {wi−1,wi}={wi,wi−1}∈E\{w_{i-1}, w_i\} = \{w_i, w_{i-1}\} \in E for each ii, so the reversed sequence

v=wk,wk−1,…,w0=uv = w_k, w_{k-1}, \dots, w_0 = u

is also a walk, this time from vv to uu. Hence v∼uv \sim u. Transitivity. Suppose u∼vu \sim v and v∼zv \sim z. If u=vu = v then u∼zu \sim z follows immediately from v∼zv \sim z; similarly if v=zv = z. So assume there is a walk

u=a0,a1,…,am=vu = a_0, a_1, \dots, a_m = v

and a walk

v=b0,b1,…,bn=z.v = b_0, b_1, \dots, b_n = z.

Concatenating the sequences,

u=a0,a1,…,am=b0,b1,…,bn=z,u = a_0, a_1, \dots, a_m = b_0, b_1, \dots, b_n = z,

gives a sequence of vertices in which every consecutive pair is joined by an edge of GG (each consecutive pair within the first walk and within the second walk is an edge by hypothesis, and the join point am=b0=va_m = b_0 = v contributes no new pair since it is a single vertex, not a new step). This is a walk from uu to zz, so u∼zu \sim z. Since ∼\sim is reflexive, symmetric, and transitive on VV, it is an equivalence relation.

(2) Walk-reachability equals path-reachability. If there is a path from uu to vv, a path is in particular a walk (a walk with no repeated vertices), so u∼vu \sim v by definition. This proves one direction (and holds even if u=vu = v, taking the length-00 path). Conversely, suppose u∼vu \sim v via a walk u=w0,w1,…,wk=vu = w_0, w_1, \dots, w_k = v. We show by strong induction on kk that a path from uu to vv exists. Base case k=0k = 0: then u=vu = v, and the length-00 walk is already a path. Inductive step: suppose the claim holds for all walks of length less than kk, and let u=w0,…,wk=vu = w_0, \dots, w_k = v be a walk of length k≥1k \geq 1. If no vertex repeats among w0,…,wkw_0, \dots, w_k, the walk is already a path and we are done. Otherwise some vertex repeats: there exist indices i<ji < j with wi=wjw_i = w_j. Delete the segment strictly between them, forming the shorter sequence

w0,w1,…,wi,wj+1,…,wk.w_0, w_1, \dots, w_i, w_{j+1}, \dots, w_k.

Consecutive vertices in this shorter sequence are still joined by edges: within the untouched prefix and suffix this is inherited from the original walk, and at the splice point {wi,wj+1}={wj,wj+1}∈E\{w_i, w_{j+1}\} = \{w_j, w_{j+1}\} \in E since that was an edge of the original walk. This is a walk from uu to vv of length k−(j−i)<kk - (j - i) < k (strictly shorter, since j>ij > i). By the induction hypothesis applied to this strictly shorter walk, there is a path from uu to vv. By strong induction, every walk from uu to vv can be reduced to a path from uu to vv, completing the proof of (2).

(3) Equivalence classes are exactly the connected components. Let [u][u] denote the equivalence class of uu under ∼\sim, and let HuH_u denote the subgraph induced on [u][u]: vertex set [u][u], and all edges of GG with both endpoints in [u][u]. HuH_u is connected. For any x,y∈[u]x, y \in [u], we have x∼ux \sim u and u∼yu \sim y (by definition of the equivalence class and symmetry/reflexivity), so by transitivity x∼yx \sim y, hence by part (2) there is a path from xx to yy using a walk witnessing x∼yx \sim y. We must check this path lies entirely within HuH_u, i.e. every vertex on it is in [u][u]. Indeed, if x=t0,t1,…,tr=yx = t_0, t_1, \dots, t_r = y is this path, then for every vertex tit_i on it, x∼tix \sim t_i (walk along the initial segment of the path), so ti∼x∼ut_i \sim x \sim u gives ti∈[u]t_i \in [u] by transitivity. Hence the path lies in HuH_u, showing xx and yy are connected within HuH_u. As x,y∈[u]x,y \in [u] were arbitrary, HuH_u is connected. HuH_u is maximal. Suppose H′H' is a connected subgraph of GG with Hu⊆H′H_u \subseteq H' and H′≠HuH' \neq H_u; we derive a contradiction. Since H′⊋HuH' \supsetneq H_u as subgraphs and they share the same intersection structure, H′H' has a vertex z∉[u]z \notin [u] (if H′H' had the same vertex set as HuH_u it could only add edges among vertices of [u][u], but HuH_u already includes all edges of GG between vertices of [u][u], by definition of induced subgraph, so no edges could be added; hence any strictly larger H′H' must have an extra vertex). Since HuH_u is nonempty (it contains uu) and H′H' is connected, there is a path in H′H' from uu to zz; this is in particular a walk in GG from uu to zz, so u∼zu \sim z, i.e. z∈[u]z \in [u] — contradicting z∉[u]z \notin [u]. Hence no strictly larger connected subgraph containing HuH_u exists, and HuH_u is a maximal connected subgraph, i.e. a connected component. Every connected component arises this way. Let HH be any maximal connected subgraph of GG, and pick any vertex u0u_0 of HH. We claim H=Hu0H = H_{u_0}. Since HH is connected, every vertex xx of HH satisfies x∼u0x \sim u_0 (a path within HH is a walk in GG), so every vertex of HH lies in [u0][u_0], giving V(H)⊆[u0]V(H) \subseteq [u_0]. Conversely if y∈[u0]y \in [u_0] then y∼u0y \sim u_0, so by part (2) there is a path PP from u0u_0 to yy in GG; consider the subgraph H∪PH \cup P (union of vertex and edge sets). It is connected, because any two vertices of HH are joined within HH, any two vertices of PP are joined within PP, and u0u_0 lies in both, so by transitivity of reachability-within-a-subgraph (the same argument as transitivity of ∼\sim, applied to walks confined to H∪PH \cup P) every vertex of H∪PH\cup P reaches every other. Since HH is maximal and H∪P⊇HH \cup P \supseteq H is connected, we must have H∪P=HH \cup P = H, forcing y∈V(H)y \in V(H). So [u0]⊆V(H)[u_0] \subseteq V(H) as well, giving V(H)=[u0]V(H) = [u_0]. Finally the edge sets agree too: HH, being an induced-enough maximal connected subgraph, must contain every edge of GG between two vertices of V(H)V(H) — for if some edge e={a,b}e=\{a,b\} with a,b∈V(H)a,b \in V(H) were missing from HH, adding it back gives a strictly larger connected subgraph H+e⊋HH + e \supsetneq H (still connected, since HH was already connected without needing ee), contradicting maximality of HH. So E(H)E(H) consists of exactly all edges of GG within V(H)=[u0]V(H) = [u_0], i.e. H=Hu0H = H_{u_0}. This proves the equivalence classes of ∼\sim correspond exactly, bijectively, to the connected components of GG.

(4) Partition and the connectedness criterion. Since ∼\sim is an equivalence relation on VV (part 1), its equivalence classes partition VV; by part (3) these are exactly the vertex sets of the components, so the components partition VV. Every edge {a,b}∈E\{a,b\} \in E satisfies a∼ba \sim b directly (the edge itself is a walk of length 1), so aa and bb lie in the same class/component; hence each edge lies inside exactly one component's induced subgraph, and the components partition EE as well. Finally, GG is connected (every pair of vertices satisfies u∼vu \sim v) if and only if ∼\sim has a single equivalence class, i.e. VV itself is one class — which by part (3) means there is exactly one connected component. This proves GG connected   ⟺  c(G)=1\iff c(G) = 1. ■\blacksquare

∎

Worked examples

Example 1: Computing components of an explicit graph. Let GG have vertex set V={1,2,3,4,5,6,7,8}V = \{1,2,3,4,5,6,7,8\} and edge set

E={{1,2},{2,3},{3,1},{3,4},{5,6},{6,7},{7,5},{7,8}}.E = \{\{1,2\}, \{2,3\}, \{3,1\}, \{3,4\}, \{5,6\}, \{6,7\}, \{7,5\}, \{7,8\}\}.

There is no vertex numbered as isolated by omission — vertex 88 appears only via edge {7,8}\{7,8\}, and all of 11–88 appear in some edge, so no vertex is isolated. We compute ∼\sim-classes directly. Start with vertex 11: it is joined to 22 and 33 directly; 22 is joined to 33; 33 is joined to 44. So 1∼21 \sim 2 (edge), 1∼31 \sim 3 (edge), and 1∼41 \sim 4 via the walk 1,3,41,3,4. No edge touches {5,6,7,8}\{5,6,7,8\} from {1,2,3,4}\{1,2,3,4\}, so we cannot extend further from this side. Hence one candidate class is {1,2,3,4}\{1,2,3,4\}. Check maximality/closure: every edge with an endpoint in {1,2,3,4}\{1,2,3,4\} is {1,2},{2,3},{3,1},{3,4}\{1,2\},\{2,3\},\{3,1\},\{3,4\} — all four endpoints stay inside {1,2,3,4}\{1,2,3,4\}. So this is a full equivalence class (no missing outgoing edges), giving component C1C_1 with vertex set {1,2,3,4}\{1,2,3,4\} and edge set {{1,2},{2,3},{3,1},{3,4}}\{\{1,2\},\{2,3\},\{3,1\},\{3,4\}\}: a triangle 1,2,31,2,3 with a pendant edge to 44. Now start from 55: 5∼65 \sim 6 (edge), 5∼75 \sim 7 (edge), 6∼76\sim 7 (edge), and 7∼87 \sim 8 (edge). So {5,6,7,8}\{5,6,7,8\} all lie in one class. Checking closure: all edges touching this set are {5,6},{6,7},{7,5},{7,8}\{5,6\},\{6,7\},\{7,5\},\{7,8\}, with both endpoints inside {5,6,7,8}\{5,6,7,8\}; no edge leaves this set. This is the second component C2C_2: a triangle 5,6,75,6,7 with a pendant edge to 88. By Theorem part (4), {1,2,3,4}\{1,2,3,4\} and {5,6,7,8}\{5,6,7,8\} partition VV (indeed 4+4=8=∣V∣4+4=8=|V|, and they are disjoint), so these are all the components: c(G)=2c(G) = 2, hence GG is not connected. Notice the asymmetry deliberately built in: C1C_1's pendant hangs off the triangle vertex 33, while C2C_2's pendant hangs off vertex 77 — the two components are isomorphic as abstract graphs but attached to differently labeled anchor vertices, illustrating that component computation is about the labeled structure, not just isomorphism type.

Example 2: Verifying connectivity via path search, and reconstructing components after an edge deletion. Let GG have vertex set {a,b,c,d,e,f}\{a,b,c,d,e,f\} and edges

E={{a,b},{b,c},{c,d},{d,e},{a,e},{c,f}}.E = \{\{a,b\},\{b,c\},\{c,d\},\{d,e\},\{a,e\},\{c,f\}\}.

Is GG connected? We build a class starting at aa: a∼ba \sim b (edge), b∼cb \sim c (edge), so a∼ca \sim c by transitivity; c∼dc \sim d (edge) so a∼da \sim d; d∼ed \sim e (edge) so a∼ea \sim e (also directly by the edge {a,e}\{a,e\}, consistent); c∼fc \sim f (edge) so a∼fa \sim f. Every vertex of VV is reachable from aa, and ∣V∣=6|V| = 6 vertices are all accounted for, so ∼\sim has a single class VV itself. By Theorem part (4), GG is connected, c(G)=1c(G) = 1. As a check via part (2), exhibit an explicit path (not just a walk) from aa to ff: a,b,c,fa, b, c, f — three edges, all in EE, no repeated vertices. Good, this confirms a∼fa \sim f concretely. Now delete the edge {c,d}\{c,d\} from GG, forming G′=G−{c,d}G' = G - \{c,d\}. Recompute components. Starting from aa: a∼ba \sim b, a∼ea\sim e (direct edge), b∼cb \sim c so a∼ca \sim c, c∼fc \sim f so a∼fa \sim f. So far the class of aa contains {a,b,c,e,f}\{a,b,c,e,f\} — but does it contain dd? The only edges touching dd in the original graph were {c,d}\{c,d\} and {d,e}\{d,e\}; we removed {c,d}\{c,d\}, but {d,e}\{d,e\} remains in G′G'. So d∼ed \sim e still holds via the direct edge {d,e}\{d,e\}, and e∼ae \sim a, so in fact d∼ad \sim a too! Let's redo this carefully: G′G' has edges {a,b},{b,c},{d,e},{a,e},{c,f}\{a,b\},\{b,c\},\{d,e\},\{a,e\},\{c,f\} (five edges, since we removed exactly one of the original six). Trace again from aa: a∼ba\sim b (edge), a∼ea \sim e (edge), b∼cb \sim c (edge) gives a∼ca \sim c, c∼fc \sim f (edge) gives a∼fa \sim f, e∼de \sim d (edge) gives a∼da \sim d. So every vertex is still reachable from aa — removing the single edge {c,d}\{c,d\} did not disconnect GG, because dd has an alternate route to the rest of the graph via ee. So G′G' is still connected, c(G′)=1c(G') = 1. This example is chosen precisely because the naive guess "deleting an edge increases the number of components" is false in general — it depends on whether that edge lies on a cycle (here, {c,d}\{c,d\} sits on the cycle c,d,e,a,b,cc,d,e,a,b,c, so removing it leaves an alternate path). This foreshadows the material on Vertex and Edge Connectivity, where the edges whose removal does disconnect a graph are singled out as bridges.

Counterexamplewhy finiteness/simple-walk composition, not the graph being simple or undirected, is the real load-bearing hypothesis — dropping "undirected" breaks symmetry

The theorem assumes GG is an undirected graph, and symmetry of ∼\sim used this crucially: from an edge {wi−1,wi}∈E\{w_{i-1},w_i\} \in E we concluded {wi,wi−1}∈E\{w_i,w_{i-1}\} \in E as well, because in an undirected graph edges are unordered pairs. Consider instead a directed graph DD with vertex set {x,y}\{x,y\} and a single directed edge x→yx \to y (arc set A={(x,y)}A = \{(x,y)\}), and define u∼vu \sim v analogously using directed walks (walks that must follow arc directions). Then:

  • x∼yx \sim y holds: the arc (x,y)(x,y) is a directed walk from xx to yy.
  • y∼xy \sim x fails: there is no directed walk from yy to xx, since the only arc points from xx to yy and DD has no other arcs.

So ∼\sim is not symmetric on DD, hence not an equivalence relation, and the entire proof of part (1) collapses at the symmetry step — precisely where it used undirectedness of edges to reverse a walk. Consequently part (3) also fails in the naive form: the "reachability classes" of a directed graph (its strongly connected components) are generally not the same as its maximal connected subgraphs when you ignore direction (its weakly connected components). Here DD is weakly connected (one weakly-connected component {x,y}\{x,y\}) but has two distinct strongly-connected components {x}\{x\} and {y}\{y\}, since neither reaches the other by directed walks. This shows undirectedness is not a cosmetic hypothesis: it is exactly what makes reachability symmetric, which is exactly what makes "connected component" a single well-defined notion rather than splitting into the weak/strong dichotomy that directed graph theory must track separately.

Scope, edge cases & common traps

SituationWhat happensCommon mistake
GG has an isolated vertex vv (no incident edges){v}\{v\} is its own component (trivially connected, one vertex)Forgetting isolated vertices count as components; miscounting c(G)c(G)
GG is empty graph on n≥2n\ge 2 vertices, no edgesc(G)=nc(G) = n; GG is disconnected unless n=1n=1Assuming "no edges" is a degenerate/undefined case
GG has multiple edges or loops (multigraph)Definitions of ∼\sim and components are unaffected; a loop never helps reachability beyond reflexivity, which already holdsThinking a loop at vv is needed to get v∼vv \sim v
Directed graphsMust distinguish weak connectivity (ignore direction) from strong connectivity (respect direction); Theorem as stated does not directly applyApplying the undirected theorem's symmetry step to digraphs
Single-vertex graph ({v},∅)(\{v\}, \varnothing)Connected by convention; c(G)=1c(G)=1Calling it "disconnected" for lacking edges
Walk vs. path in the definitionInterchangeable for defining ∼\sim, by part (2) of the theoremAssuming you must always exhibit a path immediately, rather than allowing any walk and reducing later

The mathematician behind it

Origins · 1 minLeonhard Euler and how this was discovered
LE
Leonhard Euler
1707–1783 · Königsberg, Prussia (analysis, mechanics, and the birth of graph theory)

Euler did not use the modern vocabulary of vertices, edges, or connected components, but his 1736 resolution of the Seven Bridges of Königsberg problem is the historical seed from which this entire subject grew. He recognized that the only combinatorial data relevant to a walking-tour question was which landmasses were joined by which bridges — an abstraction that, a century and a half later, would be formalized as a graph, with connectivity and reachability as its most primitive structural questions. The rigorous equivalence-relation treatment of components used above belongs to the modern axiomatic era, but its motivating question — can I get from here to there? — is exactly Euler's.

Origins · 1 minhow this was discovered
History
- 1736 — Euler analyzes the Königsberg bridges, implicitly using reachability and degree parity, founding graph theory.
- 1847 — Gustav Kirchhoff studies electrical networks and spanning structure, prefiguring the tree/component viewpoint.
- 1878 — James Joseph Sylvester coins the term "graph" for these vertex-edge structures in a chemistry-inspired paper.
- 1930s — Dénes Kőnig's textbook systematizes graph theory, formalizing connectedness and components as basic notions.
- 1950s–60s — algorithmic graph theory (Ford–Fulkerson era) makes computing components a concrete computational problem, feeding directly into Vertex and Edge Connectivity.
Is a graph with zero vertices considered connected?

Most textbooks either exclude the empty graph from the discussion or declare it connected vacuously, since the condition "every pair of vertices is joined by a path" is vacuously true when there are no vertices to check. This article restricts attention to graphs with V≠∅V \neq \varnothing specifically to avoid this edge case, since the count c(G)c(G) becomes ambiguous (some say c(G)=0c(G)=0, others c(G)=1c(G)=1) for the empty graph, and different authors adopt different conventions. In practice this convention almost never matters, since applications virtually always involve at least one vertex.

Why does the theorem bother proving that walk-reachability equals path-reachability?

Because the two notions look interchangeable but are not logically identical, and the difference matters for later results. A walk allows repeated vertices and edges; a path forbids them. The theorem shows that whenever a walk connects uu to vv, some (generally shorter) path also does, by repeatedly excising cycles formed by repeated vertices. This upgrade from "walk" to "path" is essential later, for instance when proving results about shortest paths, spanning trees, or distances, all of which are stated in terms of paths rather than arbitrary walks.

How is this different from the notion of a "clique" or "complete subgraph"?

A connected component only requires that vertices be reachable from one another via some path; it says nothing about how many edges are present. A component can be a single long path with very few edges, while a clique requires every pair of vertices to be directly adjacent. Every clique is connected, but a connected graph (or component) need not contain any large clique at all — a tree, for example, is connected yet has no cycle, let alone a clique larger than an edge.

Does adding an edge to a graph ever increase the number of components?

No. Adding an edge {u,v}\{u,v\} to GG can only merge two components into one (if uu and vv were previously in different components) or leave the component count unchanged (if uu and vv were already in the same component). This follows directly from the equivalence-class description: adding an edge can only add new pairs to the relation ∼\sim by transitivity, never remove existing reachability, since every walk in GG remains a walk in GG plus an edge.

How do I actually compute the connected components of a graph in practice?

Algorithmically, you run a breadth-first or depth-first search from an arbitrary unvisited vertex, mark every vertex reached as belonging to the current component, and repeat starting from any unvisited vertex until none remain. This is a direct computational implementation of the equivalence-class construction in the proof: each search execution computes exactly one class [u][u] of the relation ∼\sim. The total running time is linear in the number of vertices plus edges, since each edge and vertex is examined a constant number of times.

Is "connected" the same as "2-connected" or "highly connected"?

No, and this distinction is exactly what the follow-up theory of Vertex and Edge Connectivity addresses. "Connected" only requires c(G)=1c(G)=1, i.e., no isolated pieces; a graph can be connected via a single fragile bridge edge whose removal disconnects it. Stronger notions like 22-connectivity require that connectivity survive the removal of any single vertex, giving a quantitative refinement of the qualitative yes/no notion developed in this article.

Why is the maximality condition in the definition of "connected component" necessary?

Without maximality, "connected subgraph" alone is far too weak: a single edge, or even a single vertex, is a connected subgraph of almost any graph, but it is not what we mean by a "component." Maximality forces us to take the largest connected piece containing a given vertex, which is exactly what makes components well-defined, mutually disjoint, and in bijection with equivalence classes of ∼\sim, as proved in the theorem.

Before this

Where this leads