# Math Help - Matrix Puzzle

1. ## Matrix Puzzle

Suppose that we have a 3x3 matrix such that the sum of each row and that of each column is equal to the same non-negative integer s. If each entry is known to be a non-negative integer and same number can be used more than once in each row or in each column, how many such 3x3 matrices are there?

2. Hello, hastings!

Are they any other restrictions to the numbers?
As stated, the problem is rather silly.

Suppose that we have a 3x3 matrix such that the sum of each row
and that of each column is equal to the same non-negative integer S.
If each entry is known to be a non-negative integer
and same number can be used more than once in each row or in each column,
how many such 3x3 matrices are there? . . ${\color{blue}\text{Answer: }\:\infty}$

Since numbers can be repeated, the problem is trivial.

. . A solution is: . $\left[\begin{array}{ccc} n & n & n \\ n & n & n \\ n& n & n\end{array}\right]$ . for any $n \in I^+$

Using three different integers: $a,b,c$

. . a solution is: . $\left[\begin{array}{ccc}a & b & c \\ b & c & a \\ c & a & b\end{array}\right]$ . for any $a,b,c \in I^+$

Even if the numbers must be consecutive integers,

. . a solution is: . $\left[\begin{array}{ccc} a+7 &a+2 & a+3 \\ a & a+4 & a+8 \\ a+5 & a+2 & a+1 \end{array}\right]$ . for any $a \in I^+$

3. Hello soroban,

This is what i found, too, but the person who asked me this puzzle said that the answer was different. Anyways, if no repetition is allowed, is there a formula for the number of such matrices?

4. Originally Posted by Soroban
Hello, hastings!

Are they any other restrictions to the numbers?
As stated, the problem is rather silly.

Since numbers can be repeated, the problem is trivial.

. . A solution is: . $\left[\begin{array}{ccc} n & n & n \\ n & n & n \\ n& n & n\end{array}\right]$ . for any $n \in I^+$

Using three different integers: $a,b,c$

. . a solution is: . $\left[\begin{array}{ccc}a & b & c \\ b & c & a \\ c & a & b\end{array}\right]$ . for any $a,b,c \in I^+$

Even if the numbers must be consecutive integers,

. . a solution is: . $\left[\begin{array}{ccc} a+7 &a+2 & a+3 \\ a & a+4 & a+8 \\ a+5 & a+2 & a+1 \end{array}\right]$ . for any $a \in I^+$

The question wants to know for a fixed $s \in \mathbb{N}$ how many $N(s)$ distinct matrices satisfying the condition exist.

The obvious results are $N(1)=0, \ N(2)=0,\ N(3)=1,\ N(4)=6$.

RonL