Let $A_n$ be the real $n × n$ matrix $(n ≥ 2)$ whose $(i, j)$ entry is $i − j$. What is the rank of $A_n$ as a function of $n$?
My attempt:- $A_2$ has rank $2$. It is obvious. $A_3$ has also rank $2$. Since, $A_3$ has determinant $0$ and has a submatrix of order $2$ with determinant non-zero. Similarly, I could conclude that $A_4$ has rank $2$. Using this method I can't go beyond. I also know that $A_n$ is a skew-symmetric matrix. $\det A_n=0,\forall n.$ I am not able to draw conclusion beyond this. Please help me.
Hint: Can you show that the matrix $B = \begin{bmatrix}1 & 1 & \cdots & 1 \\ 2 & 2 & \cdots & 2 \\ \vdots & \vdots & \ddots & \vdots \\ n & n & \cdots & n\end{bmatrix}$ (i.e. $B_{i,j} = i$) has rank $1$?
Similarly, can you show that the matrix $C = \begin{bmatrix}1 & 2 & \cdots & n \\ 1 & 2 & \cdots & n \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 2 & \cdots & n\end{bmatrix}$ (i.e. $C_{i,j} = j$) has rank $1$?
Once you do that, what can you say about the rank of $A = B-C$?