# An orthonormal basis in a subspace.

Let an orthonormal basis of $$\Bbb{R}^n$$ be $$\{e_1,\dots,e_n\}$$, and $$U$$ be a subspace in $$\Bbb{R}^n$$. Can we construct the orthonormal basis of $$U$$ by taking randomly from $$\{e_1,\dots,e_n\}$$? If possible, would you prove it?

• Look up Gram-Schmidt algorithm. Jul 23 '20 at 15:31
• @Chrystomath What if no $e_i$ belongs to $I$? Jul 23 '20 at 15:33
• The subspace $U$ must be generated from some vectors $u_1,\ldots,u_k$. Apply GS to these. Jul 23 '20 at 15:35
• Thanks. Is {u_1,...,u_k} a subset of {e_1,...,e_n}? Jul 23 '20 at 15:42
• No, unless $U$ is generated by some axes of $\mathbb{R}^n$. Jul 25 '20 at 12:55

In general, no, it is not possible. Take $$n=2$$, let $$\{e_1,e_2\}$$ be the standard basis of $$\Bbb R^2$$ and let $$U=\{(x,x)\mid x\in\Bbb R\}$$. Then no subset of $$\{e_1,e_2\}$$ is a basis of $$U$$, since neither $$e_1\in U$$ nor $$e_2\in U$$.