The coefficients of the linear combination are determined so to best approximate, in a least squares sense, the null vector.
At each iteration, an approximate error vector, ei, corresponding to the variable value, pi is determined.
After sufficient iterations, a linear combination of m previous error vectors is constructed The DIIS method seeks to minimize the norm of em+1 under the constraint that the coefficients sum to one.
In the DIIS approximation, we get: We minimize the second term while it is clear that the sum coefficients must be equal to one if we want to find the exact solution.
Moving the minus sign to λ, results in an equivalent symmetric problem.