# Why SVD cannot recover the original matrix and suffer from numerical instability? [closed]

I have a matrix in mathematica that looks like

$$m= \left( \begin{array}{cccc} -i & 0 & 1 & 0 \\ 0 & -i & 0 & -1 \\ 1 & 0 & -i & 0 \\ 0 & -1 & 0 & -1. i \\ \end{array} \right)$$

Note the last element I explicitly use a numerical value of $$i$$. Now if I use SVD without dropping singular values, I should be able to recover the original matrix:

{U, W, V} = SingularValueDecomposition[m]
U.W.Transpose[V]


The result however is $$\left( \begin{array}{cccc} 0.\, +1. i & 0 & 1. & 0 \\ 0 & 0.\, -1. i & 0 & 1. \\ -1. & 0 & 0.\, -1. i & 0 \\ 0 & -0.6+0.8 i & 0 & 0.8\, +0.6 i \\ \end{array} \right)$$

If I replace the $$1.i$$ with the accurate symbol of $$i$$ there is no problem with recovering the matrix.

What is the reason behind it? Observation shows the matrix $$m$$ has a non-zero determinant and a close-to-one condition number. I would like to know the properties of such matrix that has issue.

## closed as off-topic by Henrik Schumacher, Daniel Lichtblau, Michael E2, m_goldberg, b.gatessucksJan 11 at 8:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Henrik Schumacher, Daniel Lichtblau, Michael E2, m_goldberg, b.gatessucks
If this question can be reworded to fit the rules in the help center, please edit the question.

• (1) Best to post full code. (2) Also should check the documentation-- there is no actual issue here. – Daniel Lichtblau Jan 10 at 22:34

## 1 Answer

The reason is that you have to use ConjugateTranspose instead of Transpose:

m = {
{-I, 0, 1, 0},
{0, -I, 0, -1},
{1, 0, -I, 0},
{0, -1, 0, -1. I}
};
{U, W, V} = SingularValueDecomposition[m];
Max[Abs[U.W.ConjugateTranspose[V] - m]]


4.74287*10^-16

• Thanks a lot! I was fooled by the numerical accuracy stuff and did not think about the complex values. – Peter Zhang Jan 10 at 22:52