Is it true that $\text{proj}_{U+W}=\text{proj}_U+\text{proj}_W-\text{proj}_{U\cap W}$? Let $V$ be a finitely generated real inner product space with $\dim V=n$ and inner product $\langle\cdot,\cdot\rangle:V\times V\to\mathbb{R}$.
Let $U,W\subseteq V$ be sub-spaces of $V$. Is it true that we have
$$\text{proj}_{U+W}=\text{proj}_U+\text{proj}_W-\text{proj}_{U\cap W}$$
(where $\text{proj}_X:V\to V$ is the orthogonal projection onto the sub-space $X$)? After some attempts and some web searches, I was unable to find any information regarding this.
I want to say this is true. Let $\mathbf{u}=\{u_1,\dots,u_m\}$ be an orthonormal basis of $U$ and $\mathbf{w}=\{w_1,\dots,w_k\}$ be an orthonormal basis of $W$. Either $U$ and $W$ intersect trivially or they don't. If they do intersect trivially, then we are done, since $\mathbf{u}\cup\mathbf{w}=\{u_1,\dots,u_m,w_1,\dots,w_k\}$ is a basis for $U+W$ and we can orthonormalize it using Grahm-Schmidt to get an orthonormal basis $\{u_1,\dots,u_m,w_1',\dots,w_k'\}$ for $U+W$. In this case its clear that $$\text{proj}_{U+W}=\text{proj}_U+\text{proj}_W$$ since $\text{proj}_{U\cap W}$ is identically the zero operator on $V$.
Having some trouble in the more general case where the sub-spaces don't intersect trivially, mainly with notation and how to go about finding an orthogonal/orthonormal basis of $U\cap W$.
Maybe there is a better way to approach this problem or some better notation and someone may be able to offer some insight.
Edit:
As of Jyrki Lahtonen's counter example, the claim is false. Still open to new answers/perspectives and possibly some conditions which would allow for this to happen, if there are any.
 A: The claim is false as stated.  Proffering a counterexample.
Let $V=\Bbb{R}^2$ with the usual inner product. Let $U=\{(x,0)\mid x\in\Bbb{R}\}$ be the $x$-axis. Let $w=\{(t,t)\mid t\in\Bbb{R}\}$ be the line with slope one.
Then $U+W=V$ and $U\cap W=\{0\}$.
Consider the vector $\vec{x}=(3,1)$. Its projection to $U$ is $p_U(\vec{x})=(3,0)$. Its projection to $W$ is $p_W(\vec{x})=(2,2)$. Of course, its projection to $U\cap W$ is the zero vector and its projection to $V$ is itself.
But $\vec{x}\neq p_U(\vec{x})+p_W(\vec{x}).$
A: Expanding on WillM.'s comments:
Choose an orthonormal basis $\mathbf{int}_{U,W}=\{v_1,\dots,v_r\}$ of $U\cap W$ (assuming they intersect non-trivially).
Extend this to an orthonormal basis $\mathbf{u}=\{v_1,\dots,v_r,u_1,\dots,u_m\}$ of $U$.
Further extend this to an orthornomal basis $\mathbf{sum}_{U,W}=\{v_1,\dots,v_r,u_1,\dots,u_m,w_1,\dots,w_l\}$ of $U+W$.
Note that $\mathbf{w}=\{v_1,\dots,v_r,w_1,\dots,w_l\}$ is an orthonormal basis of $W$.
Then we have
\begin{align*}
\text{proj}_{U}(x)+\text{proj}_{W}(x)-\text{proj}_{U\cap V}(x)
&=\left(\sum_{i=1}^r\langle x,v_i\rangle v_i+\sum_{j=1}^m\langle x,u_j\rangle u_j\right)+\left(\sum_{i=1}^{r}\langle x,v_i\rangle v_i+\sum_{k=1}^{l}\langle x,w_k\rangle w_k\right)-\sum_{i=1}^r\langle x,v_i\rangle v_i\\
&=\sum_{i=1}^r\langle x,v_i\rangle v_i+\sum_{j=1}^m\langle x,u_j\rangle u_j+\sum_{k=1}^{l}\langle x,w_k\rangle w_k\\
&=\text{proj}_{U+W}(x)
\end{align*}
which completes the proof.
