I’m not getting a diagonal matrix when I use spectral decomposition on this matrix

diagonalizationlinear algebramatricesspectral-theory

There is a theorem in my notes on spectral decomposition that goes as follows

Spectral decomposition of an operator
Assume that the eigenvectors of $\hat{A}$ define a basis $B=\{|\phi_j>\},$then $A_{kj}=<\phi_k|\hat{ A}|\phi_j>= α_jδ_{kj}$. Operator in this basis is a diagonal matrix with eigenvalues on the diagonal

$ \hat{A} = \sum_{kj} A_{kj} |\phi_k><\phi_j| $

So take the example $\hat{A}= \begin {pmatrix} 3 &2\\2 &3 \end{pmatrix}$

It has eigenvalues $\lambda_1=1, \lambda_2=5$ which have eigenvetors $|\phi_1>= \begin{pmatrix} 1 \\-1 \end{pmatrix}$ and $|\phi_2>= \begin{pmatrix} 1 \\1 \end{pmatrix}$ respectively.

Edit: following up on bungos comment

$|\phi_1>, |\phi_2>$ are not normalised the normalised versions are $|\phi_1'>=\begin {pmatrix} 1/\sqrt{2} \\-1/\sqrt{2} \end {pmatrix}, |\phi_2'>=\begin {pmatrix} 1/\sqrt{2} \\1/\sqrt{2} \end {pmatrix}$ respectively. So…

$<\phi_1'|\hat{A}|\phi_1'>=1=A_{11}$

$<\phi_2'|\hat{A}|\phi_2'>=5=A_{22}$

$|\phi_1'><\phi_1'|=\begin {pmatrix} 1/2 & -1/2 \\-1/2 &1/2 \end{pmatrix}$

$|\phi_2'><\phi_2'|=\begin {pmatrix} 1/2 &1/2\\1/2 &1/2 \end{pmatrix}$

So by my calculations : $\hat{A} = A_{11} |\phi_1'><\phi_1'| +A_{22} |\phi_2'><\phi_2'|=1$$\begin {pmatrix} 1/2 & -1/2\\-1/2 &1/2 \end{pmatrix}$$+5\begin {pmatrix} 1/2 & 1/2\\ 1/2 &1/2 \end{pmatrix}$=$\begin {pmatrix} 3 &2\\2 &3 \end{pmatrix}$

I think that the theorem is written incorrectly , above I have followed all the steps but of course I have not gotten a diagonal matrix at the end because that would imply 2=0 which is nonsense.

So when we do the calculation by this methos we don't see any diagonal matrices

Am I correct in my understanding of the above ?

(Note:There is another equivalent method where $A=CSC^T$, where C is a matrix with unit e-vectors as columns , and S is a diagonal matrix with e-values as entries.)

Best Answer

It would’ve be good if you had quoted the theorem verbatim from your source because I think that you might be misreading it and seem to be missing some important details from its statement. The theorem makes two separate but related claims. For a diagonalizable operator:

  1. Expressed in a basis of eigenvectors, the matrix of the operator is diagonal.
  2. Given an orthonormal basis of eigenvectors, the operator can be decomposed into a linear combination of projectors onto the spans of the individual eigenvectors. This is the content of the identity $\hat A = \sum_{k,j} A_{kj}\,\lvert\varphi_k\rangle \langle\varphi_j\rvert$.

In order to understand these claims correctly it’s important to distinguish between a vector $\lvert v\rangle$ and its coordinate representation relative to some basis $\mathcal B$, which I’ll denote $[v]_{\mathcal B}\in\mathbb C^n$. This distinction can be easy to forget about when the vector itself is an element of $\mathbb C^n$. Similarly, one must distinguish between the operator $\hat A$ and its matrix representation $[\hat A]_{\mathcal B'}^{\mathcal B}$.

Claim #2 above is a statement about an operator and its eigenvectors. It is true independent of the basis in which you choose to represent these vectors and operator. Note that this representation basis isn’t necessarily the orthonormal eigenbasis that’s the subject of the theorem—it can be any orthonormal basis whatsoever. Claim #1, on the other hand, is about the representation of the operator $\hat A$ in a particular basis. Specifically, it says that if $\mathcal B = \{\lvert\phi_i\rangle\}$ is an orthonormal basis that consists of eigenvectors of $\hat A$, then the matrix $[\hat A]_{\mathcal B}^{\mathcal B}$ is diagonal.

When you tried to verify the first claim by applying the decomposition in the second, you did so relative to the standard basis $\mathcal E$. That is, you computed $[\hat A]_{\mathcal E}^{\mathcal E} = \sum_i \lambda_i ([\phi_i]_{\mathcal E})^T[\phi_i]_{\mathcal E}$, but this is just your original matrix. Instead, you need to express everything relative to the eigenbasis $\mathcal B=\{\lvert\phi_i\rangle\}$: $[\hat A]_{\mathcal B}^{\mathcal B} = \sum_i \lambda_i([\phi_i]_{\mathcal B})^T[\phi_i]_{\mathcal B}$.

In order to do this, you first need an orthonormal eigenbasis. The two eigenvectors that you found are orthogonal, but you do need to normalize them as you’ve done in a later edit. We then have $$[\varphi_1]_{\mathcal B} = \begin{bmatrix}1\\0\end{bmatrix} \text{ and } [\varphi_2]_{\mathcal B} = \begin{bmatrix}0\\1\end{bmatrix},$$ so $$5 ([\varphi_1]_{\mathcal B})^T[\varphi_1]_{\mathcal B} + 1([\varphi_2]_{\mathcal B})^T[\varphi_2]_{\mathcal B} = 5\begin{bmatrix}1&0\\0&0\end{bmatrix}+\begin{bmatrix}0&0\\0&1\end{bmatrix} = \begin{bmatrix}5&0\\0&1\end{bmatrix},$$ which is diagonal as claimed.

It’s worth noting that this diagonal decomposition is just a special case of a more general outer product decomposition of an operator. For any orthonormal basis, $\hat I = \sum_i \lvert i\rangle\langle i\rvert$, and so $$\hat A = \hat I\hat A\hat I = \sum_{i,j} \langle i \rvert \hat A \lvert j \rangle \lvert i\rangle\langle j\rvert.$$ Now, if $\lvert i\rangle$ also happens to be an eigenvector of the diagonalizable operator $\hat A$ with eigenvalue $\lambda_i$, then $\hat A\lvert i\rangle = \lambda_i\lvert i\rangle$ and $\langle i\rvert \hat A\lvert j\rangle = \lambda_i\delta_{ij}$, which leads to the diagonal decomposition $$\hat A = \hat I\hat A\hat I = \sum_{i,j} \langle i \rvert \hat A \lvert j \rangle \lvert i\rangle\langle j\rvert = \sum_{i,j} \lambda_i\delta_{ij} \lvert i\rangle\langle j\rvert = \sum_i \lambda_i \lvert i\rangle\langle i\rvert.$$ Relative to this basis, the corresponding matrix is diagonal.