Number of Edges in Forest

Theorem
Let $F = \left({V, E}\right)$ be a forest with $n$ nodes and $m$ components.

Then $F$ contains $n-m$ edges.

Proof
By definition, a forest is a disconnected graph whose components are all trees.

Let the number of nodes in each component of $F$ be $n_1, n_2, \ldots, n_m$ where of course $\displaystyle \sum_{i \mathop = 1}^m n_i = n$.

From Size of Tree is One Less than Order, the number of edges in tree $i$ is $n_i - 1$.

So the total number of edges in $F$ is: