Magic squares are grids of numbers arranged such that the sums of each row, column and diagonal are equal. Historically, the first magic square appeared on the back of a divine tortoise in ancient China. Magic squares have been used for protection, fortune telling and medicine. There are a finite number of unique magic squares depending on size, with more complex types including panmagic, compact, and associative magic squares. Magic squares have applications in mathematics, physics, puzzles and more.