I was looking at the code required for a simple RHF computation when I came across the section for the diagonalisation of the Fock Matrix.

Based on what I know, the diagonal matrix $\mathbf{s}$ is evaluated as

$$\mathbf{s} = \mathbf{U}^\dagger\mathbf{S}\mathbf{U},$$ where $\mathbf{S}$ is the overlap matrix.

The matrix $\mathbf{X}$ is then evaluated as

$$\mathbf{X} = \mathbf{U}\mathbf{s}^{-1/2}\mathbf{U}^\dagger$$

and the diagonalised Fock operator $\mathbf{F'}$ as

$$\mathbf{F'} = \mathbf{X}^\dagger\mathbf{F}\mathbf{X}.$$

But what happens if the matrix $\mathbf{s}$ has terms that are negative? What happens then? Do we simply take the magnitude and carry on?


  • 7
    $\begingroup$ The overlap matrix is positive definite (en.wikipedia.org/wiki/Definiteness_of_a_matrix). This means all its eigenvalues, the elements of the diagonal matrix you give above, are positive. Thus what you describe can not happen in real arithmetic, though there may be issues on computers where you are using floating point. When I have more time I'll write a proper answer $\endgroup$
    – Ian Bush
    Aug 1, 2019 at 15:23
  • 1
    $\begingroup$ The proof can be found here $\endgroup$
    – Jan Jensen
    Aug 2, 2019 at 8:07
  • $\begingroup$ @JanJensen FYI the .dk books.google link appears not to work outside Denmark $\endgroup$ Aug 2, 2019 at 19:00
  • 1
    $\begingroup$ @MichaelBanck ah, ok. The book is "Simple Theorems, Proofs, and Derivations in Quantum Chemistry" by Istvan Mayer and the proof appears on page 63 $\endgroup$
    – Jan Jensen
    Aug 7, 2019 at 10:10
  • $\begingroup$ It works in .uk $\endgroup$
    – Ian Bush
    Aug 15, 2019 at 10:39

1 Answer 1


The matrix $\mathbf{s}$ in your question are the eigenvalues of the overlap matrix $\mathbf{S}$, further the matrix $\mathbf{U}$ are a matrix of the eigenvector of the overlap matrix. Now looking at the equation that gives you concern:

$$\mathbf{X} = \mathbf{U}\mathbf{s}^{-1/2}\mathbf{U}^\dagger$$

Since $\mathbf{s}$ is a diagonal matrix then taking the power of $\mathbf{s}$ is just taking the power of every element:


The only way as you noted this can cause trouble is if any of the elements of $\mathbf{s}$ are negative. Now here we have to remember that $\mathbf{s}$ are the eigenvalues of the overlap matrix, it is therefore guareenteed that all of the elements will be equal to or greater than zero! For the proof of this see my answer to one of your other questions, Basis sets - negative contraction coefficients?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.