[Math] Prove that a connected simple graph where every vertex has a degree of 2 is a cycle (cyclic) graph

graph theory

My course notes defined a cycle graph as follows:
A cycle graph is a simple graph on $n \geq 3$ vertices in which all vertices have degree $2$.

However, I'm not sure why does this definition work. The more intuitive definition of a cycle graph I found on Wikipedia says that

A cycle graph […] is a graph that consists of a single cycle.

Therefore, I'm trying to show how are these two definitions connected by proving that

For all connected simple graphs $G = (V,E)$, $|V| \geq 3 \land (\forall v \in V, $ the degree of $v = 2) \iff G$ is a graph that consists of a single cycle.

The '$\impliedby$' direction proof is straightforward, but I can't think of how to prove the implication in the opposite direction.

Best Answer

Let G be a connected simple graph where every vertex has degree 2. Let P be a path of maximal length in G, and let u and v be the origin and terminus of that path. Let u' be the neighbor of u that is not the "next" vertex in the path, and let v' be the neighbor of v that is not the "next-to-last" vertex in the path. Since P cannot be extended in either direction, it must be that u' and v' are already vertices in P. But the neighbors of each internal vertex of the path already have both of their neighbors used. So it must be that u'=v and v'=u. Hence, connecting the ends of the path lead to a cycle.