# Why is it true that $SSR = (\hat{\beta} - \beta)^T (X^T X) (\hat{\beta} - \beta)$?

Why is it true that $SSR = (\hat{\beta} - \beta)^T (X^T X) (\hat{\beta} - \beta)$? Since $SSR = \sum (\hat{y}_i - \bar{y})^2$, I know that

$$SSR = \left( \hat{y} - \bar{y} \mathbb{1} \right)^T \left( \hat{y} - \bar{y} \mathbb{1} \right)$$

But why

$$(\hat{\beta} - \beta)^T (X^TX) (\hat{\beta} - \beta) = \left( \hat{y} - \bar{y} \mathbb{1} \right)^T \left( \hat{y} - \bar{y} \mathbb{1}\right)\,?$$

I can see that the following has to be true:

\begin{align} (\hat{\beta} - \beta)^T (X^TX) (\hat{\beta} - \beta) &= (X\hat{\beta} - X\beta)^T (X\hat{\beta} - X\beta) \\ &= (\hat{y} - X\beta)^T (\hat{y} - X\beta) \end{align}

So I guess the question becomes, why

$$(\hat{y} - X\beta)^T (\hat{y} - X\beta) = \left( \hat{y} - \bar{y} \mathbb{1} \right)^T \left( \hat{y} - \bar{y} \mathbb{1} \right)\,?$$

• @iseliget, it appears you're using both $^T$ and $'$ in the same equations to mean transpose; it would be clearer to use $^T$ throughout. Also, I'm not clear what the "1" following each $\bar{y}$ is meant to represent, is that just a typo? – olooney Nov 9 '17 at 2:15
• @Clarinetist Isn't $\sum (\hat{y}_i - y_i)^2$ SSE? – Yuki Kawabata Nov 9 '17 at 2:43
• @olooney $\mathbb{1}$ stands for a column vector whose entries are all $1$'s. – Yuki Kawabata Nov 9 '17 at 2:44
• @iseliget please add these clarifications to the question text so it is visible to other people looking at this question. also I am not familiar with the abbreviations SSR and SSE – bibliolytic Nov 9 '17 at 6:31