# What's the fastest way to find the nearest Positive Definite Matrix?

Let's assume that I have a symmetric matrix $A$. What's the fastest way to find its nearest positive definite matrix in Mathematica?

Any help would be appreciated.

• Diagonalize, zero out negative values on the diagonal, reverse, and you have the closest positive semidefinite matrix. – Daniel Lichtblau Aug 3 '17 at 18:57
• @Anoldmaninthesea. Asking for a a positive definite matrix is like asking which number in the open interval (0, 1) is nearest to 2 – Coolwater Aug 3 '17 at 19:29
• What people are trying to say is that there is no "nearest" PD matrix, only PSD. – Daniel Lichtblau Aug 3 '17 at 21:01
• Positively definitely... – Daniel Lichtblau Nov 17 '18 at 22:53
• By the way, it is Eigensystem that I had in mind, not Eigenvalues alone. – Daniel Lichtblau Nov 18 '18 at 14:16