Given a set of $n\times n$ matrices $A_i$, I would like to find a linear combination of these matrices $Q = \sum_i A_i x_i$ with $x_i$ a set of complex numbers, such that $Q$ is unitary: $Q^{\dagger} Q = 1$. This problem is equivalent to solving a system of quadratic equations over real numbers. As far as I understand, there is no general and efficient way to solve such systems of equations, and black-box algorithms, such as Gröbner basis, struggle with systems of around 10 variables.


Does the particular structure of this system of equations make it easier than a generic one, and can this be utilized in order to speed up the calculation.


This problem arises in many contexts. For example, it is related to search of symmetry of a quantum Hamiltonian. Hamiltonian $H$, a finite Hermitian matrix has a symmetry if it commutes with some unitary matrix $U$ other than identity. It is very easy to construct the linear space to which $U$ should belong, it is given by the kernel of the system of linear equations $H A - A H = 0$. However the next step requires verifying whether this linear space contains unitary matrices other than identity.

Secondary question:

Given that it seems unlikely that there is an easy answer to the main question, I would also like to ask whether there are known classes of systems of quadratic equations that are quickly solvable numerically.

  • $\begingroup$ Finding $A$ such that $HA-AH=0$ is a much easier problem - is there better motivation? $\endgroup$ Oct 18, 2011 at 14:29
  • $\begingroup$ The motivation is to find a symmetry of Hamiltonian. Finding the linear space is the first step to solve the problem, the missing step is to find unitary operators belonging to this space. By itself finding kernel of $HA-AH$ is not as valuable. $\endgroup$ Oct 18, 2011 at 14:37
  • 2
    $\begingroup$ You can solve $HA - AH = 0$ in the subspace of skew-hermitian matrices, and this determines the Lie algebra of the group of unitary symmetries of $H$. Exponentiating the Lie algebra gives you the connected component of the group you are after. Of course, $H$ may only have discrete unitary symmetries, in which case this does not help and I suppose you will have to solve the quadratic problem. $\endgroup$ Oct 18, 2011 at 14:43
  • 1
    $\begingroup$ Is it not true that the unitary matrices that commute with a hermitian matrix H are just the direct sum of unitary matrices on each eigenspace? $\endgroup$ Oct 18, 2011 at 14:46
  • 1
    $\begingroup$ A silly question: is a solution always guaranteed? For example, suppose you have just one matrix $A_1$. You cannot just scale it to make it unitary....so why should I expect your system to have a solution for a given set of matrices? $\endgroup$
    – Suvrit
    Oct 18, 2011 at 18:34

1 Answer 1


Every Hermitian matrix (in fact, every normal matrix) commutes with infinitely many unitary matrices:

Lemma: The square matrices A and B commute if they can be simultaneously diagonalized.

Proof: Let A=Q D inv(Q) and B=Q E inv(Q), where D and E are diagonal. Then AB = Q D E inv(Q) = Q E D inv(Q) = B A, since diagonal matrices commute.

Corollary: If H is diagonalized by the unitary matrix Q, then U = Q D Q' is unitary for any diagonal matrix D whose entries lie on the unit circle, and U commutes with H.

Thus, once you have the eigenvectors of your (discretized) Hamiltonian, you can easily form an infinite number of unitary matrices that commute with it.

Is there a constraint on the symmetrices that I'm missing?


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .