The matrix equation AX−XB=C has a solution if and only if the matrices and are similar. This criterion was proved over a field by W.E. Roth (1952) and over the skew field of quaternions by Huang Liping (1996). H.K. Wimmer (1988) proved that the matrix equation X−AXB=C over a field has a solution if and only if the matrices and ecbce5cb75b3cc9df6a5a1884d"> are simultaneously equivalent to and ecbce5cb75b3cc9df6a5a1884d">. We extend these criteria to the matrix equations and over the skew field of quaternions with a fixed involutive automorphism .