Answer:
Explanation:
Consider that we have a multiple linear model given by this:

And we assume that we have p independent variables and p+1 is the dimension with the vector including the intercept, so then n =p+1.
For this case we want to minimize the sum of error

And we have this:


And when we find the partial derivate respect to b we got:


We are assuming that the matrix X is invertible(non singular). And applying the inverse matrix X'X on both sides we got:

The estimator for [tex\beta[/tex] is given by:

And the predicted values can be written like this:
![\hat y = X \hat \beta =[X(X^T X)^(-1) X^T]= Hy](https://img.qammunity.org/2021/formulas/mathematics/high-school/cvv9dcbtq1050bzyiwhfo4lojt6w6nt1f2.png)
And we can see that
and on this case if we find the dimensions for H, assuming that X is nxn. Then H is a matrix nxn since only depends of the matrix X.
On this case the elements
represent the elements of the diagonal for the matrix H and are used in order to find the estimated values
