# Fill each box of the magic square, with a number such that the number adds up to 18 horizontally, vertically and diagonally? [(, ,), (, ,), (, ,)]

## $\left[\begin{matrix}7 & \null & \null \\ \null & 6 & \null \\ \null & 10 & \null\end{matrix}\right]$

Apr 17, 2016

$\left[\begin{matrix}7 & 2 & 9 \\ 8 & 6 & 4 \\ 3 & 10 & 5\end{matrix}\right]$

#### Explanation:

We can fill in the unknown squares, one at a time to satisfy the constraints:

[[7, ?, ?], [?, 6, ?], [?, 10, ?]] -> [[7, ?, ?], [?, 6, ?], [?, 10, 5]] -> [[7, ?, ?], [?, 6, ?], [3, 10, 5]]

-> [[7, ?, ?], [8, 6, ?], [3, 10, 5]] -> [[7, ?, ?], [8, 6, 4], [3, 10, 5]] -> [[7, 2, ?], [8, 6, 4], [3, 10, 5]]

$\to \left[\begin{matrix}7 & 2 & 9 \\ 8 & 6 & 4 \\ 3 & 10 & 5\end{matrix}\right]$

Bonus

An example $4 \times 4$ magic square is:

$\left[\begin{matrix}1 & 12 & 7 & 14 \\ 8 & 13 & 2 & 11 \\ 10 & 3 & 16 & 5 \\ 15 & 6 & 9 & 4\end{matrix}\right]$

This one adds up to $34$ in each column, row, diagonal or $2 \times 2$ block of cells.