# How to Solve a Magic Square ?

## How to Solve a Magic Square

- A magic square is a square array of numbers consisting of the distinct positive integers 1, 2, ..., arranged.
- The sum of the numbers in any horizontal, vertical, or main diagonal line is always the same number known as the Magic Constant.
- The magic constant of a normal magic square depends only on n and has the following value:
- M = n(n^2+1)/2

How to Solve a Magic Square