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?
 A: Well you have to take of every column exactly one element. So basically we can write every element of the matrix as the element which is in the same column and in the first row plus a number between $0$ and $4$, we will call this number $a_i$ for the $i$-th column.
$$1+a_1 + 6+a_2+11+a_3 + 16+a_4+21+a_5+\dots + 46+a_{10}=235+ \sum_{k=1}^{10} a_k$$
The value of $a_i$ says in which row you are, if $a_i=0$ you are in the first row, if it $1$ you are in the second. 
As you take of every row exactly 2 you have: 
$$\sum_{k=1}^{10}a_k= 2\cdot 0 +2\cdot 1 +\dots +2\cdot 4= 20$$
Hence you will always have the sum to be $255$.
A: 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$
