TITLE: Find Orthogonal Vectors in 4-Dimensions
QUESTION [7 upvotes]: I have $4$ vectors in $\mathbb{R}^4$ as the following:
$$
a_1, a_2 \in \mathbb{R}^4 \text{ and } a_1 \perp a_2, \\
b_1, b_2 \in \mathbb{R}^4 \text{ and } b_1 \perp b_2. \\
$$
The way I have constructed them is, I took random vectors in $\mathbb{R}^4$ and ran Gram-Schmidt on pairs $(a_1, a_2)$ and $(b_1, b_2)$. Now, I want a situation where
$$
a_1 \perp b_1, a_2 \perp b_2. 
$$
I can use Gram-Schmidt again on the pairs $(a_1, b_1)$ and $(a_2, b_2)$, but then I lose the property that $(a_1 \perp a_2)$ and $(b_1 \perp b_2)$. Is there a way to ensure the above-mentioned desiderata? Note that I could run Gram-Schmidt on $(a_1, a_2, b_1, b_2)$ to find $4$ orthogonal vectors, but that's not what I want. Notice that in my specification, I am not telling anything about the inner products between $a_1, b_2$ or $a_2, b_1$. Is there a way to do this? Or can I prove that it is impossible? Thanks!

REPLY [5 votes]: If $\ x_1, x_2,x_3,x_4\ $ are "random" independent vectors in $\ \mathbb{R}^4\ $, and
\begin{align}
y_1&=x_1\\
y_2&=x_2-\frac{\langle x_ 2,y_1\rangle}{\|y_1\|^2}y_ 1\\
y_3&=x_3-\frac{\langle x_ 3,y_2\rangle}{\|y_2\|^2}y_ 2\\
z_3&=y_3-\frac{\langle y_ 3,y_1\rangle}{\|y_1\|^2}y_ 1\\
y_ 4&=x_4-\frac{\langle x_ 4,z_3\rangle}{\|z_3\|^2}z_3-\frac{\langle x_4,y_1\rangle}{\|y_1\|^2}y_ 1\ ,
\end{align}
then $\ y_1\perp y_2\perp y_3\perp y_4\perp y_1\ $. Is that what you're looking for?