I see some inconsistency in the geometric interpretation of covariance.
Here https://mathcs.clarku.edu/~djoyce/ma217/covar.pdf and in many other places covariance between two vectors is being interpreted as the inner product of these two vectors.
But according to the covariance formula $${\displaystyle \operatorname {cov} (X,Y)=\sum _{i=1}^{n}p_{i}(x_{i}-E(X))(y_{i}-E(Y)).}$$ and this question from gil strang's book:
It can be interpreted that the covariance of two vectors is the inner product of the least square $e$ from their projections onto the line (1, 1, 1, ...).
So which is correct? Covariance of two vectors is the inner product of them or the inner product of the $e$ of each?