TITLE: Minimize $\mbox{tr}(AX)$ where $X$ is an orthogonal matrix
QUESTION [7 upvotes]: Let $A, X\in\mathbb{R}^{n\times n}$. The scalar objective function is
$$J=\mathrm{tr}(AX)$$
If no constraints, let the derivative of $J$ with respect to $X$ be zeros, then we have
$$A=0$$
Suppose $A$ is also a complex function, from $A=0$ I can further calculate something.
My question is: what if $X$ is an orthogonal matrix, i.e., $X^TX=I$? Then it becomes an constrained optimization problem. Can I still use matrix differential techniques to derive the minimizer? Thanks.

REPLY [3 votes]: Another way to get did's answer is to use the SVD to reduce to the case of $A$ being diagonal: We have $A = USV'$, where $U$ and $V$ are orthogonal and $S$ is diagonal, and so 
$$\def\Tr{\operatorname{Tr}}\Tr(AX) = \Tr(SV'XU)\;.$$
Since $X\to V'XU$ is a bijection on the set of orthogonal matrices, 
$$\min\{\Tr(AX)\mid X\text{ orthogonal}\} = \min\{\Tr(SW)\mid W\text{ orthogonal}\}\;.$$
But $\Tr(SW) = \sum_iS_{ii}W_{ii}$, and all the $S_{ii}$ are non-negative and $-1\le W_{ii}\le1$, so that $\Tr(SW)\ge\Tr(S(-I))$, and so the minimum occurs at $W=-I$ (or $X=-VU'$) and is $-\sum_iS_{ii}$.