How to prove $\sum_{n=0}^{\infty} \frac{n^2}{2^n} = 6$? I'd like to find out why
\begin{align}
\sum_{n=0}^{\infty} \frac{n^2}{2^n} = 6
\end{align}
I tried to rewrite it into a geometric series
\begin{align}
\sum_{n=0}^{\infty} \frac{n^2}{2^n} = \sum_{n=0}^{\infty} \Big(\frac{1}{2}\Big)^nn^2
\end{align}
But I don't know what to do with the $n^2$. 

There is an elementary and visually appealing solution, which is to think "matrix-like".
Knowing that $\sum_{n=0}^{\infty} 2^{-n}=2$, the sum $\sum_{n=0}^{\infty}n/2^n$ can be rewritten as:
$$
\begin{align}
     && 0/2^0 && + && 1/2^1  && + && 2/2^2  && + && 3/2^3  && + && \cdots && =
\\ = &&       && + && 2^{-1} && + && 2^{-2} && + && 2^{-3} && + && \cdots && +
\\ + &&       &&   &&        && + && 2^{-2} && + && 2^{-3} && + && \cdots && +
\\ + &&       &&   &&        &&   &&        && + && 2^{-3} && + && \cdots && +
\\ + &&       &&   &&        &&   &&        &&   &&        && + && \ddots
\end{align}
$$
summed first in the columns, then in the rows. It doesn't matter which direction you sum first, because all sums in both directions converge absolutely. So we can sum first in the rows, and then in the columns. Each row-sum is just a geometric series; the $m$-th row-sum is $r_m=\sum_{n=m}^{\infty} 2^{-n}=2^{1-m}$. Now summing up all rows, we have $\sum r_m = 2$.
What we just did is equivalent to:
$$
\sum_{n=0}^{\infty} \frac{n}{2^n} =
\sum_{n=0}^{\infty} \sum_{m=1}^{n} \frac{1}{2^n} =
\sum_{m=1}^{\infty} \sum_{n=m}^{\infty} 2^{-n}=
\sum_{m=1}^{\infty} 2^{1-m} =
2
$$
It's not hard to do it for a three-dimensional matrix, unless you try to draw it :)
$$
\sum_{n=0}^{\infty} \frac{n^2}{2^n} =
\sum_{n=0}^{\infty} \sum_{m=1}^{n} \frac{n}{2^n} =
\sum_{m=1}^{\infty} \sum_{n=m}^{\infty} \frac{n}{2^n} =
\sum_{m=1}^{\infty} \left\{
    \sum_{n=0}^{\infty} \frac{n}{2^n} - \sum_{n=0}^{m-1} \frac{n}{2^n}
\right\}
$$
We can work out $\sum_{n=0}^{m-1} \frac{n}{2^n}$ in the same way we did for $\sum_{n=0}^{\infty} \frac{n}{2^n}$:
$$
\sum_{n=0}^{m-1} \frac{n}{2^n} =
\sum_{n=0}^{m-1} \sum_{l=1}^{n} \frac{1}{2^n} =
\sum_{l=1}^{m-1} \sum_{n=l}^{m-1} 2^{-n} =
\sum_{l=1}^{m-1} \left\{ 2^{1-l} - 2^{1-m} \right\} =
2 - \left(m+1\right)2^{1-m}
$$
Substituting:
$$
\sum_{n=0}^{\infty} \frac{n^2}{2^n} =
\sum_{m=1}^{\infty} \left\{
    2 - \left[ 2 - \left(m+1\right)2^{1-m} \right]
\right\} =
\sum_{m=1}^{\infty} \left(m+1\right)2^{1-m} = \\
\sum_{m=1}^{\infty} \left\{
    \left(m-1\right)2^{1-m} + 2\cdot 2^{1-m}
\right\} =
\sum_{m=0}^{\infty} m\cdot 2^{-m} + 4\sum_{m=1}^{\infty} 2^{-m} =
2 + 4 = 6
$$
Again, you can change the order of summations because all inner sums converge absolutely.
