# How does the magic square work?

This mystery quickly spread throughout the Internet. Thousands of people began to wonder how the magic square works. Today you will finally find the answer!

## Mystery of the magic square

In fact, this mystery is quite simple and made with the expectation of human inattention. Let's see how the magic black square works, with a real example:

- Let's make any number from 10 to 19. Now let's subtract its component numbers from a given number. For example, we take 11. We subtract from 11 units and after - one more unit. Will be released 9. Actually, it doesn't matter what number from 10 to 19 you will take. The result of the calculations will always be 9. The number 9 in the "Magic Square" corresponds to the first digit with the figures. If you look closely, you can see that a very large number of digits are assigned the same pictures.
- What will happen if we take a number between 20 and 29? Maybe you already guessed it? Correctly! The result of the calculations will always be 18. The number 18 corresponds to the second position on the diagonal with figures.
- If we take the number from 30 to 39, then, as you can already guess, the number 27 will come out. The number 27 also corresponds to the number on the diagonal of the so inexplicable Magic Square.
- Such an algorithm remains true for any numbers from 40 to 49, from 50 to 59, and so on.

That is, it turns out that no matter what number you thought of - the “Magic Square” guesses the result, because the same symbol is actually in the cells numbered 9, 18, 27, 36, 45, 54, 63, 72 and 81 .

In fact, this riddle can be easily explained using a simple equation:

- Imagine any two-digit number. Regardless of the number, it can be represented as x * 10 + y. Dozens appear as “x”, and units as “y”.
- Subtract from the hidden number the numbers that make it up. We add the equation: (x * 10 + y) - (x + y) = 9 * x.
- The number that came out as a result of the calculations should indicate a particular character in the table.

No matter what the number will be in the role of “x”, one way or another, you will receive a character whose number will be a multiple of nine. In order to make sure that there is one character under different numbers, it is enough just to look at the table and the numbers 0.9,18,27,45,54,63,72,81 and subsequent ones.