# Find orthogonal projection of $[n,0,0,...,0]^T$ on subspace $V$

$$n>1$$ Given is $$V = \left\{ \vec{x} \in \mathbb R^n : x_1+x_2 + ... + x_n = 0 \right\}$$ a) Find orthogonal basis of $$V^{\perp}$$
b) Find orthogonal projection $$\vec{x} = [n,0,0,...,0]^T$$ on subspace $$V$$

If it comes to a)
$$\dim V^{\perp} = n - \dim V = \dim V^{\perp} = n - n + 1 = 1$$ So $$V^{\perp} = span$$ one_vector_perpendicular_to_v

Put $$[1,1,1,...,1,1]^T$$ - it is perpendicular to $$V$$

Let's start Gram–Schmidt process - but we have $$1$$ vector so $$u_1 = [1,1,1,...,1,1]^T$$ = orthogonal basis of $$V^{\perp}$$

b) It seems to be very interesting and hard. I found basis of $$V$$:
$$[-1,1,0,0,...,0] = \vec{v_1}$$ $$[-1,0,1,0,...,0] = \vec{v_2}$$ $$[-1,0,0,1,...,0] = \vec{v_3}$$ $$...$$ $$[-1,0,0,0,...,1] = \vec{v_{n-1}}$$

Now I start Gram–Schmidt process $$u_1 = v_1$$ $$u_2 = v_2 - \frac{1}{2} \cdot v_1$$ $$u_ 3 = v_3 - \frac{1}{4} \cdot v_2 + \frac{1}{8} \cdot v_1$$ $$u_4 = v_4 - \frac{7}{16} \cdot v_3 + \frac{7}{64} \cdot v_2 - \frac{7}{64} \cdot v_1$$ I don't even know if I don't take mistake.
Moreover the calculations getting harder and harder and I still don't see any regular sequence in it. Can somebody help me with this task?

• Why do you need an orthogonal basis of $V$? One can find the projection if one follows the vector $(1\ 1\ \ldots\ 1)$ until the line meets $V$.
– A.Γ.
Jan 3, 2019 at 14:15
• I need orthogonal basis because I have that formula for orthogonal projection: $P_z(x) = \sum_{j=1}^k <z_j,x>z_j$ where $z_1,...,z_k$ is orthogonal basis and I don't have any other idea how to do this task @A.Γ.
– user617243
Jan 3, 2019 at 14:18
• You can save yourself a lot of work by taking advantage of the fact that the orthogonal projection onto a subspace is what’s left after subtracting the orthogonal projection onto its complement.
– amd
Jan 3, 2019 at 21:40

Let us call $$\vec u$$ the projection of $$\vec{x} = [n,0,0,...,0]^T$$ on $$V$$.
$$\vec x - \vec u$$ is orthogonal to $$V$$, i.e. $$\vec x - \vec u = a \vec v$$ with $$v = (1, \dots, 1)^T$$ as you already showed

Therefore $$\vec x = a \vec v + \vec u$$ with $$\vec u$$ satisfying $$\sum_i u_i = 0$$

Then, $$\sum_i (x_i - a) = 0$$

And finally $$a = 1$$ and

$$\vec u = (n-1, -1, \dots, -1) ^T$$

• the answer should be $\vec u = (n-1, 1, \dots, 1) ^T$ or $\vec u = (n-1, -1, \dots, -1) ^T$?
– user617243
Jan 3, 2019 at 14:36
• Great, it is a loooot of simpler way than my idea, thanks
– user617243
Jan 3, 2019 at 14:39
• @VirtualUser Corrected. You read my answer before I had time to check it! Jan 3, 2019 at 14:39