[proofplan]
Expand $(a+b)^n$ as a product of $n$ identical factors and encode each summand by the subset of factors from which the term $b$ is selected. Because multiplication in $\mathbb{R}$ is commutative, all selections with exactly $k$ copies of $b$ give the same monomial $a^{n-k}b^k$. Counting the subsets of $\{1,\dots,n\}$ of size $k$ gives the coefficient $\binom{n}{k}$, and summing over $k=0,\dots,n$ gives the stated identity.
[/proofplan]
[step:Encode every term in the expanded product by a subset of factors]
Fix $a,b \in \mathbb{R}$ and $n \in \mathbb{N}$. Let $I_n := \{1,\dots,n\}$. Since $n$ is finite, repeated use of the distributive law in $\mathbb{R}$ gives one summand for each choice of either $a$ or $b$ from each factor in
\begin{align*}
(a+b)^n=\prod_{i=1}^{n}(a+b).
\end{align*}
For each subset $S \subset I_n$, let $S$ record precisely the indices of the factors from which $b$ is chosen. The corresponding [real number](/pages/1303) is
\begin{align*}
T_S := \left(\prod_{i \in I_n \setminus S} a\right)\left(\prod_{i \in S} b\right),
\end{align*}
with the convention that an empty product is $1$. Therefore
\begin{align*}
(a+b)^n=\sum_{S \subset I_n} T_S.
\end{align*}
[guided]
We fix $a,b \in \mathbb{R}$ and $n \in \mathbb{N}$, because the theorem asserts the identity for arbitrary such choices. Define the finite index [set](/pages/1142) $I_n := \{1,\dots,n\}$, whose elements label the $n$ factors in the product
\begin{align*}
(a+b)^n=\prod_{i=1}^{n}(a+b).
\end{align*}
When this finite product is expanded, the distributive law says that each summand is obtained by making one choice from each factor: either choose $a$ from the $i$-th factor or choose $b$ from the $i$-th factor. A subset $S \subset I_n$ records exactly this data by declaring that $i \in S$ means “choose $b$ from the $i$-th factor,” while $i \in I_n \setminus S$ means “choose $a$ from the $i$-th factor.”
For such a subset $S$, define the corresponding real number
\begin{align*}
T_S := \left(\prod_{i \in I_n \setminus S} a\right)\left(\prod_{i \in S} b\right),
\end{align*}
where an empty product is interpreted as $1$. This convention covers the two endpoint cases: $S=\varnothing$, where every factor contributes $a$, and $S=I_n$, where every factor contributes $b$. Since every expansion choice gives exactly one subset $S \subset I_n$, and every subset $S \subset I_n$ gives exactly one expansion choice, the full expansion is
\begin{align*}
(a+b)^n=\sum_{S \subset I_n} T_S.
\end{align*}
[/guided]
[/step]
[step:Group the expansion by the number of chosen copies of $b$]
For each integer $k$ with $0 \le k \le n$, define
\begin{align*}
\mathcal{S}_k := \{S \subset I_n : |S|=k\}.
\end{align*}
If $S \in \mathcal{S}_k$, then $|I_n \setminus S|=n-k$. Since multiplication in $\mathbb{R}$ is commutative,
\begin{align*}
T_S
= \left(\prod_{i \in I_n \setminus S} a\right)\left(\prod_{i \in S} b\right)
= a^{n-k}b^k.
\end{align*}
The subsets of $I_n$ are partitioned by their cardinalities, so
\begin{align*}
(a+b)^n
= \sum_{S \subset I_n} T_S
= \sum_{k=0}^{n}\sum_{S \in \mathcal{S}_k} T_S
= \sum_{k=0}^{n} |\mathcal{S}_k|\,a^{n-k}b^k.
\end{align*}
[guided]
The expansion from the previous step is indexed by all subsets $S \subset I_n$. To identify the coefficient of a fixed monomial, we group these subsets according to how many copies of $b$ they choose. For each integer $k$ satisfying $0 \le k \le n$, define
\begin{align*}
\mathcal{S}_k := \{S \subset I_n : |S|=k\}.
\end{align*}
If $S \in \mathcal{S}_k$, then exactly $k$ factors contribute $b$. Since $I_n$ has $n$ elements, the complement $I_n \setminus S$ has $n-k$ elements, so exactly $n-k$ factors contribute $a$. Because $a$ and $b$ are [real numbers](/page/Real%20Numbers) and multiplication in $\mathbb{R}$ is commutative, the order of these chosen factors does not affect the product. Hence
\begin{align*}
T_S
= \left(\prod_{i \in I_n \setminus S} a\right)\left(\prod_{i \in S} b\right)
= a^{n-k}b^k.
\end{align*}
Every subset $S \subset I_n$ has exactly one cardinality $k \in \{0,\dots,n\}$, so the families $\mathcal{S}_0,\dots,\mathcal{S}_n$ partition the set of all subsets of $I_n$. Therefore the expansion can be regrouped as
\begin{align*}
(a+b)^n
= \sum_{S \subset I_n} T_S
= \sum_{k=0}^{n}\sum_{S \in \mathcal{S}_k} T_S
= \sum_{k=0}^{n} |\mathcal{S}_k|\,a^{n-k}b^k.
\end{align*}
[/guided]
[/step]
[step:Count the subsets of each size and substitute the binomial coefficient]
For each integer $k$ with $0 \le k \le n$, the number of subsets of $I_n$ with cardinality $k$ is
\begin{align*}
|\mathcal{S}_k|=\frac{n!}{k!(n-k)!}=\binom{n}{k}.
\end{align*}
Indeed, ordered lists of $k$ distinct elements of $I_n$ can be counted in two ways: directly there are
\begin{align*}
n(n-1)\cdots(n-k+1)=\frac{n!}{(n-k)!}
\end{align*}
such lists, while each $k$-element subset gives exactly $k!$ orderings. Thus
\begin{align*}
|\mathcal{S}_k|\,k! = \frac{n!}{(n-k)!},
\end{align*}
and division by $k!$ gives the formula above. Substituting this count into the grouped expansion yields
\begin{align*}
(a+b)^n
= \sum_{k=0}^{n} \binom{n}{k} a^{n-k}b^k.
\end{align*}
This is the claimed identity.
[/step]