The term perfect square is used in mathematics in two meanings:
  • a positive integer which is the square of some other integer, i.e. can be written in the form n2 for some integer n. See square number.
  • an algebraic expression that can be factored as the square of some other expression, e.g. a2 ± 2ab + b2 = (a ± b)2.

This is not the same as a magic square.