Simple implementation of Gauss-Jordan elimination.