The question I am trying to solve is: how to find the critical points of a matrix equation
$$X^{2}-BX-C=0?$$
And then if I follow the method of http://www2.math.umd.edu/~jmr/241/crits.html, first I should find the Jacobian, and there is where i find a doubt: How is it the differentiation of a matrix with respect to a matrix, I mean: I have a function depending on $X$,
$$f(X)=X^{2}-BX-C,$$
where $X$ is the variable and is a square matrix; $B$, $C$ are constant square matrices.
How should be the Jacobian? Is that correct to find the critical points in that way for matrix equation?.