# Relationship between X and its projection matrix

Suppose $Q_{1}$ is an $n$ x $p$ matrix (derived from the QR Decomposition of X) whose columns provide an orthonormal basis for the subspace ${\chi}$ of $\mathbb{R}^{n}$ spanned by the columns of an $n$ x $p$ matrix $X$ = $(x_1,...,x_p)$. The hat matrix $H$ = $Q_{1}Q_{1}^{T}$ projects vectors orthogonally onto $X$.

Suppose the first two rows of $X$ are the same. Explain why the first two rows of $H$ are the same.

• If this is a textbook question, you should add the self study tag. – GeoMatt22 Sep 17 '16 at 0:42

I wish I could comment instead of answer, but I ain't got that kind of reputation! But, if $X=Q~R$ is the QR decomposition of $X$, then I'm pretty sure that $X$, $Q$, and $R$ should all be square. Moreover, $Q$ should be an orthogonal matrix, and $H=Q~Q^{T}$ should just be $H=I$, the identity matrix.
But, you say '$Q_{1}$ is derived from the QR decomposition', so maybe I'm understanding this all wrong. But if I'm not understanding this wrong, I basically don't see how any part of your question is possible.