The solution of the real matrix equation

is given in terms of the eigenvalues and eigenvectors of

, and the elements of

. The solution is valid if the A
iare symmetric or if they do not have repeated eigenvalues. The solution can be extended to handle nonsymmetric matrices with repeated eigenvalues. The solution of

is also given in closed form for the case of nonrepeated eigenvalues or symmetric A
i.