# Sum of the values in the main diagonal

### Sum of the values in the main diagonal

Let $$a_{ij}$$ be a square $$2021×2021$$ matrix whose entries are numbers $$1,2,3, … ,2020,2021$$. In each row and each column of the matrix, each of these numbers occurs exactly once. You are given that $$a_{ij} = a_{ji}$$. Find the sum of matrix diagonal entries.
math0

Posts: 2
Joined: Tue Dec 08, 2020 5:50 am
Reputation: 0

### Re: Sum of the values in the main diagonal

As a general rule, when you are stuck on a problem look at simpler versions of the problem.

Take a 2 by 2 matrix where the only allowable numbers are 1 and 2, satisfying $a_{ij}= a_{ji}$. The possible matrices are $\begin{bmatrix}1 & 2 \\ 2 & 1 \end{bmatrix}$ and $\begin{bmatrix}2 & 1 \\ 1 & 2 \end{bmatrix}$. The sum of the entries on the main diagonal is 2 for the first and 4 for the second. I am not sure there is one correct solution here! Or did the phrase "sum of matrix diagonal entries" not mean only the main diagonal but the sum of the two diagonals? Here that is the sum of all the entries so 6 for both.

What happens with a 3 by 3 matrix? They must be
$\begin{bmatrix} 1 & 2 & 3 \\ 2 & 3 & 1 \\3 & 1 & 2\end{bmatrix}$
$\begin{bmatrix} 1 & 3 & 2 \\ 3 & 2 & 1 \\2 & 1 & 3\end{bmatrix}$
$\begin{bmatrix} 2 & 1 & 3 \\ 1 & 3 & 2 \\3 & 2 & 1\end{bmatrix}$
$\begin{bmatrix} 2 & 3 & 1 \\ 3 & 1 & 2 \\ 1 & 2 & 3 \end{bmatrix}$
$\begin{bmatrix} 3 & 1 & 2 \\ 1 & 2 & 3 \\ 2 & 3 & 1 \end{bmatrix}$
$\begin{bmatrix} 3 & 2 & 1 \\ 2 & 1 & 3 \\ 1 & 3 & 2 \end{bmatrix}$

Now that's interesting! All of these have the same sum, 1+ 2+ 3= 6, because each of the numbers, 1, 2, and 3, occur exactly once on the main diagonal! I would be inclined to conjecture that, for n odd, every integer from 1 to n will occur once on the main diagonal so that the sum is 1+ 2+ 3+ ,,,,+ n. In particular, since "2021" is odd the sum of the entries on the main diagonal will be 1+ 2+ 3+ ...+ 2019+ 2020+ 2021.

You probably don't want to actually do that sum! so instead let
S= 1+ 2+ 3+ ...+ 2019+ 2020+ 2021 and observe that if we reverse the order we still get the same sum:
S= 2021+ 2020+ 2019+ ...+ 3+ 2+ 1 and add VERTICALY,
1+ 2021= 2022
2+ 2020= 2022
3+ 2019= 2022

Add both sums gives, of course, 2S and we will have 2021 vertical sums all equal to 2022 so

2S= (2021)(2022)

S= (2021)(2022)/2= (2021)(1011)

HallsofIvy

Posts: 341
Joined: Sat Mar 02, 2019 9:45 am
Reputation: 123