Example of product space isomorphic to sum of subspaces

Solution 1:

Modify your example to make the subspaces intersect. For example, we can take $U_1 = \operatorname{span} \{ e_1 \}$ and $U_2 = \operatorname{span} \{ e_i \}_{i \in \mathbb{N}}$. Then $U_1 \cap U_2 = U_1$ so $U_1 + U_2$ is not a direct sum. In addition, $U_1 \times U_2$ is isomorphic to $U_1 + U_2 = U_2$ via the linear map sending

$$ (e_1,0) \mapsto e_1, (0,e_i) \mapsto e_{i + 1}. $$