Say I have a matrix variable, $X$, and an objective function $f(X)$, which I am minimizing (or maximizing; for this question it doesn't make a difference).
I take the (partial) derivative with respect to one of the matrix elements, say, $X_{i,j}$ and set such derivative equal to 0. Then I solve for $X_{i,j}$ and find that it depends on other elements of the matrix (e.g. $X_{i,j-1}$, $X_{i,j+1}$, and/or others).
Does this mean that there is no analytical solution to the optimization problem, when optimizing with respect to the entire matrix $X$ (since to explicitly determine $X_{i,j}$, you must already know the values of other matrix elements, which themselves might depend on $X_{i,j}$)?
No, of course it doesn't mean that. You want to take the partial derivatives with respect to each $X_{ij}$ and solve the resulting system for all $X_{ij}$.