Is there a nice representation for KKT conditions for matrix constraints? I have a convex programming problem:
 $\min \left\lVert J - R \right\rVert _F$
$J,R$ are matrices. $J$ is given for the problem. 
One of the constraints is:
$R = KQ$
Here, $R,K,Q$ are matrices. $K$ is given. $Q$ is a variable along with $R$.
I understand that the above constraint is basically a bunch of scalar constraints in matrix form. 
In the lagrangian, the gradient of each of the matrix element will be a matrix itself. So it becomes a matrix of matrix in the lagrangian. 
Is there a nice way to express the KKT conditions of this problem? Wikipedia doesn't give any matrix-by-matrix differentiating expressions. 
 A: Since $R=KQ$, you can focus on solving for $Q$. So your problem looks like 
\begin{align}
\min_{Q}||J-KQ||_F^2
\end{align}
(squaring of the objective won't change the solution, convince yourself). Now, we have $$vec(J-KQ)=vec(J)-(I\otimes K)vec(Q)$$
where $vec(.)$ operator stacks up the columns of argument matrix and $\otimes$ is the kronecker product. Again
$$||J-KQ||_F^2=||Ax-b||_2^2$$ where I define $A=I\otimes K$ and $b=vec(J)$ and $x=vec(Q)$. Thus 
\begin{align}
\min_{Q}||J-KQ||_F^2
 \,\,\,\,\,\equiv\,\,\,\,\,\min_{x}||Ax-b||_2^2
\end{align}
Now try solving the last problem which is related to the solution of a linear system of equations and least squares. 
EDIT
Expand $||Ax-b||_2^2=(Ax-b)^T(Ax-b)$. Now try to derive the KKT conditions using vector differentiation. A good place to start would be the  wiki article. If KKT conditions was your only requirement, you could have done that earlier itself. Note that $$||J-KQ||_F^2=\mbox{trace}\left\{(J-KQ)^T(J-KQ)\right\}$$. Expand the multiplication insider the trace and then use the rules of matrix differentiation. Go through the same  wiki article on how to do that. I seriously urge you put some effort into this. It will be really helpful. 
