# Magic square on an infinite lattice

This question came to me while reading the discussion of magic square in the complex plane with equal integrals along every horizontal, vertical and diagonal "magic square in the complex plane with equal integrals along every horizontal, vertical and diagonal"

That question ran into trouble when people pointed out the difficulties involved in just making sense of the question, e.g., what kind of function, what kind of integral, etc. So I made up something halfway between the finite-discrete magic square (that is, the usual kind) and the continuous analogue raised in Question 53352:

What can you say about complex numbers $a_{i,j}$ such that for all $i$ and $j$ the sums $$\sum_{i=-\infty}^{\infty}a_{i,j}=\sum_{j=-\infty}^{\infty}a_{i,j}\lt\infty$$ That is, the sums along vertical and horizontal lines all converge and are all equal.

If the doubly-infinite sums are a worry, just insist that all the numbers be non-negative reals (alternatively, replace the lower limits of summation with zero).

Splitting into real and imaginary parts, we see that we may assume the numbers are real. Other than that, I haven't done much thinking about it.

I realize the number theory tag is not quite appropriate; I'm trying to comply with the direction, "Please try use at least one tag corresponding to an arXiv subject area."

-
Do you mean, explicitly, to drop the condition along the diagonal? (in this notation it would be something like $\sum_{-\infty}^\infty a_{n,n}$ and $\sum a_{n,-n}$ also being equal... – Willie Wong Jan 26 '11 at 23:18
In this infinite context, even the superdiagonals have the same "length", so one could also insist on $\Sigma_{-\infty}^\infty a_{n,n+k}$ being equal for any fixed $k$ and the same for the other superdiagonals, for a seemingly stronger condition. – Joel David Hamkins Jan 26 '11 at 23:25
I did mean to drop the condition on the diagonals, partly because I've never felt that to be a compelling condition in the finite case, partly because I thought that if there's a simple characterization without any diagonal condition then it will be easy enough to work out the answer if we do insist on main and/or superdiagonals. But by all means feel free to impose diagonal conditions if it makes the problem more interesting for you. – Gerry Myerson Jan 26 '11 at 23:31

Here are two elementary results about those magic square arrays.

Claim: The vector subspace of collections with finitely many nonzero entries has abasis consisting of the magic squares with $4$ nonzero entries arranged as

$$\begin{array}{cc}-1 & 1 \\\1 & -1\end{array}$$.

Proof: You can always add a multiple of such a magic square to eliminate the rightmost nonzero entry in the bottom row without extending the nonzero entries to the top or left.

Claim: Consider arrays with all indices positive. Any arbitrarily chosen convergent first row and first column with the same sums can be extended to a magic square.

Proof: This can be done so that the rest of the array is $0$ except for the diagonal and one off-diagonal. For $i=2,3,4, ...$ choose $a_{i,i}$ to make the $i$th column have the required sum. Then choose $a_{i+1,i}$ to make the $i$th row have the required sum.

I think infinite arrays are a little too flexible. You can specify large portions of the array arbitrarily, such as the diagonal and everything below it (subject to convergence), and you can complete the array to a magic square.

-
Regarding your first claim, what about a $1 \times 1$-magic square? – Guntram Jan 27 '11 at 7:21
That isn't an infinite magic square. If you pad the rest of the array with $0$s you lose the magic square property unless the row sum of the finite array is $0$, which means a $1 \times 1$ square is trivial. – Douglas Zare Jan 27 '11 at 9:19
You've convinced me that, absent a diagonal condition, infinite arrays are too flexible. As a variation on your idea, in the doubly infinite case, we can let the $a_{i,i}$ be arbitrary, let $a_{i,j}$ be zero for $|i-j|\gt1$ (or let them be arbitrary, subject only to the convergence requirement), and fill in the $a_{i-1,i}$ and $a_{i+1,i}$ in such a way as to make the array magic, with arbitrary magic constant. I expect I will accept your answer, but I would like to encourage people to think about the version where all diagonals must also have the magic sum - maybe that's more challenging. – Gerry Myerson Jan 27 '11 at 11:38
Now I'm convinced that even with all diagonals magic there's still too much flexibility. Enumerate all lines, vertical, horizontal, and diagonal, as $L_1,L_2,\dots$. Fill $L_1$ arbitrarily (subject to convergence). Having filled $L_1,\dots,L_n$, you have only filled finitely many values in $L_{n+1}$ (in fact, at most $n$), so you can fill in the rest of $L_{n+1}$ to make it converge to the required value. QED. Remaining questions: can it be done with a closed form for $a_{i,j}$? Can it be done with all $a_{i,j}\gt0$? – Gerry Myerson Jan 27 '11 at 22:34