Simplification of the sum of all 4-digit palindromic numbers I apologize for the simplicity of this question, if necessary.

I understand that the sum of all 4-digit palindromes is as follows:
$$\sum_{a=1}^{9}(\sum_{b=0}^{9}abba),$$
which can be further expanded upon such that:

\begin{equation}
    \begin{aligned}
\sum_{a=1}^{9}(\sum_{b=0}^{9}abba) &amp;= \sum_{a=1}^{9}\sum_{b=0}^{9}(1001a + 110b) \\
                             &amp;= \sum_{a=1}^{9}[10(1001a) + 110\sum_{b=0}^{9}b].
    \end{aligned}
\end{equation}
The last line of the equation is what's confusing me. Where does the $10$ come from in $10(1001a)$? 

I don't use double summation notation often, so I assume it has to do with moving the summation of $b$ inside the equation to make the triangular number formula more apparent, but WHY do we need the $10$? 

Thank you for any help.
The $10$ comes from summing over $b$ from $0$ to $9$. That is,
$$\sum_{b=0}^9 1001 a = 10 (1001 a)$$ so 
$$ \sum_{a=1}^9 \sum_{b=0}^9 1001 a = \sum_{a=1}^9 10 (1001 a)$$
The 10 comes from the sum of all the palindromes in one digit. Since there are 10 palindromes for every thousand, that is where they come from.

For Example,

The Palindromes for 1000 is 1001 to 1991, so if we were to find the sum, we have to add all the ones, or multiply it by 10