It is well known that a $\{0, \pm 1\}$ matrix $A$ is totally unimodular (TUM) if and only if matrix $A'$ obtained from $A$ by pivoting operation is totally unimodular.
Here pivoting an element $a_{ij}\neq 0$ is defined as first multiplying the row $a_i$ by $1/a_{ij}$ to make $a_{ij}'=1$, and then add row $a_i'$ to the other rows $a_k, k\neq i$ such that $a_{kj}=0$ (same as the elementary row operation).
My question is that for the following matrix, it seems that TUM is not preserved under pivoting.
$A=\begin{pmatrix} 1 &1&1 \\ 1&-1&0\\ 1&0&0\\ \end{pmatrix}.$
Here $A$ is not TUM since $\begin{pmatrix} 1 &1 \\ 1&-1\\ \end{pmatrix}$ has determinant of $-2$.
On the other hand, if we pick $a_{31}$ as the pivot, then after pivoting the first two rows, the matrix reduces to
$A'=\begin{pmatrix} 0 &1&1 \\ 0&-1&0\\ 1&0&0\\ \end{pmatrix},$
which is TUM.
I think there must be some mistakes in my understanding but I didn't figure out where. Thanks.