Why the second term is transposed, but not the first one? I am not very good at maths. I just have this silly question. Why do I have to transpose the second term in expectation?
I mean why $Var(X) = E[(x−μ)(x−μ)^T)]$ and not this $E[(x−μ)^T(x−μ))]$ ?

For any column vector $x$ (eg $x \in \mathbb R^{n \times 1}$)

*

*$x^Tx$ is (a 1x1 matrix and thus 'is isomorphic to' (*)) a scalar.


*$xx^T$ is a matrix. (and if it's 1x1, then it could be treated as a scalar similarly.)
(*) in your case 'is isomorphic to' just means 'can be treated as'
