There are unimaginable numbers of mathematical puzzles. Each of them is unique in its own way, but their charm is that in order to solve it is inevitably necessary to come to formulas. Of course, you can try to solve them, as they say, by typing, but it will be very long and almost unsuccessful.
This article will talk about one of these puzzles, and to be more precise - about the magic square. We will analyze in detail how to solve the magic square. Grade 3 of the general education program, of course, it passes, but maybe not everyone understood or does not remember at all.
What is this riddle?
A magic square, or, as it is also called, a magic square, is a table in which the number of columns and rows is the same, and they are all filled with different numbers. The main task is that these figures in the sum vertically, horizontally and diagonally give the same value.
In addition to the magic square, there is also a semi-magic one. It implies that the sum of the numbers is the same only vertically and horizontally. The magic square is “normal” only if natural numbers from one were used for filling.
There is still such a thing as a symmetrical magic square - this is when the value of the sum of two digits is equal, while they are located symmetrically with respect to the center.
It is also important to know that squares can be of any size besides 2 by 2. A 1 by 1 square is also considered magic, since all conditions are fulfilled, although it consists of a single number.
So, we got acquainted with the definition, now let's talk about how to solve the magic square. Grade 3 of the school curriculum is unlikely to explain everything in such detail as this article.
What are the solutions
Those people who know how to solve a magic square (Grade 3 knows for sure) will immediately say that there are only three solutions, and each of them is suitable for different squares, but still you cannot ignore the fourth solution, namely “at random” . Indeed, to some extent, there is a chance that an unknowing person can still solve this problem. But we will drop this method into a long box and go directly to the formulas and methods.
The first way. When the square is odd
This method is only suitable for solving a square in which the number of cells is odd, for example, 3 by 3 or 5 by 5.
So, in any case, initially it is necessary to find the magic constant. This is the number that will be obtained with the sum of the numbers diagonally, vertically and horizontally. It is calculated using the formula:
In this example, we look at a three by three square, so the formula will look like this (n is the number of columns):
So, we have a square. The first thing to do is enter the number one in the center of the first line at the top. All subsequent figures must be placed on one cell to the right diagonally.
But then the question immediately arises, how to solve the magic square? Grade 3 was unlikely to use this method, and most will have a problem, how to do it this way if this cell is not? To do everything right, you need to turn on the imagination and draw up a similar magic square from above and it turns out that the number 2 will be in it in the lower right cell. So, in our square, we enter a deuce in the same place. This means that we need to enter the numbers so that in total they give a value of 15.
Subsequent numbers fit exactly the same. That is, 3 will be in the center of the first column. But 4 cannot be entered by this principle, since a unit already stands in its place. In this case, place the number 4 under 3, and continue. Five - in the center of the square, 6 - in the upper right corner, 7 - under 6, 8 - in the upper left and 9 - in the center of the bottom line.
You now know how to solve the magic square. Demidov’s 3rd grade passed, but this author had a bit easier tasks, however, knowing this method, he will be able to solve any such problem. But this is if the number of columns is odd. But what if we have, for example, a 4 by 4 square? More on this later in the text.
The second way. For a square of double parity
A square of double parity is called one in which the number of columns can be divided by 2 and 4. Now we look at the square 4 by 4.
So, how to solve a magic square (Grade 3, Demidov, Kozlov, Tonky - a task in a mathematics textbook) when the number of its columns is 4? But very simple. Easier than in the example before.
First of all, we find the magic constant according to the same formula that was given last time. In this example, the number is 34. Now we need to build the numbers so that the sum of the vertical, horizontal and diagonal is the same.
First of all, you need to paint over some cells, you can do this with a pencil or in your imagination. We paint over all the corners, that is, the upper left cell and the upper right, lower left and lower right. If the square were 8 by 8, then you need to paint over not one cell in the corner, but four, 2 by 2 in size.
Now you need to paint over the center of this square, so that its corners touch the corners of the already filled cells. In this example, we get a square in the center of 2 by 2.
Getting to the filling. We will fill from left to right, in the order in which the cells are located, only we will enter the value in the filled cells. It turns out that in the upper left corner we enter 1, in the right - 4. Then we fill the central 6, 7 and then 10, 11. The lower left 13 and the right - 16. We think the filling order is clear.
The remaining cells are filled in the same way, only in descending order. That is, since the last entered number was 16, then at the top of the square we write 15. Next 14. Then 12, 9 and so on, as shown in the picture.
Now you know the second way to solve the magic square. Grade 3 will agree that a double parity square is much easier to solve than others. Well, we move on to the last method.
The third way. For a square of single parity
The square of single parity is the square that the number of columns of which can be divided into two, but not by four. In this case, it is a 6 by 6 square.
So, we calculate the magic constant. It is equal to 111.
Now you need to visually divide our square into four different 3 by 3 squares. You get four small 3 by 3 squares in one big 6 by 6. The upper left is called A, the lower right is B, the upper right is C and the lower left is D.
Now you need to solve each small square using the very first method that is given in this article. It turns out that in box A there will be numbers from 1 to 9, in B from 10 to 18, in C from 19 to 27 and D from 28 to 36.
Once you have decided all four squares, the work will begin on A and D. It is necessary to select three cells in square A visually or with a pencil, namely: the upper left, central and lower left. It turns out that the highlighted numbers are 8, 5 and 4. In the same way, the square D (35, 33, 31) must also be selected. All that remains to be done is to swap the selected numbers from square D to A.
Now you know the last way how you can solve a magic square. Grade 3 does not like a square of single parity the most. And this is not surprising, of all the presented it is the most difficult.
Output
After reading this article, you learned how to solve a magic square. Grade 3 (Moro - the author of the textbook) offers similar tasks with only a few filled cells. It makes no sense to consider his examples, since knowing all three methods, you can easily solve all the proposed tasks.