# How does the MLE of Gaussian mixture model give a square covariance matrix?

I'm reading these lecture notes. There's this equation:

For calculating the covariance matrix. I don't really understand how this results in a square covariance matrix. Cause for example the responsibility or $$\tau$$ will be a $$N$$ dimensional vector as in $$N$$ responsibilities for each data point $$N$$. Then $$x_n-\mu_k$$ will be a $$N\times D$$ where $$D$$ is the dimension of each point. So the covariance matrix should be a $$D\times D$$. But If you multiply these together then $$\tau * (x_n-\mu_k) * (x_n-\mu_k)^T \rightarrow (1,N)*(N,D)*(D,N)=(1,N)$$ by matrix multiplication so then when you sum over N you get a scalar rather than a $$D\times D$$. What am I getting wrong here?