# How to find a matrix closest to a given matrix in a Inner product space?

Consider $$M_2(\mathbb{C})$$ with the inner product $$\langle A, B \rangle = trace(B^*A)$$ where $$*$$ is conjugate transpose. Find the closest element of the complex symmetric $$2\times 2$$ matrices to $$A = \begin{bmatrix}1&-i\\ i&1\end{bmatrix}$$How to approach this problem?

## 1 Answer

1. Pick a basis $$(e_1,e_2,e_3)$$ of the space of all $$2\times2$$ matrices.
2. Use Gram-Schmidt to create from it an orthnormal basis $$(f_1,f_2,f_3)$$.
3. The answer to your problem will be $$\langle A,f_1\rangle f_1+\langle A,f_2\rangle f_2+\langle A,f_3\rangle f_3$$