[Math] Rank of an NxN matrix

linear algebramatricesmatrix-rank

This question very similar to this one.

I have this problem I'm working on. I think I have it figured out but I just want to make sure I am not misunderstanding how rank works.

The question goes like this,

Consider an nXn matrix where the elements go from 1 to $ n^2 $ as you read across and then down. For instance a 3X3 matrix where n = 3 looks like this:

$ \left( \begin{array}_
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \end{array} \right)$

What is the rank of the nXn matrix, as a function of n, for n>=2?

Drawing out the matrices for n=2 to n=5 I can spot a pretty obvious pattern in the matrix construction and the whole thing can be written in terms of n:

$ \left( \begin{array}_
1 & 2 & 3 & … & n \\
n+1 & n+2 & n+3 & … & 2n \\
2n+1 & 2n+2 & 2n+3 & … & 3n \\
3n+1 & 3n+2 & 3n+3 & … & 4n \\
… &… &… & … & … \\
n^2-n+1 & n^2-n+2 & n^2-n+3 & … & n^2 \end{array} \right)$

From this I can spot that as soon as you get past the 3rd row, you can sum the prior rows to cancel out that row.

For instance take row 4 from above for the first column.
If I take $ row 3 + row 2 – row 1 $ I get this value

$ (2n+1) + (n+1) – (1) = 3n+1 $

Which is the next rows value in row 4.

And that can be carried out on the rest of the columns to produce the same result.

So for any arbitrary row k beyond row 3, I can make that row all zeros by doing a row reduction of:

Rk -> Rk – Rk-1 – Rk-2 + Rk-3

Thus the maximum rank this matrix can have is 3 correct?

Is this a reasonable way to solve this problem or there a more direct approach I should be taking?

Best Answer

Subtracting the first row from the others we obtain $n-1$ rows multiple of $(n,n,\ldots,n)$ therefore $\operatorname{rank}(A)=2$ for any $n\ge 2$.