# Redistribute diagonal entries of a matrix

Let $d = (d_1,...,d_k)^t$ with positive entries. Denote $D:=diag(d)$ and let $m > k$. What are sufficient conditions on $d$ and $m$ so that there exists $V \in \mathbb{R}^{m \times k}$ with:

1. $V$ has orthonormal columns: $V^tV = I \in \mathbb{R}^{k \times k}$, and

2. $VDV^t \in \mathbb{R}^{m \times m}$ has unit diagonal. Geometrically, The rows of $V$ lie on a hyper-ellipse given by $\vec{d}$: $$\sum_{p=1}^k V_{jp}^2 d_p = 1, j=1,...,m?$$

## A necessary condition

If such $V$ exists, we can extend it to be orthogonal in $\mathbb{R}^{m \times m}$, so denote the extended matrix $\hat{V}$. We can also extend $D$ with zeros, so denote that extended matrix $\hat{D}$. Then $VDV^t = \hat{V}\hat{D}\hat{V}^t$. Thus, it is necessary that $\sum d_i = m$, by considering traces. Is it also sufficient? This view means that we just need to redistribute the diagonal entries of a matrix using orthogonal similarity, hence the title.

## Degrees of freedom

The matrix $V$ has, a-priori, $mk$ degrees of freedom. The first condition amounts to $k(k+1)/2$ linear constraints. The second condition amounts to $m$ quadratic constraints. So if $mk - m - k(k+1)/2 > 0$ we can at least hope to find a solution.

The basic step is: a given symmetric $2\times 2$ matrix $A$ is unitarily equivalent to one with equal diagonal elements. This we can just check by direct computation. Let's say $$A=\begin{pmatrix} a & b \\ b & c \end{pmatrix}, \quad V = \begin{pmatrix} \cos\alpha & \sin\alpha \\ -\sin\alpha & \cos\alpha \end{pmatrix} .$$ Then setting the diagonal elements of $V^*AV$ equal to one another gives the equation $$(a-c)(\cos^2\alpha-\sin^2\alpha) = 4b\sin\alpha\cos\alpha ,$$ and, making use of the formulae $\cos^2\alpha-\sin^2\alpha=\cos 2\alpha$, $2\sin\alpha\cos\alpha =\sin 2\alpha$, we see that this always has a solution $\alpha$.
Now in the actual problem, I can take $\widehat{V}$'s that are the identity except for a $2\times 2$ block as above to replace any two diagonal entries by their average. If we repeat this process, we converge to a matrix of the desired form. (The part that's missing is the verification that the product of the $\widehat{V}_n$ will converge to a single unitary matrix, but I think this will follow from a more careful analysis since diagonal elements that were already close to one another will only require a $\widehat{V}_n$ that is close to the identity.)