Find rank of very big matrix. Find rank of $$\begin{bmatrix}
0&1&1\ ..&1&1&1\\
-1&0&1\ ...&1&1&1\\
-1&-1&0\ ...&1&1&1\\
..&..&..&..&..&..\\
-1&-1&-1\ ..\ &-1&-1&0
\end{bmatrix}$$
After row elimination I get this \begin{bmatrix}
1&0&-1\ ..&-1&-1&-1\\
0&0&0\ ...&1&1&1\\
0&-1&-1\ ...&0&0&0\\
..&..&..&..&..&..\\
-1&-1&-1\ ..\ &-1&-1&0
\end{bmatrix}
but don't know how to continue.
I know how to find rank by minor but I don't think we need it here because we can't check every matrix whose determinant is not $0$. Therefore we need to find rank by row elimination.
 A: Hint: Denote the skew-symmetric matrix by $A_n$. For $n$ even the determinant is nonzero, namely $\det(A_n)=1$, so the rank is equal to $n$.
Reference:
Determinant of a special skew-symmetric matrix
For $n$ odd the rank is $n-1$ and of course $\det(A_n)=0$.
A: Let $A_n$ be the size $n\times n$ instance the matrix. Adding the first and last columns gives $(1,0,...,0,-1)^T$, so that $ x = (-1,0,...,0,1)^T$ is in the column space. Since column operations do not affect rank, we can add $x$ to every column other than the first and last columns. The resulting matrix has the same rank as $A_n$ and gives
$$\text{rank} A_n = \text{rank} A_{n-2} + 2$$
Since $\text{rank} A_2 = 2$ and $\text{rank} A_1 = 0$, this yields
$$\text{rank} A_n = 
\begin{cases} 
n & n\text{ even} \\
n-1 & n\text{ odd}
\end{cases} $$
A: We have an integer matrix, we can reduce the matrix $\bmod p$ and get a matrix in $\mathbb F_p$ , the rank of the original matrix is at least than the rank of the new matrix.
If we reduce it $\bmod 2$ we get the symmetric matrix in which $1$ is outside the diagonal and $0$ in it.
Finding the rank of this matrix appears to be easy:
When $n$ is even you can add the vector $(1,1,\dots, 1)$  to each row (this is equal to the sum of all the rows) and see that the resulting matrix is just the identity, so the rank is $n$.
When $n$ is odd you can add the vector $(1,1,\dots,1,0)$ to each row (this is the sum of the first $n-1$ rows) and see the resulting matrix contains the identity of size $n-1$ in the top left corner, so the rank is at least $n-1$. (in fact it is easy to see it is exactly $n$, since the sum of each row is $0$, so $(1,1,\dots, 1)$ is in the kernel).

Using this we get the rank of our original matrix is $n$ when $n$ is even, and when $n$ is odd it is exactly $n-1$ since the determinant of $A$ is $0$.
To see this observe $A^t = -A$ for our matrix.
We also have $\det(-A) = (-1)^n \det(A)$ , so in the case where $n$ is odd we have $\det(-A) = -\det(A)$.
Lastly we have $\det(A) = \det(A^t)$
Putting it all together we have $\det(A) = \det(A^t) = \det(-A) = -\det(A)$
