If a vector $e_1= (1,0,\dots,0)$ belongs to the subspace $\mathcal{X}$ spanned by the columns of $X$ why must the $H[1,1]$ element of the hat matrix $H=X(X^{T}X)^{-1}X^{T}$ be $1$?
I feel like this has something to do with the first column of $X$ consisting of all $1$s (intercept column).
Note that $H$ is defined as the projection matrix over the subspace $\mathcal X$. As the vector $e_1=(1,0,...,0)$ belongs to $\mathcal X$, then we will have that $$He_1=e_1$$ but $He_1$ is the first column of $H$, so the element $H[1,1]$ must be $1$.