Given the partitioned regression equation (into $X_1$ and $X_2$), I want to transform $X_1$, say $X^*_1$, such that $X_2$ and $X^*_1$ becomes orthogonal ie. $X_2^T$. $X_1^*$= 0. A matrix can be transformed as $X_1^*$ = $X_1$.p where P is transformation matrix.
If we premultiply $X_1^*$ = $X_1$.p with $X_2^T$ we will get $X_2^T$.$X_1$.p = $X_2^T$.$X_1^*$= 0. How can I find P?
Part (ii) is easy to solve. Parameters of $X_2^T$ and $X_1^*$ will depend on their separate regression with Y.