The following is an exercise in my linear algebra textbook.
Suppose $\vec{x} \in \mathbb{R}^n$ and $\|\vec{x}\|^2 = 1$. Prove that there exists a matrix $A \in O(n,\mathbb{R})$ and $A^T=A$ such that the first column of $A$ is $\vec{x}$.
I have tried to use induction but failed. Suppose x = [$x_1,x_2,...,x_n]^T$, how to construct a series of standard orthogonal basis to make the conditions satisfied?
Thank you for your help in advance!
The property $A=A^T$ has an interesting geometric interpretation: when this transformation is applied twice, it returns the same point, because $AA^T = A^2 = I$ as $A$ must be orthogonal. If you are familiar with Householder matrices, this question becomes simple. A Householder matrix represents a reflection of a vector in a subspace of $\mathbb{R}^n$ whose normal vector is $\vec{n}$, given by $H = I - 2\vec{n}\vec{n}^T$. You can verify easily that $H^2 = HH^T = I$. The underlying concept of a Householder matrix is quite simple: to reflect a vector $\vec{v}$ across a hyperplane orthogonal to $\vec{n}$, we simply subtract twice the projection of $\vec{v}$ onto $\vec{n}$. So we need some matrix $H$ such that $H\vec{v} = \vec{v} - 2\text{proj}_\vec{n}\vec{v}$, and that matrix happens to be $H = I - 2\vec{n}\vec{n}^T$. It becomes obvious, both geometrically and algebraically, why $H^2 = HH^T =I$: if you reflect something twice with respect to the same subspace, you land right back where you began!
So does there exist a Householder matrix with first column $\vec{v}$, for any vector $\vec{v} \in \mathbb{R}^n$? The answer is yes, because if $\vec{n} = [n_1, n_2, \cdots, n_n]^T$, $\vec{n}\vec{n}^T$ is the matrix $[n_1 \vec{n} \text{, } n_2 \vec{n} \cdots , n_n \vec{n}]$. To solve your problem, we want $$\hat{e}_1 - 2n_1\vec{n} = \vec{x} \implies \frac{\hat{e}_1 - \vec{x}}{2 n_1} = \vec{n}$$ Excepting $\vec{x} = \hat{e}_1$, we want $||\vec{n}||^2 = 1$, or in other words, $$\frac{1}{4n_1^2}(||\hat{e}_1||^2 + ||\vec{x}||^2 -2(\hat{e}_1\cdot\vec{x}))=\frac{1}{2n_1^2}(1 - (\hat{e}_1\cdot\vec{x})) = 1.$$ Solving for $n_1$ yields $n_1^2 = \frac{1}{2}(1-(\hat{e}_1\cdot\vec{x}))=\frac{1}{2}(1-x_1)$. We can verify that $|n_1|\leq 1$, which is good, since $\vec{n}$ should be normal. Now, $n_2, n_3, \cdots, n_n$ are all constrained as well, and are equal to $\frac{-x_2}{2n_1}, \frac{-x_3}{2n_1}, \cdots, \frac{-x_n}{2n_1}$, respectively (this because $\hat{e}_1 - 2n_1\vec{n} = \vec{x}$).
So the matrix $H = I-2\vec{n}\vec{n}^T$, with $\vec{n} = \bigg(\sqrt{\frac{1-x_1}{2}}, \frac{-x_2}{\sqrt{2 - 2x_1}}, \frac{-x_3}{\sqrt{2 - 2x_1}}, \cdots, \frac{-x_n}{\sqrt{2 - 2x_1}}\bigg)^T$ is an orthogonal matrix satisfying $H\hat{e}_1 = \vec{x}$, and $H = H^T$. $\square$