# Why is $E(ee')$ a matrix?

One of the assumptions of linear regression is that $$E(ee') = \sigma^2 * I$$, where I is the identity matrix and sigma squared is the variance of residuals. Why is $$E(ee')$$ a matrix, though? $$ee'$$ is the dot product of the residuals so it is a 1x1 vector. How do we get a matrix out of a 1x1 vector?

You obtain this by using matrix algebra. $$\epsilon=(\epsilon_1,\dots,\epsilon_T)^\top$$ is a $$T \times 1$$ column vector. Now look at: \begin{align} \epsilon\cdot \epsilon^\top=\begin{pmatrix} \epsilon_1 \\ \vdots \\\epsilon_T\end{pmatrix}\cdot \begin{pmatrix} \epsilon_1 & \dots & \epsilon_T\end{pmatrix}=\begin{pmatrix} \epsilon_1^2 & \dots & \epsilon_1\epsilon_T \\ \vdots & \dots & \vdots \\ \epsilon_T\epsilon_1 & \dots & \epsilon_T^2 \end{pmatrix} \end{align}
This is a $$T \times T$$ matrix.