Prerequisites: inner products and orthogonal projection and adjoints and special operators.
A matrix can represent an operator, but it can also be a vector in a vector space of matrices. This second viewpoint lets us ask for the closest symmetric matrix to a given matrix. The answer comes from an orthogonal decomposition, not from changing the eigenvalues of the original operator. We first work over , then explain the different scalar convention needed for Hermitian matrices.
The Frobenius inner product
Definition 3.5.1
(Frobenius inner product and norm)
On define
For complex matrices use the first-linear convention .
The trace is defined because is . Expanding its diagonal entries gives the sum, making bilinearity and symmetry immediate. Moreover , with equality exactly when every entry is zero. Thus this is an inner product, with norm . It measures all entries of a matrix, not the largest amount by which the matrix stretches a unit vector.
For complex matrices the conjugation is essential: could be zero for a nonzero complex matrix. The norm is . Whether a linear map on a matrix space is self-adjoint is a separate question from whether an individual matrix is Hermitian.
Common mistake
(The Frobenius norm is not the stretching factor)
For the identity every unit vector is left at length one, so the largest stretching factor is , yet . The Frobenius norm adds up the squares of all the entries; it equals the operator norm only for special matrices, such as a matrix with a single nonzero entry.
Symmetric and skew-symmetric parts
For any real square matrix , set
Then , and . This decomposition is unique: a matrix that is both symmetric and skew-symmetric satisfies , hence over .
Theorem 3.5.2
(Nearest symmetric matrix)
Let be a real square matrix, and . Then is the unique symmetric matrix nearest to in Frobenius norm, and the distance is .
Proof
(Orthogonality of the two parts, then Pythagoras)
The two subspaces are perpendicular for the Frobenius inner product. Indeed, if and , then
The last step uses . Hence the inner product is zero. For any symmetric matrix , is an orthogonal sum, so
The first term is nonnegative and vanishes only for . Thus is the unique nearest symmetric matrix to in Frobenius norm; the distance is .
Proof X-ray
What carries the minimization over all symmetric matrices
The proof does not search over symmetric matrices; it splits the error once and for all. Two ingredients matter. First, is symmetric for every symmetric , because symmetric matrices form a subspace; that is why the cross term between and vanishes for all at once. Second, the vanishing itself comes from a single trace identity: equals its own negative, using only transposition and the cyclic property of the trace.
Positive definiteness of the inner product then turns "the first term is nonnegative" into uniqueness: forces . The minimum is therefore established over the whole symmetric subspace, not just over a few examples. The role of the field is hidden in " implies ": over a field of characteristic two the same decomposition would not exist.
Complex matrices require a real subspace
Every can similarly be written
where and . However, the Hermitian matrices do not form a complex vector subspace: is Hermitian but is not. They do form a real subspace of , viewed as a real vector space with inner product
This is positive definite because . Hermitian and skew-Hermitian are perpendicular for this real inner product: is purely imaginary, since its complex conjugate is . Consequently the same Pythagorean argument makes the unique closest Hermitian matrix in Frobenius norm. It does not assert that the full complex inner product between the two parts is zero.
Counterexample mode
Hermitian matrices are not a complex subspace, and the complex product does not vanish
Claim: the Hermitian matrices form a complex subspace, so the complex Frobenius inner product of and is zero. Take and , which is Hermitian. Then has , so a complex multiple of a Hermitian matrix is not Hermitian. The skew-Hermitian matrix has . Only its real part vanishes: . Repair: use the real inner product on the real subspace of Hermitian matrices.
Worked examples
Worked example 3.5.3
(Nearest symmetric matrix of a matrix)
If , then
The nearest symmetric matrix is and its distance from is . Taking the upper triangle and copying it to the lower triangle would produce , a symmetric matrix but not the nearest one: has . The average is forced by the orthogonal decomposition.
Worked example 3.5.4
(A triangular matrix)
Let . Then and , so the distance to the symmetric matrices is . Check by Pythagoras for : has and .
Worked example 3.5.5
(Nearest Hermitian matrix)
Let , so . Then and , with . The unique nearest Hermitian matrix is , at Frobenius distance . The diagonal of is already real and is untouched; the off-diagonal entries and are replaced by the conjugate pair and .
Quick checks
Quick check
(Compute for and .)
Solution · Answer
Add the products of corresponding entries: .
Quick check
(Find the nearest symmetric matrix to and its distance from .)
Solution · Answer
and , so the distance is .
Quick check
(For , what are the dimensions of the symmetric and the skew-symmetric real matrices, and why do they add up to ?)
Solution · Answer
A symmetric matrix is determined by its six entries on and above the diagonal, so the dimension is ; a skew-symmetric matrix has zero diagonal and is determined by three entries above it, so the dimension is . Since by the unique decomposition , the dimensions add up: .