1+2+...+n+(n-1)+...+1 = n^2
From ProofWiki
Contents |
Theorem
- $\forall n \in \N: 1 + 2 + \cdots + n + \left({n-1}\right) + \cdots + 1 = n^2$
Illustration
Direct Proof 1
| \(\displaystyle \) | \(\displaystyle \) | \(\) | \(\displaystyle 1 + 2 + \cdots + \left({n-1}\right) + n + \left({n-1}\right) + \cdots + 1\) | \(\displaystyle \) | |||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle 1 + 2 + \cdots + \left({n-1}\right) + \left({n-1}\right) + \cdots + 1 + n\) | \(\displaystyle \) | |||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle 2 \left({1 + 2 + \cdots + \left({n-1}\right)}\right) + n\) | \(\displaystyle \) | |||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle 2 \left({\frac {\left({n-1}\right) n} 2}\right) + n\) | \(\displaystyle \) | Closed Form for Triangular Numbers | ||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle \left({n-1}\right) n + n\) | \(\displaystyle \) | |||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle n^2 - n + n\) | \(\displaystyle \) | |||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle n^2\) | \(\displaystyle \) | as desired. |
$\blacksquare$
Direct Proof 2
| \(\displaystyle \) | \(\displaystyle \) | \(\) | \(\displaystyle 1 + 2 + \cdots + \left({n - 1}\right) + n + \left({n - 1}\right) + \cdots + 1\) | \(\displaystyle \) | |||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle \left({1 + 2 + \cdots + \left({n - 1}\right)}\right) + \left({1 + 2 + \cdots + \left({n - 1}\right) + n}\right)\) | \(\displaystyle \) | |||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle \frac {\left({n - 1}\right) n} 2 + \frac {n \left({n + 1}\right)} 2\) | \(\displaystyle \) | Closed Form for Triangular Numbers | ||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle \frac {n^2 - n + n^2 + n} 2\) | \(\displaystyle \) | |||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle n^2\) | \(\displaystyle \) | as desired. |
$\blacksquare$
Proof by Induction
Proof by induction:
Base case
$n = 1$ holds trivially.
Just to make sure, we try $n = 2$:
- $1 + 2 + 1 = 4$
Likewise $n^2 = 2^2 = 4$.
So shown for base case.
Induction Hypothesis
This is our induction hypothesis:
- $1 + 2 + \cdots + k + \left({k-1}\right) + \cdots + 1 = k^2$
Now we need to show true for $n=k+1$:
- $1 + 2 + \cdots + \left({k + 1}\right) + k + \left({k-1}\right) + \cdots + 1 = \left({k + 1}\right)^2$
Induction Step
This is our induction step:
| \(\displaystyle \) | \(\displaystyle \) | \(\) | \(\displaystyle 1 + 2 + \cdots + \left({k + 1}\right) + k + \left({k-1}\right) + \cdots + 1\) | \(\displaystyle \) | |||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle \left({1 + 2 + \cdots + k + \left({k-1}\right) + \cdots + 1}\right) + k + \left({k + 1}\right)\) | \(\displaystyle \) | |||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle k^2 + k + \left({k + 1}\right)\) | \(\displaystyle \) | from induction hypothesis | ||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle k^2 + 2k + 1\) | \(\displaystyle \) | |||
| \(\displaystyle \) | \(\displaystyle \) | \(=\) | \(\displaystyle \left({k + 1}\right)^2\) | \(\displaystyle \) |
The result follows by induction.
$\blacksquare$