# Linear Algebra - Rank of a matrix

A is a $100 \times 100$ matrix.

The element in the $i^{th}$ row and $j^{th}$ column is given by $i^2 + j^2$

Find the rank

Hint: Show that each row is a linear combination of the vectors $(1,4,9,\ldots,100^2)$ and $(1,1,1,\ldots,1)$.

• +1: I like this solution best. Mar 22 '13 at 18:11
• Looks like my hint appeared while Abhra Abir Kundu was editing, adding the same suggestion to his answer. Mar 23 '13 at 6:26
• Did you mean to write $10^2$ instead of $100^2$? Dec 3 '13 at 9:49
• No, @Gigili. It is a $100\times 100$ matrix. Dec 3 '13 at 10:13
• Ah, right @JyrkiLahtonen. Sorry, trying to understand different answers provided made me forgot the question itself. Dec 3 '13 at 10:21

Hint: rank of sum $\le$ sum of ranks.

• I wish that when I was taught, that knowledge was encapsulated in pithy one-liners like this. Mar 22 '13 at 18:13
• I don't understand what can we do about the problem now that we know this piece of information, could you elaborate? What does it even mean? Not all visitors are mathematicians! Dec 3 '13 at 10:24
• This matrix is the sum of two matrices, one with the entries $i^2$ and the other with $j^2$. Each has rank $1$, because the first has all columns the same and the second has all rows the same. So our matrix has rank at most $2$. To show the rank is at least $2$, look at some $2 \times 2$ submatrix. Dec 3 '13 at 15:56

I think the rank is $2$.

Fact *: Rank of a matrix = Column rank.

Fact 1:When we perform any row operation or column operation to a matrix then the rank of the matrix does not change.

Now we perform the column operations: Subtract the first column from all the columns.

Then the matrix has all its $i$th ($2\le i\le 100$) column as $(i^2-1)(1,1,\dots,1)^t$ and the first column is $(1^2+1^2,2^2+1^2,\dots,100^2+1^2)^t$

Now all the columns of this matrix is linear combination of the following two vectors:$\{(1^2,2^2,3^2\dots,n^2)^t,(1,1,1,\dots,1)^t\}=S$

As all the columns of this reduced matrix is spanned by the vectors in $S$ and $S$ is a linearly independent set, the column rank of the reduced matrix is $2$. Implying by Fact 1 and Fact * that the rank of the matrix is $2$

Hint:

Let $[B]_{ij} = i^2$, $[C]_{ij} = j^2$. Notice that $A=B+C$ (indeed, $C=B^T$).

What can you say about the rank of $B,C$?

Also, notice that $A$ contains the submatrix $\begin{bmatrix} 2 & 5 \\ 5 & 8\end{bmatrix}$, which is invertible.

If we must use Matlab (or Octave, in my case):

rank(ones(100,1)*(1:100).^2+(ones(100,1)*(1:100).^2)')

• Notice that, your answer and Robert Israel's, together give the complete answer! Mar 22 '13 at 17:48
• Well, @Rustyn's post gives the complete answer... Mar 22 '13 at 17:50
• Indeed. :D But your is more than complete I guess... Mar 22 '13 at 17:52

The rank of the matrix $A$ is $2$. I've found it. I used the following commands in MATLAB:

for i=1:100;
for j=1:100;
A(i,j) = i^2 + j^2;
end
end
rank(A)

• Is a program really needed to find the rank of the a mtrix when it is as simple as this math.stackexchange.com/a/338099/48639. Mar 22 '13 at 18:05
• @AbhraAbirKundu no. HA. I had MATLAB up when i first saw the question and it took .5 seconds to type that in. I was trying to be cheeky because the question was more like a demand. Mar 22 '13 at 23:11