Optimization problem involving a diagonal matrix

392 Views Asked by At

I would like to find the solution $D = \text{diag}(d_1,\dots,d_n)$ to the following minimization problem, $$ \min_D || A - B D C ||_F^2 $$ where $|| \cdot ||_F$ is the Frobenious norm, $A,B \in \mathbb{R}^{m \times n}$, and $C \in \mathbb{R}^{n \times n}$ are given matrices. My approach so far is: \begin{align} \min_D || A - B D C ||_F^2 &= \min_D || \text{vec}(A - B D C) ||^2 \\ &= \min_D || \text{vec}(A) - \text{vec}(B D C) ||^2 \\ &= \min_D || \text{vec}(A) - (C^T \otimes B) \text{vec}(D) ||^2 \end{align} This is now a standard least squares problem, except it would solve for all elements of the matrix D. Is there a clever way to enforce the constraint that $D$ is diagonal and construct a least squares problem only for the diagonal elements of $D$?