Matrix regression: Prove H1=1 (H=hat matrix)

I couldn't find a way to prove this...

Prove H1=1

(H=hat matrix; 1=column vector of n 1s)

I thought that it's "obvious" since the projection of the vector 1 onto the space spanned by the columns of design matrix X is clearly vector 1, but I need to prove it for real.


Ambassador to the humans
What do they tell you about the design matrix? Cause if they don't say anything you could disprove it.


Ambassador to the humans
Ok so you're assuming that that there is a column of 1s at the beginning. This doesn't have to be the case but if we're assuming that it's the case then it makes it a little easier. What have you learning about the hat matrix? How much linear algebra do you know? Do you know how to take the design matrix and construct the hat matrix?


TS Contributor
One property the vector \( \mathbf{1} \in \text{col}(X) \) because

\( \begin{bmatrix} \mathbf{1} && \mathbf{X}_1 && \cdots && \mathbf{X}_{p-1} \end{bmatrix} \begin{bmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{bmatrix} = \mathbf{1} \)

In short, we have the relationship \( X\mathbf{e}_1 = \mathbf{1} \) and a direct substitution in the definition of hat matrix can yield the desired result.
@Dason: I am learning linear algebra as I learn regression. I know the hat matrix = X(X`X)^-1X` where ` means transpose.

@BGM: Would this be a valid solution?:

X (X`X)^-1 (X`X) e_1
= X I e_1
= 1


Ambassador to the humans
You would probably want to start it with H1 = HXe_1 = ... and then put what you have. I'm guessing we're assuming that X is full column rank in which case all of this works out fine.


Ambassador to the humans
Yep, thanks a lot! :) Matrix algebra is quite confusing to me :confused:
It takes a while to get used to but it actually simplifies things quite a bit. There are still parts of it that aren't natural to me either but it definitely makes more and more sense the more you deal with it.