What is the nearest symmetric matrix to a real, nonsymmetric square matrix ? This question arises whenever a symmetric matrix is approximated by formulas that do not respect the symmetry. For example, a finite difference approximation to a Hessian matrix can be nonsymmetric even though the Hessian is symmetric. In some cases, lack of symmetry is caused by rounding errors. The natural way to symmetrize is to replace it by . Is this the best choice?
As our criterion of optimality we take that is minimized over symmetric for some suitable norm. Fan and Hoffman (1955) showed that is a solution in any unitarily invariant norm. A norm is unitarily invariant if for all unitary and . Such a norm depends only on the singular values of , and hence since and have the same singular values. The most important examples of unitarily invariant norms are the -norm and the Frobenius norm.
The proof that is optimal is simple. For any symmetric ,
Simple examples of a matrix and a nearest symmetric matrix are
Note that any can be written
where and are the symmetric part and the skew-symmetric part of , respectively, so the nearest symmetric matrix to is the symmetric part of .
For the Frobenius norm, is the unique nearest symmetric matrix, which follows from the fact that for symmetric and skew-symmetric . For the -norm, however, the nearest symmetric matrix is not unique in general. An example of non-uniqueness is
for which , and for any such that .
Entirely analogous to the above is the nearest skew-symmetric matrix problem, for which the solution is the skew-symmetric part for any unitarily invariant norm. For complex matrices, these results generalize in the obvious way: is the nearest Hermitian matrix to and is the nearest skew-Hermitian matrix to in any unitarily invariant norm.