One of the most effective methods for solving the matrix equation

is the Bartels-Stewart algorithm. Key to this technique is the orthogonal reduction of

and

to triangular form using the

algorithm for eigenvalues. A new method is proposed which differs from the Bartels-Stewart algorithm in that

is only reduced to Hessenberg form. The resulting algorithm is between 30 and 70 percent faster depending upon the dimensions of the matrices

and

. The stability of the new method is demonstrated through a roundoff error analysis and supported by numerical tests. Finally, it is shown how the techniques described can be applied and generalized to other matrix equation problems.