TITLE: Why can we convert a base $9$ number to a base $3$ number by simply converting each base $9$ digit into two base $3$ digits?
QUESTION [7 upvotes]: Why can we convert a base $9$ number to a base $3$ number by simply
  converting each base $9$ digit into two base $3$ digits ?
For example $813_9$ can be converted directly to base $3$ by noting 
\begin{array} \space 8_9&=22_3 \\ \space 1_9 &=01_3 \\ \space 3_9
 &=10_3 \\ \end{array}
Putting the base digits together ,we get $$813_9=220110_3$$

I know it has to do with the fact that $9=3^2$ but I am not able to understand this all by this simple fact...

REPLY [2 votes]: Hint:
$$\color{blue}1\cdot3^5+\color{blue}0\cdot3^4+\color{green}2\cdot3^3+\color{green}2\cdot3^2+\color{red}0\cdot3^1+\color{red}1\cdot3^0
=(\color{blue}1\cdot3^1+\color{blue}0)3^4+(\color{green}2\cdot3^1+\color{green}2)3^2+(\color{red}0\cdot3^1+\color{red}1)3^0\\
=\color{blue}3\cdot9^2+\color{green}8\cdot9^1+\color{red}1\cdot9^0$$
$$\color{blue}{10}\color{green}{22}\color{red}{01}_3=[\color{blue}{10_3}|\color{green}{22_3}|\color{red}{01_3}]_9=\color{blue}3\color{green}8\color{red}1_9$$