1

Suppose $S = {\rm diag}(s_1, s_2, ...)$ is a diagonal matrix with unique positive entries $s_i$. I need to find a square matrix $M$ such that $D = M^T S M$ is a diagonal matrix with identical entries, i.e. $D = d I$. There is an additional requirement that the columns of $M$ must be unit vectors. How do I find such a matrix $M$ and the corresponding value $d$ in the general case?

For $n=2$, I can find the solution as \begin{align} M = \begin{bmatrix} \sqrt{\frac{s_2}{s_1 + s_2}} & \sqrt{\frac{s_2}{s_1 + s_2}} \\ \sqrt{\frac{s_1}{s_1 + s_2}} & -\sqrt{\frac{s_1}{s_1 + s_2}} \end{bmatrix} \end{align} and the corresponding constant $d$ is \begin{align} d = \frac{2 s_1 s_2}{s_1 + s_2}. \end{align} Notice that the columns of $M$ are not perpendicular because $s_1 \ne s_2$.

In the general $n$-dimensional case, there are $n(n+1)/2$ constraints from the condition $D = M^T S M$ (due to symmetry). The number of unknowns is $n(n-1) + 1$ since $n-1$ parameters are needed to specify a unit vector in $n$ dimensions. And "+1" is for the unknown diagonal value $d$.

When $n=2$ (the case above), we have $n(n+1)/2 = 3$ and $n(n-1) + 1 = 3$. So the found solution is unique, except for sign flips. For $n>2$, the number of unknowns is greater than the number of constraints, so I expect a family of solutions will be available. Is it possible to find the form that this family of solutions must follow?

1 Answers1

1

If $M^TSM=dI$, then $S^{1/2}M=d^{1/2}Q$ for some orthogonal matrix $Q$. Therefore $M=d^{1/2}S^{-1/2}Q$. In order that each column of $M$ is a unit vector, $M^TM=dQ^TS^{-1}Q$ must have a diagonal of ones. Hence we must have $d\operatorname{tr}(S^{-1})=n$ where $S$ is $n\times n$. That is, $d=\frac{n}{\operatorname{tr}(S^{-1})}$.

Let $Z$ be the traceless matrix $\frac{nS^{-1}}{\operatorname{tr}(S^{-1})}-I_n$. The problem now boils down to finding an orthogonal matrix $Q$ such that $Q^TZQ$ has a zero diagonal.

If the underlying field is complex and we want to find $M$ and $Q$ such that $Q^\ast ZQ$ has a zero diagonal and $M^\ast SM=dI$, we may simply take $Q$ as the DFT matrix regardless of the value of $Z$. Over the real field, however, $Q$ in general depends on $Z$ and I am not aware of any explicit formula for $Q$ when $n\ge3$. Yet, a feasible $Q$ can always be obtained by iteratively conjugating $Z$ with Givens rotations. This has been discussed in another answer of mine. The iterations will end in at most $n$ steps.

user1551
  • 149,263
  • Thanks very much! Having an exact answer for $d$ in arbitrary dimensions is already very useful. I will try to work out the iterative procedure for constructing the $Q$-matrix based on your reference. Thanks again. – tormentedSoul Apr 16 '25 at 10:01
  • Hi! I'm writing a manuscript now where I'll be using ideas from your response. I'll be more than happy to acknowledge you at the end of the paper. If you do not mind, may I mention your real name (can be, for instance, Boris T.)? – tormentedSoul Apr 23 '25 at 15:38
  • 1
    @tourmentedSoul Thanks, but I’d like to remain anonymous. If you want, you may use my real user number (user1551) in citations. There have been a lot of discussions about ways to cite MO or MSE answers. See e.g. this meta discussion, which have links to actual citation examples, such as footnote 7 on p.12 of this paper, or [2], [15] mentioned on p.36, p.58 as well as in the references section of this thesis. – user1551 Apr 23 '25 at 16:16
  • Ok! I'll do it in one form or another. – tormentedSoul Apr 23 '25 at 16:21