Maximum value of frobenious norm of probuct of three matrices. Given ${\bf A} \in \mathbb{C}^{K \times R}$, ${\bf C} \in \mathbb{C}^{R \times M}$. Suppose ${\bf B} \in \mathbb{C}^{R \times R}$ is a diagonal matrix such that each element of ${\bf B}$ is a unit modulus, i.e., ${[|{\bf B}|]_{i,i} = 1}$ or ${\bf B} = diag([e^{j\theta_1}, \cdots, e^{j\theta_R}])$:
I am looking for ${\bf B}$ such that $\max_{{\bf B}} ||{\bf A B C}||^2_F$ s.t. ${[|{\bf B}|]_{i,i} = 1}$ or ${\bf B} = diag([e^{j\theta_1}, \cdots, e^{j\theta_R}])$.
Can anyone kindly suggest how to proceed with it.
 A: I suspect that in general, no manageable closed form will exist.
That being said, here is a thorough approach to the case of $R = 2$.  Let $a_1,a_2$ denote the columns of $A$ and $c_1,c_2$ the rows of $\overline C$. Without loss of generality, take $\theta_1 = 0$ and $\theta_2 = \theta$. We then have
$$
ABC = \pmatrix{a_1 & a_2} \pmatrix{1&0\\0&e^{i\theta}}\pmatrix{c_1^*\\c_2^*} = a_1c_1^* + e^{i\theta}a_2c_2^*.
$$
Thus, we have
$$
\|ABC\|_F = \operatorname{tr}[(a_1c_1^* + e^{i\theta}a_2c_2^*)^*(a_1c_1^* + e^{i\theta}a_2c_2^*)]
\\ = |a_1|^2 \cdot |c_1|^2 + |a_2|^2 |c_2|^2  + 2\operatorname{Re}[e^{i\theta} (a_1^*a_2)(c_2^*c_1)].
$$
This is maximized when $\theta = -\operatorname{Arg}[(a_1^*a_2)(c_2^*c_1)] = -\operatorname{Arg}[(A^*A)_{1,2} \cdot (CC^*)_{2,1}]$.
A: I would like to point out that you can actually calculate the gradient using matrix calculus. Assume that we have the singular value decompositions $A = U_A D_A V_A^H$ and $C = U_C D_C V_C^H$. First note that $\Vert ABC \Vert_F^2 = \Vert D_A V_A^H B U_C D_C \Vert_F^2$. Further we have $\Vert M \Vert_F^2 = \operatorname{tr}(M^H M) = \operatorname{tr}(M M^H)$. So using some properties of the trace we see that
$$\Vert ABC \Vert_F^2 = \operatorname{tr}(\vert D_C \vert^2 U_C^H B V_A^H \vert D_A \vert^2 V_A B^H U_C) = \operatorname{tr}(U_1 B U_2 B U_3)$$
for appropriately defined $U_1$, $U_2$ and $U_3$. Now using matrix calculus, we see that
$$g(B) = \nabla_B \operatorname{tr}(U_1 B U_2 B U_3) = (U_1^H U_3^H + U_3^H U_1^H)B U_2,$$
where we just used some rules from the Wikipedia page about matrix calculus. This you could already use for a gradient based optimization scheme, by randomly initializing the diagonal of $B$ and then to use projected gradient as
$$B_{k+1} = \operatorname{proj}(B_k + \alpha \cdot g(B_k)),$$
where the projection is used to renormalize the amplidudes of $B$.
With some more work, you can even try to solve 
$$g(B) = 0,$$
but as of right now, I have no smart way of doing that.
