Sum of the selected elements of matrix is $255$ A $5\times 10$ matrix is given:
$$\begin{pmatrix}
1 & 6 & 11 & 16 & 21 & 26 & 31 & 36 & 41 & 46\\
2 & 7 & 12 & 17 & 22 & 27 & 32 & 37 & 42 & 47\\
3 & 8 & 13 & 18 & 23 & 28 & 33 & 38 & 43 & 48\\
4 & 9 & 14 & 19 & 24 & 29 & 34 & 39 & 44 & 49\\
5 & 10& 15 & 20 & 25 & 30 & 35 & 40 & 45 & 50\\
\end{pmatrix}$$
If we select $10$ distinct elements such that


*

*exactly $2$ elements are chosen from one row and

*exactly $1$ element is chosen from each column then
we will have the sum of these $10$ elements as $255$.
I can recognize the pattern here but how to prove this in general?

Your matrix is the sum of these two:
$$A = \begin{pmatrix}
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1\\
2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2\\
3 & 3 & 3 & 3 & 3 & 3 & 3 & 3 & 3 & 3\\
4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4\\
5 & 5 & 5 & 5 & 5 & 5 & 5 & 5 & 5 & 5\\
\end{pmatrix}$$
and
$$B = \begin{pmatrix}
0 & 5 & 10 & 15 & 20 & 25 & 30 & 35 & 40 & 45\\
0 & 5 & 10 & 15 & 20 & 25 & 30 & 35 & 40 & 45\\
0 & 5 & 10 & 15 & 20 & 25 & 30 & 35 & 40 & 45\\
0 & 5 & 10 & 15 & 20 & 25 & 30 & 35 & 40 & 45\\
0 & 5 & 10 & 15 & 20 & 25 & 30 & 35 & 40 & 45\\
\end{pmatrix}$$
Condition 1 says that the contribution to the sum from $A$ is
$(1 + 1) + (2 + 2) + (3 + 3) + (4 + 4) + (5 + 5) = 30$
Condition 2 says that the contribution to the sum from $B$ is
$0 + 5 + 10 + 15 + 20 + 25 + 30 + 35 + 40 + 45 = 225$
