A half-baked Gauss-Jordan elimination implementation.