Find a matrix that when multiplied with its transpose, creates a known PSD matrix

linear algebramatrices

I have a symmetric PSD matrix A that looks like this:

| 1 1 0 0 |
| 1 1 0 0 |
| 0 0 1 1 |
| 0 0 1 1 |

In many literature it is mentioned that a symmetric matrix A is PSD iff, A equals the multiplication of some matrix M with its own transpose:

A = (M^T)M

Here I quote the explanation from Wolfram

My question is, how one can find this matrix M? since there are probably many numbers of such matrix. In this book, on page 142 it is said that computing M can be done in polynomial time.

EDIT

Does M must a square matrix? how to compute M, if we want M with
certain dimension?

Thanks in advance

Best Answer

There is more than one such matrix, but in general, the one matrix that is most often studied is the one obtained by the Cholesky decomposition