I'm having trouble with some of these lecture notes deriving a property of OLS, such that, if the relation has an intercept, then $$\bar{y}=\bar{x}^{\prime} \hat{\beta}$$ with $$ \bar{x}=\left[\begin{array}{c}\frac{1}{n} \sum_{i=1}^{n} x_{i 0}(=1) \\ \vdots \\ \frac{1}{n} \sum_{i=1}^{n} x_{i K}\end{array}\right] $$ the (K + 1) x 1 vector of sample means of the independent variables.
Proof: Partition X as $$ X=\left[\begin{array}{llll}\iota & x_{1} & \cdots & x_{K}\end{array}\right] $$ then normal equations can be written as: $$ \left[\begin{array}{c}\iota^{\prime} \\ x_{1}^{\prime} \\ \vdots \\ x_{K}^{\prime}\end{array}\right] X \hat{\beta}=\left[\begin{array}{c}\iota^{\prime} \\ x_{1}^{\prime} \\ \vdots \\ x_{K}^{\prime}\end{array}\right] y $$
The first equation is $$\iota^{\prime} X \hat{\beta}=\iota^{\prime} y$$ or $$ \frac{1}{n} \iota^{\prime} X \hat{\beta}=\frac{1}{n} \iota^{\prime} y $$ or $$ \bar{x}^{\prime} \hat{\beta}=\bar{y} $$
Here we use $$ \frac{1}{n} \iota^{\prime} X=\frac{1}{n} \iota^{\prime}\left[\begin{array}{llll}\iota & x_{1} & \cdots & x_{K}\end{array}\right]=\left(\begin{array}{cccc}\frac{1}{n} \iota^{\prime} \iota & \frac{1}{n} \iota^{\prime} x_{1} & \cdots & \frac{1}{n} \iota^{\prime} x_{K}\end{array}\right) $$ and e.g. $$ \frac{1}{n} \iota^{\prime} x_{1}=\frac{1}{n} \sum_{i=1}^{n} x_{i 1}=\bar{x}_{1} $$ Therefore $$ \frac{1}{n} \iota^{\prime} X=\bar{x}^{\prime} $$ Row vector of sample means of the columns of X.
Q: I actually follow the proof all the way to $\frac{1}{n} \iota^{\prime} x_{1}=\frac{1}{n} \sum_{i=1}^{n} x_{i 1}=\bar{x}_{1}$. But we're dealing with scalars here since he's only looking at the first row. I don't see where he's able to get the summation. I only see an average if $\iota^{\prime}$ is a row of 1's.