[Math] Finding orthogonal projections onto $1$ (co)-dimensional subspaces of $\mathbb R^n$

linear algebramatricesorthogonality

1)Consider the vector space $\mathbb{R}^n$ with usual inner product.
And let S the subspace generated by $u\in \mathbb{R}^n,u\neq 0$. Find
the orthogonal projection matrix $P$ onto the subspace $S$ and the
orthogonal projection matrix onto subspace $S^\perp$

There is an explicit way to determine $P$? Or I can only say that $Pu$ is the orthogonal projection onto $S$ and $(I-P)u$ is the orthogonal projection onto $S^\perp$

2)Let $S$ the subspace of $\mathbb{R}^3$ with usual inner product
defined by equation $x-2y+3z=0$. Find the orthogonal projection matrix
onto subspace $S$

I'm a little lost as to resolve this, I know that
$$x-2y+3z=\begin{bmatrix}x\\y\\z\end{bmatrix}\begin{bmatrix}1&&0&&0\\0&&-2&&0\\0&&0&&3\end{bmatrix}=A$$

A is symmetric but not idempotent, anyone can help me?

Best Answer

i think it is easier to find the projection on to the line $u = (1, -2, 3)^\top$ that is orthogonal to the plane and then subtract from the identity to get the projection onto the plane.

the projection matrix onto the line $u$ is $$uu^\top/(u^\top u) = \frac1{14}\pmatrix{1&-2&3\\-2&4&-6\\3&-6&9}.$$ therefore the projection matrix on to the plane is $$I - uu^\top/(u^\top u) = \frac1{14}\pmatrix{13&2&-3\\2&10&6\\-3&6&5}.$$

Related Question