# Chemistry - Computing the commutator of the Fock and density matrices in AO basis (Hartree-Fock theory)

## Solution 1:

Start from the AO Hartree-Fock equation and its adjoint $$\mathbf{F}^{AO}\mathbf{T}=\mathbf{S}\mathbf{T}\epsilon \text{ and } \mathbf{T^\dagger}\mathbf{F}^{AO}=\epsilon\mathbf{T^\dagger}\mathbf{S}$$

where $$\mathbf{T}$$ is an $$N\times n$$ matrix that is essentially the occupied block of $$\mathbf{C}$$ ($$n$$ is occupied, $$N$$ is total orbitals). We use this $$\mathbf{T}$$ matrix because it has the convenient property that

$$\mathbf{T}\mathbf{T}^\dagger=\mathbf{D}^{AO}$$

Now, we can multiply the HF equation by $$\mathbf{T^\dagger}\mathbf{S}$$ on the right and multiply its adjoint by $$\mathbf{S}\mathbf{T}$$ on the left, which gives

$$\mathbf{F}^{AO}\mathbf{T}\mathbf{T^\dagger}\mathbf{S}=\mathbf{S}\mathbf{T}\epsilon\mathbf{T^\dagger}\mathbf{S}$$

$$\mathbf{S}\mathbf{T}\mathbf{T^\dagger}\mathbf{F}^{AO}=\mathbf{S}\mathbf{T}\epsilon\mathbf{T^\dagger}\mathbf{S}$$

Subtracting the first equation from the second and yields the desired commutator relationship.

$$\mathbf{F}^{AO}\mathbf{D}^{AO}\mathbf{S}-\mathbf{S}\mathbf{D}^{AO}\mathbf{F}^{AO}=\mathbf{0}$$

The notation I use here is based on a similar derivation given in Chapter 6 of McWeeny's Methods of Molecular Quantum Mechanics, 2nd edition.

## Solution 2:

Starting from statement that the Fock matrix and the density matrix commute in an orthonormal basis. $$[\mathbf{F}, \mathbf{D}] = \mathbf{FD} - \mathbf{DF} = \mathbf{0}$$ The orthonormal basis matrices can be substituted for their equivalents in an atomic orbital basis \begin{align} \mathbf{F} = {} & \mathbf{X}^\dagger \mathbf{F}^{AO} \mathbf{X} \\ \implies \mathbf{F}^{AO} = {} & \left[\mathbf{X}^\dagger\right]^{-1} \mathbf{F} \mathbf{X}^{-1}\\ \mathbf{D}^{AO} = {} & \mathbf{X} \mathbf{D} \mathbf{X}^\dagger \\ \implies \mathbf{D} = {} & \mathbf{X}^{-1} \mathbf{D}^{AO} \left[\mathbf{X}^\dagger\right]^{-1} \end{align}

where $$\mathbf{X}$$ is an orthogonalisation matrix. : \begin{align} [\mathbf{F}, \mathbf{D}] = {} & \mathbf{FD} - \mathbf{DF} = \mathbf{0} \\ = {} & \mathbf{X}^\dagger \mathbf{F}^{AO} \mathbf{X} \mathbf{X}^{-1} \mathbf{D}^{AO} \left[\mathbf{X}^\dagger\right]^{-1} - \mathbf{X}^{-1} \mathbf{D}^{AO} \left[\mathbf{X}^\dagger\right]^{-1} \mathbf{X}^\dagger \mathbf{F}^{AO} \mathbf{X} \\ = {} & \mathbf{X}^\dagger \mathbf{F}^{AO} \mathbf{D}^{AO} \left[\mathbf{X}^\dagger\right]^{-1} - \mathbf{X}^{-1} \mathbf{D}^{AO} \mathbf{F}^{AO} \mathbf{X} \end{align}

When $$\mathbf{X} = \mathbf{S}^{-\frac{1}{2}}$$, pre and postmultiplying by $$\mathbf{X}^{-1} = \mathbf{S}^{\frac{1}{2}}$$:

\begin{align} \mathbf{X}^{-1} \mathbf{0} \mathbf{X}^{-1} = {} & \mathbf{X}^{-1} \mathbf{X}^\dagger \mathbf{F}^{AO} \mathbf{D}^{AO} \left[\mathbf{X}^\dagger\right]^{-1} \mathbf{X}^{-1} - \mathbf{X}^{-1} \mathbf{X}^{-1} \mathbf{D}^{AO} \mathbf{F}^{AO} \mathbf{X} \mathbf{X}^{-1} \\ \mathbf{0} = {} & \mathbf{F}^{AO} \mathbf{D}^{AO} \mathbf{S} - \mathbf{S} \mathbf{D}^{AO} \mathbf{F}^{AO} \end{align}

as you have suggested.