Sum of orthogonal projections onto orthogonal subspaces, where orthogonal subspaces forms a direct sum

direct-sumprojection-matrices

I wish to prove, if possible, that if I have a set of non-zero orthogonal subspaces of $\mathbb{R}^n$, $U_1,\ldots,U_m$, with orthogonal projections $U_i,\ldots,U_m$ respectively, where $\mathbb{R}^n = \bigoplus_{i=1}^m U_i$, then $\sum^m_{i=1}U_i = I$. I'm not sure this is true, I haven't been able to find any literature, but it would further help me in a proof I'm doing if I can showcase this. Is this even true? My intuition doesn't give me any sense for whether this should be true, or false.

I have already proven if I have orthogonal projections $P_i$ onto $m$ subspaces of $\mathbb{R}^n$ for $i=1,2,\ldots,m$, where $\sum^m_{i=1}P_i = I$ and $P_iP_j=0$ for $i\neq j$, then $\mathbb{R}^n=\bigoplus^m_{i=1} P_i$.

Best Answer

$\mathbb R^n = \bigoplus_{i=1}^m U_i$ means every $x\in\mathbb R$ can be written as $\sum_ix_i$ with $x_i\in U_i$. Then

$$ \sum_iU_ix=\sum_{ij}U_ix_j=\sum_ix_i=x\;, $$

since for orthogonal projections onto orthogonal subspaces $U_jx_i=0$ for $j\ne i$.