# Orthogonal Projection of a Matrix onto the Set of Symmetric Matrices

The problem is given by:

$$\arg \min_{X \in \mathcal{S}^{n}} \frac{1}{2} {\left\| X - A \right\|}_{F}^{2}$$

Where $\mathcal{S}^{n}$ is the set of Symmetric Matrices of size $n \times n$ and ${\left\| \cdot \right\|}_{F}$ is the Frobenius Norm.

So, I know the answer to this problem, but I want to know what I'm wrong.

$$X = \frac{A + A^T}{2} + \frac{A -A^T}{2} = S + K$$

where $S$ is a symmetric matrix, and $K$ is a skew-symmetric matrix. What I am interested is what the projector onto $S$ looks like.

I believe the $P_S = S(S^TS)^{-1}S^T$, but since $S$ is symmetric $S=S^T$, so $P_S=I$, this is incorrect though because apparently $P_S (A) =\frac{A + A^T}{2}$, which if my projector was correct then $P_S(A)=IA = A$

I did something incorrect here. I'm not sure what $P_S$ should project a matrix into the subspace $S$, which is symmetric matrices. Some insight would be helpful.

• Your $P_S$ is not correct. In particular because $S^TS$ doesn't need to have inverse. But, as you know, $P_S(A)=\frac{A+A^T}{2}.$ – mfl Jul 30 '16 at 21:45
• $$P(A) = \frac{A+A^T} 2 = S$$ In this formula, $S$ depends on $A$, If you're looking for one matrix $P$ such that for all square matrices $A$ you have $PA = \dfrac{A+A^T}2$, then $P$ does not depend on $A$, so it makes no sense to make $P$ depend on $S$. I believe there is a set of matrices $M_i$ for $i=1$ to $n^2$ such that for all $n\times n$ matrices $A$, you have $$\frac{A+A^T} 2 = \sum_i M_i A M_i^T.$$ – Michael Hardy Jul 30 '16 at 22:10

## 2 Answers

The projector is just $P(A)=\frac{A+A^T}{2}$. Note that if $A$ is already symmetric, then $P(A)=A$.

One issue with your formula is that there's no reason for $S^TS$ to be invertible.

• Can you share the structure of $P_S$? I agree with you actually now, since $S^TS$ is positive semi definite, thus there could be zero eigenvalues and thus be not invertible. – Vogtster Jul 30 '16 at 21:50
• What do you mean by the structure of $P_S$? – carmichael561 Jul 30 '16 at 21:51
• What is the matrix form of $P_S$ I mean to say. – Vogtster Jul 30 '16 at 21:53
• Well that depends on your choice of basis for the $n\times n$ matrices. I think the best description of the projector is just $P(A)=\frac{A+A^T}{2}$. – carmichael561 Jul 30 '16 at 22:00
• Alright, thank you so much for the insight on this. – Vogtster Jul 30 '16 at 22:02

$$P(A) = \frac{A+A^T} 2 = S$$ In this formula, $S$ depends on $A$, If you're looking for one matrix $M$ such that for all square matrices $A$ you have $MA = \dfrac{A+A^T}2$, then $M$ does not depend on $A$, so it makes no sense to make $M$ depend on $S$.

Let $M_{i,j}$ be the $n\times n$ matrix with a $1$ in position $i,j$ and $0$s everywhere else. Then $$A^T = \sum_{i=1}^n \sum_{j=1}^n M_{ij} A M_{ji}.$$ So $$\frac{A+A^T} 2 = \frac A 2 + \frac 1 2 \sum_{i=1}^n \sum_{j=1}^n M_{ij} A M_{ji}.$$ That is a sort of "matrix form" of this transformation.