1
$\begingroup$

Let's say I have a matrix $H$ represented in some basis, $a$, and I'd like to transform this to be represented in a different basis, $b$. The only difference between the bases is that $b$ is a basis of eigenvectors of a reflection operator, $\hat{\sigma}$. So in theory, what I want to do is find the eigenvectors of $\hat{\sigma}$, but them into a matrix that I'll call $U$, and then compute $H_b = U^\dagger H U$. My problem is that the basis $a$ is ordered according to an order I want to preserve, but Mathematica by default sorts the eigenvectors of $\hat{\sigma}$ by the eigenvalues (which are all either +1 or -1 since this is a reflection operator). How can I keep the ordering of the eigenvectors locked to the original basis so I can indeed use this as a basis transformation without mixing up the subblocks of my existing matrix?

Here's a code example of what I want:

Ha = {{298.1, -0.7, 0., 0., 0., 0., 0., 0.}, {-0.7, 296.8, 0., 0., 0., 0., 0., 0.}, {0., 0., 298.1, -0.7, 0., 0., 0., 0.}, {0., 0., -0.7, 296.8, 0., 0., 0., 0.}, {0., 0., 0., 0., 298.1, -0.7, 0., 0.}, {0., 0., 0., 0., -0.7, 296.8, 0., 0.}, {0., 0., 0., 0., 0., 0., 298.1, -0.7}, {0., 0., 0., 0., 0., 0., -0.7, 296.8}};

Note that Ha is blocked in 4 2x2 blocks. When I change bases, I expect this to become blocked in 2 4x4 blocks.

Now, my operator $\hat{\sigma}$ can be represented as:

sigma={{0, 0, 0, 1., 0, 0, 0, 0}, {0, 0, 1., 0, 0, 0, 0, 0}, {0, 1., 0, 0, 0, 0, 0, 0}, {1., 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 1.}, {0, 0, 0, 0, 0, 0, 1., 0}, {0, 0, 0, 0, 0, 1., 0, 0}, {0, 0, 0, 0, 1., 0, 0, 0}};

But then when I call Transpose[Eigenvectors[sigma]].Ha.Eigenvectors[sigma], I get a matrix that is horribly off-diagonal, which is just showing that the eigenvectors of sigma are not sorted properly. So, how do I keep everything sorted correctly?

EDITED TO ADD: The example above is just a simple example with numerics for you to play with. In my real case, the matrix dimensions and values with vary with different simulation cases. I would like a programatic way to do this sorting.

$\endgroup$
3
  • $\begingroup$ I do not understand what is meant by b being a matrix of eigenvectors of a reflection matrix,and at the same time being related to the basis in which the matrix H is expressed. If what you want to do is negate certain basis vectors, negate corresponding columns of the matrhix H. $\endgroup$ Commented Dec 23, 2020 at 18:32
  • $\begingroup$ The point is that the matrix H and the matrix sigma can have simultaneous eigenvectors. I'm trying to go from a basis in which you make use of that fact to one in which you don't make use of the fact. I don't know where you got the idea of negating certain columns? $\endgroup$ Commented Dec 23, 2020 at 21:39
  • $\begingroup$ Still unclear to me but maybe the two argument eigendecomposition will help. $\endgroup$ Commented Dec 24, 2020 at 2:55

1 Answer 1

1
$\begingroup$

By inspection of the eigenvectors you get the following ordering:

u = ev[[{1, 3, 5, 6, 2, 4, 7, 8}]];
Transpose[u].Ha.u // Chop // MatrixForm

enter image description here

$\endgroup$
2
  • $\begingroup$ My code was a minimal working example. Is there a way to do this in general, without needing to comb through the eigenvectors? $\endgroup$ Commented Dec 23, 2020 at 19:12
  • $\begingroup$ In a more general case, first, you would have to analyze which are the invariant subspaces of the matrix Ha. Then you need to sort the eigenvectors of sigma according to which subspace they belong. $\endgroup$ Commented Dec 24, 2020 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.