Consider the following matrix: $ \left[ \begin{array}{ccc} -0.05 & 0.45 & 0 \\ 0.05 & -0.45 & 0 \end{array} \right] $
Row reducing the above matrix in Matlab using the rref() function produces what I would expect (just adding top row to bottom row and scaling top row): $ \left[ \begin{array}{ccc} 1.0 & -9.0 & 0 \\ 0 & 0 & 0 \end{array} \right] $
But if I remove the last column of just zeros, and row reduce that matrix, I get a 2x2 identity matrix: $ \left[ \begin{array}{ccc} -0.05 & 0.45 \\ 0.05 & -0.45 \end{array} \right] \sim \left[ \begin{array}{ccc} 1 & 0 \\ 0 & 1 \end{array} \right] $
I can't see how removing the last column changes anything; adding the top row to the bottom row will still produce the result above, just without the last column of $0$'s. But I'm quite sure Matlab is right and I'm not, so what am I missing here?
Edit: I have managed to reproduce the above and I believe it's all due to rounding errors. If you input $ M = \left[ \begin{array}{ccc} 0.95 & 0.45 \\ 0.05 & .55 \end{array} \right] $ and then do $ A = M - eye(2) $. rref(A) will now give the $2 \times 2$ identity matrix. If I enter the result of $M-eye(2)$ directly, that is $B= \left[ \begin{array}{ccc} -0.05 & 0.45 \\ 0.05 & -0.45 \end{array} \right] $, then rref(B) returns the expected $ \left[ \begin{array}{ccc} 1 & -9 \\ 0 & 0 \end{array} \right] $ .
Here's a screenshot as an example: