When does ordinal addition/multiplication commute?
We shall make use of the following facts:
- For any ordinals $\alpha<\beta$ we have $\omega^{\alpha}+\omega^{\beta}=\omega^{\beta}$
- If $\beta_n>\cdots>\beta_1>0,\alpha$ are ordinals and $l_i$ natural numbers, then $(\omega^{\beta_n}\cdot l_n+\cdots \omega^{\beta_1}\cdot l_1+l_0)\cdot \omega^{\alpha}=\omega^{\beta_n+\alpha}$; which is easy to prove by induction on $\alpha$ using $(1)$.
As Lord_Farin pointed out, to prove a necessary and sufficient condition you need only use the Cantor normal form, so you get the following condition:
$\alpha+\gamma=\gamma+\alpha$ iff there are ordinals $\beta_n >\ldots>\beta_1$ and nonzero natural numbers $l_0,\ldots,l_n,r_n$ such that $\alpha=\omega^{\beta_n}\cdot l_n+\cdots+\omega^{\beta_1}l_1+l_0$ and $\gamma=\omega^{\beta_n}\cdot r_n+\cdots+\omega^{\beta_1}l_1+l_0$
$(\Leftarrow)$ Using $(1)$ $n$ times we obtain $\alpha+\gamma=\omega^{\beta_n}\cdot (l_n+r_n)+\cdots+\omega^{\beta_1}l_1+l_0$ and $\gamma+\alpha=\omega^{\beta_n}\cdot (r_n+l_n)+\cdots+\omega^{\beta_1}l_1+l_0$, so that $\alpha+\gamma=\gamma+\alpha$.
$(\Rightarrow)$ Let $\omega^{\alpha_n}\cdot l_n+\cdots+\omega^{\alpha_1}\cdot l_1+l_0$ and $\omega^{\gamma_m}\cdot r_m+\cdots+\omega^{\gamma_1}\cdot r_1+r_0$ be the normal forms of $\alpha$ and $\gamma$ respectively. Put $\alpha'=\omega^{\alpha_{n-1}}\cdot l_{n-1}+\cdots+\omega^{\alpha_1}\cdot l_1+l_0$ and $\gamma'=\omega^{\gamma_{m-1}}\cdot r_{m-1}+\cdots+\omega^{\gamma_1}\cdot r_1+r_0$.
If $\alpha_m\neq \gamma_n$ we may assume WLOG that $\alpha_n<\gamma_m$, then if $k<n$ is such that $\alpha_k\leq \gamma_m$, then using $(1)$ $\gamma+\alpha=\alpha$ and $\alpha+\gamma=\omega^{\alpha_n}\cdot l_n+\cdots+\omega^{\alpha_k}\cdot l_k+\omega^{\gamma_m}\cdot r_m+\cdots+\omega^{\gamma_1}\cdot r_1+r_0$, thus by the uniqueness of the Cantor normal form we get that $\alpha+\gamma\neq \gamma+\alpha$; $r_m\neq 0$. Now if $\alpha'\neq \gamma'$ but $\alpha_m= \gamma_n$, then by $(1)$ $\alpha+\gamma=\omega^{\alpha_n}\cdot(l_n+r_n)+\gamma'$ and $\gamma+\alpha=\omega^{\alpha_n}\cdot(r_n+l_n)+\alpha'$, but by the uniqueness of the Cantor normal form this implies $\alpha+\gamma\neq \gamma+\alpha$.
Now we prove another result:
Let $\omega^{\alpha_n}\cdot l_n+\cdots+\omega^{\alpha_1}\cdot l_1+l_0$ and $\omega^{\gamma_m}\cdot r_m+\cdots+\omega^{\gamma_1}\cdot r_1+r_0$ be the normal forms of $\alpha$ and $\gamma$ respectively. Then $\alpha\cdot\gamma=\gamma\cdot\alpha$ iff $m=n$, $r_k=l_k,\alpha_n+\gamma_k=\gamma_n+\alpha_k$ for $1\leq k\leq n$ and $\alpha\cdot r_0=\gamma\cdot l_0$.
$(\Rightarrow)$ Using $(2)$ we have $$\alpha\cdot \gamma=\alpha\cdot\omega^{\gamma_m}\cdot r_m+\cdots+\alpha\cdot\omega^{\gamma_1}\cdot r_1+\alpha\cdot r_0$$$$=\omega^{\alpha_n+\gamma_m}\cdot r_m+\cdots+\omega^{\alpha_n+\gamma_1}\cdot r_1+\alpha\cdot r_0(3),$$ similarly $$\gamma\cdot\alpha=\omega^{\gamma_m+\alpha_n}\cdot l_n+\cdots+\omega^{\gamma_m+\alpha_1}\cdot l_1+\gamma\cdot l_0,(4)$$ then since for any ordinals $\alpha',\beta',\gamma'$ we have $(\beta'<\gamma')\longrightarrow (\alpha'+\beta'<\alpha'+\gamma')$ and $\alpha\cdot\gamma=\gamma\cdot\alpha$, it follows by the uniqueness of the Cantor normal form that $2m=2n$, i.e., $m=n$, and $\gamma_n+\alpha_k=\alpha_n+\gamma_k,r_k=l_k$ for all $k$ and $\alpha\cdot r_0=\gamma\cdot l_0$.
($\Leftarrow$) Easy using the identities $(3)$ and $(4)$.