# Gradient Descent for matrix, MSE

Suppose I'm given some bunch(say M) of matrices pairs (X,Y) where each is a square (n,n) matrix . I wonder if gradient descent algorithm can be applicable to minimize following MSE: $$\sum_{i=1}^{M}(Y_i - C\dot X_i)^2$$, namely find such C that minimize MSE above? I saw this question, but I want to understand if it is conceptually possible for matrices and especially in my setting above, where I need to find some specific matrix C? Put it simple: suppose that I want to use linear regression framework, but instead of scalar outcome I have matrix outcome? Does it have sense or this is complete nonsense?

Thanks in advance.

• The question makes sense. Setting the gradient of the MSE to zero leads to $$C = \left(\sum_{k=1}^M Y_k X_k^T\right) \left(\sum_{j=1}^M X_j X_j^T\right)^{\bf +}$$
– greg
Aug 6 at 1:33
• @greg: Thank you very much, + means inverse? Aug 6 at 12:25
• The system may be under/over-determined, so $M^+$ is the pseudoinverse of $M.\;$
– greg
Aug 6 at 15:02