<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[a4paper,12pt]{article}

\begin{document}

\parindent=0pt


QUESTION

\setlength{\unitlength}{0.25in}
\begin{picture}(16,6)
\put(1,1){\framebox(1,1){4}} \put(2,1){\framebox(1,1){3}}
\put(3,1){\framebox(1,1){8}} \put(1,2){\framebox(1,1){9}}
\put(2,2){\framebox(1,1){5}} \put(3,2){\framebox(1,1){1}}
\put(1,3){\framebox(1,1){2}} \put(2,3){\framebox(1,1){7}}
\put(3,3){\framebox(1,1){6}}

\put(6,2){Figure 1} \put(6,1){$(n=3)$}

\put(10,1){\framebox(1,1){ }} \put(11,1){\framebox(1,1){ }}
\put(12,1){\framebox(1,1){ }} \put(13,1){\framebox(1,1){ }}
\put(10,2){\framebox(1,1){i}} \put(11,2){\framebox(1,1){ }}
\put(12,2){\framebox(1,1){ }} \put(13,2){\framebox(1,1){ }}
\put(10,3){\framebox(1,1){0}} \put(11,3){\framebox(1,1){0}}
\put(12,3){\framebox(1,1){g}} \put(13,3){\framebox(1,1){ }}
\put(10,4){\framebox(1,1){0}} \put(11,4){\framebox(1,1){0}}
\put(12,4){\framebox(1,1){c}} \put(13,4){\framebox(1,1){d}}

\put(16,2){figure 2} \put(16,1){$(n=4)$}
\end{picture}

A magic square is an $n\times n$ matrix containing the numbers
$1,2,\ldots n^2$ with the property that the sum of the entries
along each row, each column and each of the two main diagonals is
the same. (See figure 1 for an example with $n=3$.) The idea can
be generalised to squares containing any $n^2$ numbers (not
necessarily distinct). Show that there is a unique way to fill in
the remaining squares in figure 2 to make it into a magic square.

\bigskip

ANSWER

From the first row the magic constant is $c+d$. This can be used
to find the following entries:
$(M)_{24},(M)_{41},(M)_{32},(M)_{42}$ to give a square of the form

$$\left[\begin{array}{cccc}0&amp;0&amp;c&amp;d\\0&amp;0&amp;g&amp;c+d-g\\i&amp;i-g-d&amp;w&amp;x
\\c+d-i&amp;c+2d+g-i&amp;y&amp;z\end{array}\right]$$

The magic condition on rows three and four, columns three and four
and the main diagonal lead to five equations (which prove to be
consistent) in the four unknowns $w,x,y$ and $z$ and a sixth
equation can also be obtained from the fact that the sum of the
entries in the last two columns (or rows) is twice the magic
constant. Hence one has a choice of equations to solve for $w,x,y$
and $z$:

\begin{eqnarray}
w+x&amp;=&amp;c+2d+g-2i\\ w+y&amp;=&amp;d-g\\ w+z&amp;=&amp;c+d\\ x+z&amp;=&amp;-d+g\\
y+z&amp;=&amp;-c-2d-g+2i\\ w+x+y+z&amp;=&amp;0
\end{eqnarray}

[This system has a unique solution for $w,x,y$ and $z$ if and only
if precisely four of the equations are linearly independent. But

$(5)=-(1)+(2)+(4)$\ \ and\ \ $(6)=(2)+(4).$

Thus (5) and (6) are not needed to solve the equations, but the
four equations $(1),(2),(3),(4)$ are independent, so the system
does have a unique solution.]

 The solution is

$$\left[\begin{array}{cccc}0&amp;0&amp;c&amp;d\\0&amp;0&amp;g&amp;c+d-g\\i&amp;i-g-d&amp;c+2d-i&amp;g-i
\\c+d-i&amp;c+2d+g-i&amp;-c-d-g+i&amp;-d+i\end{array}\right]$$


\end{document}
</pre></body></html>