Solving for the matrix $W$ in an equation involving $W \cdot W^{T}$
You might be looking for the Cholesky decomposition. The referenced article also contains an example for  $M$ having negative entries. Note the constraints on $M$ for this decomposition to exist.