# Find the matrix of the orthogonal projection $P \in \mathcal{L}(\mathbb{R^3})$ onto $U$

Question:

Let $U$ be the subspace of $\mathbb{R^3}$ that coincides with the plane through the origin that is perpendicular to the vector $n = (1, 1, 1) \in \mathbb{R^3}$.

Find the matrix (with respect to the canonical basis) on $\mathbb{R^3}$ of the orthogonal projection $P \in \mathcal{L}(\mathbb{R^3})$ onto $U$ such that $range(P) = U$

Approach:

First I find an orthonormal basis for U. Since $U$ is the subspace that coincides with the plane, it will have dimension 2. Taking a basis $(1, -1, 0)$ and $(1, 0, -1)$, I can then apply the Gram-Schmidt process to achieve a valid orthonormal basis.

At this point I do not know how to taken an orthogonal projection onto U to meet the condition that $range(P) = U$.

If $\vec{q}=(x,y,z)$ is given, then the orthogonal projection of $\vec{q}$ onto a plane $\mathscr{P}$ passing through the origin is the unique $\vec{p} \in \mathscr{P}$ such that $(\vec{q}-\vec{p})\perp \vec{n}$. However, the only vectors orthogonal to $\mathscr{P}$ are scalar multiples of the normal vector $\vec{n}=(1,1,1)$. So, $\vec{p}$ must be chosen as the unique vector such that $$\vec{q}-\vec{p} = t\vec{n},\;\; \vec{p} \perp \vec{n}.$$ So $t$ must be chosen so that $(\vec{q}+t\vec{n})\cdot\vec{n}=0$, or $$t = -\frac{\vec{q}\cdot\vec{n}}{\vec{n}\cdot\vec{n}}.$$ Then the orthogonal projection of $\vec{q}$ onto $\mathscr{P}$ is $$P\vec{q}=\vec{p}=\vec{q}-t\vec{n}=\vec{q}-\frac{\vec{q}\cdot\vec{n}}{\vec{n}\cdot\vec{n}}\vec{n}.$$
Express any point $(a,b,c)$ as a linear combination of $2^{-\frac 1 2} (1,-1,0)$,$2^{-\frac 1 2} (1,0,-1)$ and $3^{-\frac 1 2} (1,1,1)$. Once you do this simply drop the last term and you will get the projection.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}