TITLE: Proving every tree has at most one perfect matching
QUESTION [13 upvotes]: In trying to prove that every tree, T, has at most one perfect matching, I came across this idea:

Since the matchings are perfect, each vertex has degree $0$ or $2$ in the symmetric difference, so every component is an isolated vertex or a cycle.

Why is this true?  Why is it true that since each vertex is either of degree $0$ or of degree $2$, then all components are either isolated or a cycle?

REPLY [4 votes]: Let $M$ and $M_0$ be perfect matchings in a tree.
Form the symmetric difference of the edge sets, $M \bigtriangleup M_0$. Since the matchings
are perfect, each vertex has degree $0$ or $2$ in the symmetric difference, so
every component is an isolated vertex or a cycle. Since the tree has no
cycle, every vertex must have degree $0$ in the symmetric difference, which
means that the two matchings are the same.