Having a scalar function of two matrices; say A,B are matrices
f : (A,B) $\in \mathcal{R}^{nxp}x\mathcal{R}^{m,n}$ $\rightarrow$ f(A,B) $\in \mathcal{R}$.
I calculated the gradients with respect to each matrix i.e. $\nabla_Af(A,B) \in \mathcal{R}^{nxp}$ and $\nabla_Bf(A,B) \in \mathcal{R}^{m,n}$. but, now, how to deduce the expression of the gradient $\nabla f(A,B)$ and what are its dimensions ?
$\nabla_{A,B}(f)=(\nabla_A(f),\nabla_B(f))$ because $f(A+H,B+K)=f(A,B)+<\nabla_A(f)(A,B),H>+<\nabla_B(f)(A,B),K>$ (the inner product in a product of $2$ sets).