My textbook, Introduction to Probability by Blitzstein and Hwang, says the following in a section on covariance and correlation:
Definition 7.3.1 (Covariance). The covariance between r.v.s $X$ and $Y$ is
$$\text{Cov}(X, Y) = E((X - EX)(Y - EY).$$
Multiplying this out and using linearity, we have an equivalent expression:
$$\text{Cov}(X, Y) = E(XY) - E(X)E(Y).$$
Let's think about the definition intuitively. If $X$ and $Y$ tend to move in the same direction, then $X - EX$ and $Y - EY$ will tend to be either both positive or both negative, so $(X - EX)(Y - EY)$ will be positive on average, giving a positive covariance. If $X$ and $Y$ tend to move in opposite directions, then $X - EX$ and $Y - EY$ will tend to have opposite signs, giving a negative covariance.
If $X$ and $Y$ are independent, then their covariance is zero. We say that r.v.s with zero covariance are uncorrelated.
The intuition with regards to zero covariance is clear to me, since I assume that zero covariance implies that the random variables $X$ and $Y$ are independent, and so $E(XY) = E(X)E(Y)$, right?
Why will $X - EX$ and $Y - EY$ tend to be either both positive or both negative if $X$ and $Y$ tend to move in the same direction?
Why will $X - EX$ and $Y - EY$ tend to opposite signs if $X$ and $Y$ tend to move in opposite directions?
I would greatly appreciate it if people could please take the time to clarify this points.