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

#1
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.
 

Dason

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

Dason

Ambassador to the humans
#6
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?
 

BGM

TS Contributor
#7
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.
 
#8
@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
 

Dason

Ambassador to the humans
#9
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.
 

Dason

Ambassador to the humans
#11
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.