I was going through the Hartree-Fock algorithm, transforming the spatial molecular orbitals {$\psi _i$} to be a linear combination of Roothaan basis set {$\phi_i$}. From my knowledge {$\psi_i$} is set to be orthonormal, and there is a linear transformation $[\psi_1\ ...\psi_K] = [\phi_1\ ...\phi_K]\begin{bmatrix}C_{11}&C_{12}&...&C_{1K}\\C_{21}&C_{22}&...&C_{2K}\\...\\C_{K1}&C_{K2}&...&C_{KK}\end{bmatrix}$ Where {$\phi_i$} is not necessarily orthogonal, albeit being normalized.
Let the coefficient matrix be $C$. With that in mind, and that matrix representation of Fock operator (transformation) under the new basis set is related to the old one by a similarity transform $F = C^{-1}F'C$, I went on calculating the element of Fock matrix under each basis: $$\langle \psi_i|f|\psi_j\rangle = \Sigma_{\mu}C_{\mu i}^*\langle \phi_\mu |f\ |\Sigma_{\nu}C_{\nu j}\phi_\nu\rangle$$ $$= \Sigma_\mu\Sigma_\nu (C)^\dagger_{i\mu}\langle\mu|f|\nu\rangle C_{\nu j}$$ $$= (C^\dagger F'C)_{ij}$$ So basically I have got $F = C^\dagger F'C$ and $F = C^{-1}F'C$. I am not an expert on maths but $C$ looks suspiciously unitary. Let $C^\dagger C = L$ where $L\in M_{K\times K}(\mathbb{C})$ Since $C$ is non-singular there can be $C^\dagger = LC^{-1}$ substituting this to $F = C^\dagger FC = LC^{-1}F'C = LF$ so $L$ can be none other than $I$.
This causes a problem. The overlap matrix $S:=\langle \mu|\nu\rangle$ has a special equality:$$(C^\dagger SC)_{ij} = \Sigma_{k,l}C^\dagger _{ik}\langle k|l\rangle C_{lj} = \Sigma_{k,l}C^* _{ki}\langle k|l\rangle C_{lj} =\langle \psi_i|\psi_j\rangle = \delta_{ij}$$ This means $$C^\dagger SC = I$$ but $C^\dagger = C^{-1}$ so $S$ is similar to $I$. Similar matrices have the same eigenvalue. $S$ clearly does not have all 1 eigenvalues. What went wrong here?