What is the explanation for this visual proof of the sum of squares?

The first row of the first triangle is $1 = 1^2$, the second row sums to $2 + 2 = 2^2$, the third row sums to $3 + 3 + 3 = 3^2$ and so on. That means that the sum of the numbers in the triangle is $1^2 + 2^2 + 3^2 + \dots + n^2$. Now, the second and third triangles are the same, so the left-hand side is $3(1^2 + 2^2 + \dots + n^2)$.

On the other hand, each of the numbers in the right-hand side triangle is $(2n+1)$, and there are $\frac{n(n+1)}{2}$ of them.

The picture shows why the two are equal, so we get $3(1^2 + 2^2 + \dots +n^2) = (2n+1)\frac{n(n+1)}{2}$, which becomes the formula $1^2 + 2^2 + \dots + n^2 = \frac{n(n+1)(2n+1)}{6}$.


That first triangle is the sum of one $1$, two $2$s, three $3$s, and so on. That's equivalent to $1^2+2^2+\dots +n^2$.

The second triangle is just a $120^\circ$ counterclockwise rotation of the first triangle.

The third triangle is a $120^\circ$ clockwise rotation of the first triangle.

Now, note that the top numbers sum to $2n+1$. And the numbers directly below and to the left of each of the top numbers. And pretty much every single group of three numbers corresponding to the same position on the triangles.

So the RHS is just one $2n+1$, then two $2n+1$s, then three, and so on up to $n$. So the RHS is really $\frac{n(n+1)}{2}(2n+1)$ because of the triangular number formula.

This means that $3(1^2+2^2+\dots +n^2)=\frac{n(n+1)(2n+1)}{2}$, so $\boxed{1^2+2^2+\dots+n^2=\frac{n(n+1)(2n+1)}{6}}.$

Edit: Beaten to it :P


Each entry in the final triangle is the sum of the corresponding entries in the first three triangles. Each triangle has

$$1+2+3+\ldots+n=\frac{n(n+1)}2$$

entries, so the sum of all of the entries in the final triangle is

$$\frac{n(n+1)(2n+1)}2\;.$$

The entries in each of the first three triangles sum to

$$1\cdot1+2\cdot2+3\cdot3+\ldots+n\cdot n=\sum_{k=1}^nk^2\;,\tag{1}$$

where each term on the lefthand side of $(1)$ is the sum of the entries in one row of the triangle. Thus, the whole picture says that

$$3\sum_{k=1}^nk^2=\frac{n(n+1)(2n+1)}2\;,$$

and dividing through by $3$ yields the usual summation formula.