The idea is to find some vector xˉ for a given matrix A and b that satisfies Axˉ=b. But that system is in fact inconsistent; b−Axˉ=0. So we look for a solution for xˉ that comes as close as possible. The result of b−Axˉ=0 will be some error e. We can take the length of this error vector to express the accuracy of our solution. Optimally, we find the solution that is as close to 0 as possible; the least squares solution.