O(N^2) system of linear equation solver