To prove that a complete graph (K_n), which is a graph where every pair of distinct vertices is connected by a unique edge, contains exactly (\frac{n(n - 1)}{2}) edges, we can use the principle of mathematical induction.
Base Case
Let's start with the simplest non-trivial complete graph, (K_1), which has 1 vertex and no edges. For (n = 1),
[\frac{n(n - 1)}{2} = \frac{1(1 - 1)}{2} = 0]
This holds true, as (K_1) does indeed have 0 edges. However, this base case is somewhat trivial, so let's also consider (K_2), which has 2 vertices. By the formula,
[\frac{n(n - 1)}{2} = \frac{2(2 - 1)}{2} = 1]
(K_2) should have 1 edge, which matches the definition of (K_2). This establishes the starting point of our induction.
Inductive Step
Assume that for a complete graph (K_k), where (k) is a positive integer, the number of edges is exactly (\frac{k(k - 1)}{2}). This is our inductive hypothesis.
We need to show that this formula holds for (K_{k+1}), a complete graph with (k+1) vertices. When moving from (K_k) to (K_{k+1}), we add 1 new vertex. This new vertex must be connected to all (k) existing vertices (by the definition of a complete graph), thereby adding (k) new edges.
Hence, the total number of edges in (K_{k+1}) is the number of edges in (K_k) plus the (k) new edges:
[\frac{k(k - 1)}{2} + k]
Simplifying the expression:
[\frac{k(k - 1) + 2k}{2}]
[= \frac{k^2 - k + 2k}{2}]
[= \frac{k^2 + k}{2}]
[= \frac{k(k + 1)}{2}]
But since we replaced (k) with (k + 1), the expression above simplifies to exactly what we need to prove:
[\frac{(k+1)(k)}{2}]
[= \frac{(k+1)((k+1) - 1)}{2}]
This matches the form of our original assertion for (\frac{n(n - 1)}{2}) edges in a complete graph with (n) vertices, thus completing the inductive step.
Conclusion
By the principle of mathematical induction, since the assertion holds for (K_2), and if it holds for (K_k), then it must also hold for (K_{k+1}), we have proven that any complete graph (K_n) contains exactly (\frac{n(n - 1)}{2}) edges.