Least square proof, Notation sum matrices

1.6k Views Asked by At

I have spent weeks trying to understand a "proof" in my textbook. However I am not able to get what is going on.

The "proof" goes like this:(I have marked the numbers in red)

Proof

This is how I have done the calculations which might be all wrong and hopefully is since I dont end up with getting the result as equ. 4(marked in red)

a1 a2

My problem as you can see is that I get different answer, from equation 4(in red) which states that the matrix multiplication with sum and plain matrix multiplication should provide the same answer-->(be equal to each-other)

In other words, equation 7 and the last matrix calculated( equation 11+ equation 12) are not equal to to each other. Can someone show me what I have done wrong?

1

There are 1 best solutions below

5
On BEST ANSWER

The $x_i$ are the transposed of the row-vectors of $X$, or, equivalently, the column-vectors of $X^T$. You chose the column-vectors of $X$ instead.

So in your example: $x_1 = (2,1)'$,$x_2 = (3,1)'$,$x_3 = (4,1)'$ and $$x_1x_1^T = \left(\begin{matrix} 4 & 2 \\ 2 & 1 \end{matrix} \right)$$ and so on and their sum indeed coincides with $X^TX$.