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? . . $\displaystyle {\color{blue}\text{Answer: }\:\infty}$

Since numbers can be repeated, the problem is trivial.

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

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

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

Even if the numbers must be consecutive integers,

. . a solution is: .$\displaystyle \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 $\displaystyle 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: .$\displaystyle \left[\begin{array}{ccc} n & n & n \\ n & n & n \\ n& n & n\end{array}\right]$ . for any $\displaystyle n \in I^+$

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

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

Even if the numbers must be consecutive integers,

. . a solution is: .$\displaystyle \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 $\displaystyle a \in I^+$

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

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

RonL