# Gram-Schmidt and Projections

For two given basis vectors $|\phi_1 \rangle$ and $|\phi_2 \rangle$ that are not orthonomral, we can construct an orthonomral basis with Gram-Schmidt proceedure. We choose the first vector and normalise it \begin{align} |\psi_1 \rangle = \frac{|\phi_1 \rangle}{ \| |\phi_1 \rangle \|} \end{align} the second vector should be normal to $|\psi_1 \rangle$, so we have to subtract the component of $|\phi_2 \rangle$ parallel to $|\psi_1 \rangle$. This component is given by the fraction $\langle \psi_1|\phi_2 \rangle$ pointing along $|\psi_1 \rangle$

\begin{align} |\psi_2 \rangle =|\phi_2 \rangle- \frac{\langle \psi_1|\phi_2 \rangle |\psi_1 \rangle}{ \| \langle \psi_1|\phi_2 \rangle |\psi_1 \rangle \|} \end{align} In the right most term $\langle \psi_1|\chi_2 \rangle$ is just a scalar so we can write it after the vector $|\psi_1 \rangle$ without changing the meaning of the process

\begin{align} |\psi_2 \rangle = \frac{|\psi_1 \rangle \langle \psi_1| |\phi_2 \rangle }{ \| \langle \psi_1|\phi_2 \rangle |\psi_1 \rangle \|} \end{align} However, we can reinterpret the situation. The term $|\psi_1 \rangle \langle \psi_1|$ is a matrix acting on the vector $|\phi_2 \rangle$ to give another vector. The matrix $|\psi_1 \rangle \langle \psi_1|$ is called projection operator and projects an arbitrary vector on the basis vector $|\psi_2 \rangle$ normal to $|\psi_1 \rangle$.

The constructed set of orthonormal basis vectors have the properties \begin{align} \langle \psi_n|\psi_m \rangle = \delta_{ij} \quad &\text{orthonormality}\\ \sum_n |\psi_n \rangle \langle \psi_n| = \mathbb{1} \quad &\text{completeness}\\ \{ |\psi_n \rangle \langle \psi_n| \}^2=|\psi_n \rangle \langle \psi_n| \quad &\text{idempotency}\\ \end{align} where $|\psi_n \rangle \langle \psi_n|=P_n$ is a projection operator ($P_n^2=P_n$).

Example

For the basis \begin{align} |\phi_1 \rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix} \quad |\phi_2 \rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix} \end{align} the projection operators are

\begin{align} |\phi_1 \rangle \langle \phi_1| = \begin{pmatrix} 1 & 0 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} \end{align} \begin{align} |\phi_1 \rangle \langle \phi_2| = \begin{pmatrix} 1 & 0 \end{pmatrix} \begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \end{align} \begin{align} |\phi_2 \rangle \langle \phi_1| = \begin{pmatrix} 0 & 1 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} \end{align} \begin{align} |\phi_2 \rangle \langle \phi_2| = \begin{pmatrix} 0 & 1 \end{pmatrix} \begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix} \end{align}

together the projection matrices form a basis for the operator space, since \begin{align} A=\begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}= a_{11} \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} + a_{12} \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} + a_{21} \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} + a_{22} \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}=\sum_{n,m}a_{nm}|\phi_n \rangle \langle \phi_m| \end{align}

Notice that each element of the operator $A$ can be represented as

\begin{align} a_{nm}=\langle \phi_n|A|\phi_m \rangle \end{align}

e.g. \begin{align} \langle \phi_1|A|\phi_2 \rangle =a_{11} \langle \phi_1|\phi_1 \rangle \langle \phi_1|\phi_2 \rangle + a_{12} \langle \phi_1|\phi_1 \rangle \langle \phi_2|\phi_2 \rangle + a_{21} \langle \phi_1|\phi_2 \rangle \langle \phi_1|\phi_2 \rangle + a_{22}\langle \phi_2|\phi_1 \rangle \langle \phi_2|\phi_2 \rangle=a_{12} \end{align} because $\langle \phi_n|\phi_m \rangle = \delta_{ij}$