finding the covariance of a distribution 
This is a solution posted by the professor.
Cov(z)= E(zz')-UU'
Since E(z)=0 
Cov(Z)=E(ZZ')
After expanding, it is no where close to the solution given.
I don't see how the solution and the formula match up.
 A: I suspect that you have confused the residuals with the error term. The covariance is zero, no matter how you compute it. To see this, note that
$$\begin{align} E\left[ \mathbf{Z} \mathbf{Z}^{\prime} \right] = E\left[ \left( \mathbf{X}^{\prime} \mathbf{X} \right)^{-1} \mathbf{X}^{\prime} \widehat{\boldsymbol{\epsilon}} \widehat{\boldsymbol{\epsilon}}^{\prime} \mathbf{X}  \left( \mathbf{X}^{\prime} \mathbf{X} \right)^{-1}  \right] \end{align}$$
and assuming fixed regressors, you can pass the expectation inside and compute the covariance of the residuals, which is given in your question. If you then simplify, you will get your result.
A: Geometrically, $\hat\epsilon$ is constructed to be orthogonal to the column space of $X$ and $P = \color{blue}{(X^\prime X)^{-1}X^\prime}$ maps vectors orthogonally into the column space.  Therefore $Z = P\hat\epsilon$ must be identically zero. No distributional assumptions about $\epsilon$ are needed at all.

You can show this algebraically by starting with the model $y = \color{red}{X\beta + \epsilon}$ and the least squares solution $\hat\beta = \color{blue}{(X^\prime X)^{-1}X^\prime} y$.  Plug the model into the solution, exploiting the defining relation $X^\prime X (X^\prime X)^{-1} = \mathbb{I}$ to simplify things:
$$\hat\epsilon = \hat y - y = X\hat\beta - y = X\color{blue}{(X^\prime X)^{-1}X^\prime}(\color{red}{X\beta + \epsilon})- (\color{red}{X\beta + \epsilon}) = \color{green}{X(X^\prime X)^{-1}X^\prime\epsilon - \epsilon}.$$
Consequently, $Z=P\hat\epsilon$ simplifies when you plug in the right hand side of the preceding expression for $\hat \epsilon$:
$$Z = \color{blue}{(X^\prime X)^{-1}X^\prime} \left(\color{green}{X(X^\prime X)^{-1}X^\prime\epsilon - \epsilon}\right) = \color{blue}{(X^\prime X)^{-1}X^\prime}\epsilon - \color{blue}{(X^\prime X)^{-1}X^\prime}\epsilon = 0.$$
