Lyapunov and Sylvester matrix equations