Is it true that $\text{proj}_{U+W}=\text{proj}_U+\text{proj}_W-\text{proj}_{U\cap W}$

linear algebralinear-transformationsorthogonalityorthonormal

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.

Best Answer

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}).$

Related Question