I am trying to understand the OLS property that SST(Total sum of squares) = SSE (explained sum of squares) + SSR (residual sum of squares).
One of the steps is to prove that sample covariance of residuals and the fitted values y_hat is zero. One of the post on stack exchange says that the covariance of residuals and y_hat is actually their dot product. I am surprised to learn this..
So I looked for the handouts online, and one of them says that the two vectors' covariance is the same as their inner product/dot product. But I don't see why and how we reached to this conclusion.

The link is here: https://mathcs.clarku.edu/~djoyce/ma217/covar.pdf
I am wondering if there is a simple way to understand why the inner product of two vectors is the covariance?
Thank you very much!