Combinatorial justification on $n^{2} = (n-1)^{2} + 2(n-1) +1$

Consider this argument:

Suppose you have a collection of balls, of $n$ different colors (red, blue, etc.) and $n$ different patterns (striped, solid, etc.). Each one has a unique color-and-pattern combination, and each possible combination is used. How might you count them?

Trivially, $n \cdot n = n^2$ gives one enumeration.

What if you set aside all of the balls that have a specific color or a specific pattern? Then you have $n-1$ colors and patterns that don't fit, for $(n-1)^2$ total. Of those you set aside, you have $n$ balls of the given color, and $n$ of the given pattern, and one that is both. Hence, you have $2(n-1)$ balls that only fit one criteria, and $1$ that fits both.

Hence,

$$n^2 = (n-1)^2 + 2(n-1) + 1$$


More pictorially, it's like finding two different ways to find the area of this square:

enter image description here

Then

$$n^2 = \color{blue}{(n-1)^2} + \color{green}{2(n-1)} + \color{red}{1}$$


Consider the number of ordered pairs (a, b) you can make from the set $\left\{1, 2, …, n\right\}$. This is $n^2$, since you have $n$ choices for the first element $a$ and $n$ choices for the second element $b$.

We can split this sample space of $n^2$ pairs into the RHS as follows. Consider the number of ordered pairs you can form from just the set $\left\{1, 2, …, n-1\right\}$; this is $(n-1)^2$. This gets you all the ordered pairs that do not include $n$. To count the number of ordered pairs that do include $n$, either $n$ must be the first element (in which we have $n-1$ possibilities: (n, 1) through (n, n-1)), the second element (in which we also have $n-1$ possibilities: (1, n) through (n-1, n)), or $n$ could be both elements (the sole pair (n, n)).

This gives us $$ \begin{align*} n^2 &= \text{ # ordered pairs from {1, …, n}} \\ &= \text{ # ordered pairs not including element “n”} + \text{ # ordered pairs including element “n”} \\ &= (n-1)^2 + (2(n-1) + 1). \end{align*} $$