Why does the matrix
\begin{bmatrix} 0 & -1 & 1 \\ 1 & 0 & -1 \\ -1 & 1 & 0 \end{bmatrix} has rank = 2, while this similar-looking (only replaces -1 with 1) matrix
\begin{bmatrix} 0 & 1 & 1\\ 1 & 0 & 1\\ 1 & 1 & 0 \end{bmatrix} has rank = 3?
Why does the matrix
\begin{bmatrix} 0 & -1 & 1 \\ 1 & 0 & -1 \\ -1 & 1 & 0 \end{bmatrix} has rank = 2, while this similar-looking (only replaces -1 with 1) matrix
\begin{bmatrix} 0 & 1 & 1\\ 1 & 0 & 1\\ 1 & 1 & 0 \end{bmatrix} has rank = 3?
Rank of a matrix is the max. independent column/row vectors.
In the first matrix, clearly, the determinant of $ 3$x$3$ matrix is zero (So, rank$<3 $). So, you've to consider the smaller co-factor matrices for rank determination. Since, there exists atleast one smaller $2$x$2$ which is non-singular (or $ det \ne 0$), rank $=2$.
Whereas, for your second matrix, determinant of $3$x$3$ matrix is non-zero. Hence, rank$=3.$