[Math] Transform complex vector/matrix into a real vector/matrix

linear algebra

Say I have a complex vector $\mathbf{v}$ (and $\mathbf{v} \neq \mathbf{v}^*$).

I want to perform a unitary transformation to make this vector real.

Assuming a solution exists, how may I find a unitary matrix $\mathbf{U}$ that transforms

$\mathbf{Uv} = \mathbf{v'}$ so that $\mathbf{v'} = \mathbf{v'^*}$

EDIT:

Thanks for the answers thus far. I'm curious now, how might this change if complex vector $\mathbf{v}$ was a complex matrix $\mathbf{V}$? Again, assuming a solution exists, giving $\mathbf{UV} = \mathbf{V}'$ so that $\mathbf{V}' = \mathbf{V}'^*$.

Best Answer

Let $v_i$ be the $i$-th element of $\mathbf{v}$. Set $U=\operatorname{diag}(u)$, and $u_i = \exp(-i\angle v_i)$.

Edit:

It is not possible to do the analogous thing with a matrix $\mathbf{V}$. The best you can do when applying only operations from the left is making the lower triangle of the matrix purely real. You can achieve this by using real orthogonal Householder reflectors from the left to eliminate all the imaginary parts of each column below the diagonal successively.

If you allow operations from the right as well, you can can perform the bidiagonalization procedure on the imaginary part to make the matrix real except for the diagonal and superdiagonal. You can do slightly better than this by also including some diagonal scalings (the best that I can think of is you can shift the complex bands up by 1).