Hi all,

I have seen that Stan has function **eigenvalues_sym(matrix A)** to compute the eigenvalues of a symmetric matrix (The vector of eigenvalues of a symmetric matrix A in ascending order).

I am wondering whether Stan has a similar function but can **compute eigenvalues for non symmetric matrices**.

Do you have any idea?

Kind regards,

Trung Dung.

P/S: I see that we can do in C++.

Stan currently doesn’t support this because the current release does not allow for complex-valued parameters (an eigenvalue of a general matrix will be complex)

Thank you, I understand now.

For this region, we should be sure before running the program that the matrix should has real eigenvalues.

It has to be symmetric. Stan can’t take into account other structures that guarantee real eigenvalues.

Yes, it should symmetric, that is why only symmetric version of function **eigenvalues_sym** exists.

Thank you so much again!