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

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.

Start with any vertex $$v_1$$ of the graph. Let $$v_2$$ be one of the two neighbors of $$v_1$$. Let $$v_3$$ be the only neighbor of $$v_2$$ other than $$v_1$$. Now, one of the neighbors of $$v_3$$ is $$v_2$$, and if the other neighbor is $$v_1$$, then $$v_1v_2v_3$$ forms a $$3$$-cycle and the graph is completed, since every vertex has degree $$2$$ and the graph is connected. So, assume that $$v_3$$ is a neighbor of some $$v_4 \notin \{v_1,v_2,v_3\}$$. Clearly, $$v_4$$ cannot be connected to $$v_2$$, since then $$v_2$$ would have degree $$3$$. If $$v_4$$ has $$v_1$$ as a neighbor, then we have completed a $$4$$-cycle, and are done by the same logic above. So, suppose that $$v_4$$ is a neighbor of some $$v_5 \notin \{v_1,v_2,v_3,v_4\}$$. In this way, suppose that we get a path $$v_1v_2\ldots v_m$$ for some $$m$$. Clearly, $$v_m$$ cannot be connected to either of $$v_2,v_3,\ldots, v_{m-2}$$, since then that vertex would have degree $$3$$. If $$v_m$$ is connected to $$v_1$$, we complete an $$m$$-cycle. So, the only option left is, $$v_m$$ is connected to some new vertex $$v_{m+1}$$. But this cannot go for ever, since we have only $$n$$ vertices in store. So, the graph must be a cycle.