# Math Help - Linear Regression Model Matrix

1. ## Linear Regression Model Matrix

I am stuck on how to structure the matrix, can anyone help?

2. That's the usual design matrix, X.

The first column is all 1's (n of them)
The second one is x_1 through x_n

Now, when you obtain $X^tX$
you will get a diagonal matrix because the (1,1) position is n.
The (1,2) and (2,1) spot is the sum of the x's which is zero.
And the (2,2) position is $\sum_{i=1}^n x^2_i$