# How to find original matrix from eigenbasis and eigenvalues?

I'm not sure is it the right place to ask this but, I think it is better to ask here than Math Overflow. It is about how to find the matrix representation of an operator (for the CHSH test).

What are the matrices that has $$\left|\frac{\pi}{8}\right>$$ and $$\left|\frac{5 \pi}{8}\right>$$ with eigenvalues $$\{1,-1\}$$?

I can relate an operator with eigenbasis geometrically, but I do not know how to represent the operator matrix using these eigenbases and eigenvalues.

• FYI there are two stack exchange sites for mathematics. MathOverflow is dedicated to mathematics research questions whereas Mathematics is for general math questions. Commented Nov 11, 2020 at 13:29
• Generally, I'd recommend asking this on the Maths SE but it's been answered here and is at least semi-relevant, so I see no point in migrating it (unless @user13783 wants it migrated) Commented Jan 1, 2021 at 11:10

## 2 Answers

$$\left|\frac{\pi}{8}\right\rangle\left\langle\frac{\pi}{8}\right|-\left|\frac{5\pi}{8}\right\rangle\left\langle\frac{5\pi}{8}\right|$$

Any normal matrix $$A$$ with eigenvalues $$\lambda_i$$ and respective eigenvectors $$|u_i\rangle$$ can be writen as $$A = \sum_{i=1}^{n} \lambda_i |u_i\rangle\langle u_i|.$$ This is called spectral decomposition.

Note that a matrix is normal if $$AA^\dagger=A^\dagger A$$ holds. Hermitian and unitary matrices are special cases of normal ones.

• Sorry, this is not correct. A normal matrix is unitarily diagonalisable. General diagonalisable matrices are of the form $A=MDM^{-1}$ where $M$ is invertible but can be non-unitary. In other words: it can be diagonal in a non-orthonormal basis. The spectral decomposition also only holds for normal matrices (general diagonalisable matrices are not of that form). Commented Nov 13, 2020 at 13:40
• @MarkusHeinrich: Thank you for the comment, you are right. Just edited the answer. Commented Nov 14, 2020 at 7:28