Q:

Linear algebra x transpose x

I am studying econometrics, but due to my knowledge level I have to down to the basics. Can someone explain what $x^Tx$ does? I understand how calculations is done, but I don't see the intuitive
$$\begin{pmatrix}1&1&1\\2&3&4\end{pmatrix}\begin{pmatrix}1&2\\1&3\\1&4\end{pmatrix} = \begin{pmatrix}3&9\\9&29 \end{pmatrix}$$
Could someone please take some time to explain what the result actually represent/mean?

A:

Based upon the form of your matrix $X$, and the fact that you called it $X$ and not $A$, I'm guessing your question comes from the matrix form of doing simple linear regression. So, you are trying to find the regression parameters, the slope and intercept of the fitted line. Recall that when you calculate those parameters, you need to know the sample size, $n$, and the sums, $\sum{x_i}$ and $\sum{x_i^2}$ among other things.  Now, if you look at the entries in the result (referring to your example), you see that the result has the form...
$$\begin{pmatrix}n&\sum{x_i}\\\sum{x_i}&\sum{x_i^2}\end{pmatrix}$$
Hopefully, you can see how important these quantities are in the calculation of the linear regression parameters.

