Let $D\in\mathbb{R}^{n\times n}$ be a diagonal positive definite matrix s.t. $D\leq I$ ($I$ denotes the $n$-dim. identity matrix) and let $\alpha$ be a strictly positive real number. Consider the optimization problem over the set of positive semidefinite matrices with trace less or equal than one
$$
\max\_{A\in\mathbb{R}^{n\times n}\,:\,A\geq 0,\, \mathrm{tr}(A)\leq 1}\frac{\det(A+\alpha I)}{\det(AD + \alpha I)}.
$$



> 
> **My question:** Is the optimal matrix
>  $$
> A^\star:=\arg\max\_{A\in\mathbb{R}^{n\times n}\,:\, A\geq 0,\,\mathrm{tr}(A)\leq 1}\frac{\det(A+\alpha I)}{\det(AD + \alpha I)}
> $$
>  diagonal?
> 
> 
> 



Maximizing a ratio of determinants
Yes, of course (provided that you mean that the maximum is attained on a diagonal matrix, not that *every* matrix on which it is attained is diagonal). 


First notice that it is a bit more convenient to have the denominator in the form $\det(A+Q)$ where $Q$ is $\alpha D^{-1}$. Now $A=R^\*BR$ where $B$ is diagonal and $R$ is orthogonal. Notice that the numerator does not depend on $R$ or on the order of the diagonal elements in $B$. Using just all permutations $R$, we see that WLOG we may assume that the diagonal elements of $B$ and $Q$ are arranged in the same order. So, WLOG, $B\_{11}\ge B\_{22}\ge\dots$ and the same for $Q$. We want to show that in this case $\det(R^\*BR+Q)$ over all orthogonal $R$ is minimized at $R=I$. Recall that for a positive definite $X$, $(\det X)^{\frac 1n}=\frac 1n\inf \operatorname{Tr}YX$ where $Y$ runs over all positive definite matrices of determinant $1$. Now fix the eigenvalues of $Y$ (say $y\_1\le y\_2\le\dots\le y\_n$) (note that I arranged them in the opposite order comparing to the order of $B\_{ii}$ and $Q\_{ii}$.
Note also that $\operatorname{Tr}YR^\*BR=\operatorname{Tr}RYR^\*B$ and $RYR^\*$ has the same eigenvalues as $Y$. At last, note that if $Y=\operatorname{diag }(y\_1,\dots,y\_n)$ and $R=I$, then $\operatorname{Tr}RYR^\*B=\sum\_i y\_iB\_{ii}$ and similarly for $Q$. Thus it will suffice to show that if $Y$ and $X$ are positive semi-definite with the eigenvalues $y\_1\le y\_2\le\dots\le y\_n$ and $x\_1\ge x\_2\ge\dots\ge x\_n$, then $\operatorname{Tr}YX\ge\sum\_i x\_iy\_i$. 


That, without any doubt, can be found in textbooks, but let me provide a proof just in case. Using the spectral decomposition $X=x\_nP\_n+(x\_{n-1}-x\_{n})P\_{n-1}+\dots+(x\_1-x\_2)P\_1$, we see that it is enough to prove the desired inequality for the case when $X$ is an orthogonal projection to a $k$-dimensional space. Let $e\_i$ be the eigenvector of $Y$ corresponding to the eigenvalue $y\_i$. There is a unit vector $u\_k$ in $H$ orthogonal to $e\_1,\dots,e\_{k-1}$. Then $\langle YPu\_k,u\_k\rangle\ge y\_k$. Next, there exists a unit vector $u\_{k-1}\in H$ orthogonal to $e\_1,\dots,e\_{k-2};u\_k$. Thus, $\langle YPu\_{k-1},u\_{k-1}\rangle\ge y\_{k-1}$, and so on. This gives an orthonormal basis $u\_1,\dots,u\_k$ in $H$ with $\sum\_{i=1}^k\langle YPu\_i,u\_i\rangle\ge \sum\_{i=1}^k y\_i$. Complementing it by an orthonormal basis of $H^\perp$ (which will be killed by $P$ anyway), we see that the LHS equals $\operatorname{Tr}YP$ and we are done.


