Gauss-Jordan elimination