Stability of a finite-difference method for solving matrix equations.