A square number, often called a perfect square, is an integer produced when an integer is multiplied by itself. In algebraic notation the square of n is written as n^2 and spoken as "n squared"; this use of repeated multiplication is a simple case of exponentiation. The term "square" reflects the geometric interpretation: n^2 counts the unit squares in an n-by-n square array.

Examples and notation

Small square numbers form a familiar sequence: 1, 4, 9, 16, 25, 36, 49, .... Each term equals k^2 for some integer k (for example 7^2 = 49). When a non-negative number is a square its positive square root is an integer, so √25 = 5 and √9 = 3.

Basic properties

  • Squares are non-negative in the usual integer sense: n^2 ≥ 0 for every integer n.
  • Being a square is equivalent to having an integer square root.
  • The differences between consecutive squares are consecutive odd numbers: (n+1)^2 − n^2 = 2n + 1.
  • The sum of the first n odd numbers equals n^2, and the sum of the first n squares has the closed form n(n+1)(2n+1)/6.
  • In modular arithmetic squares have restricted residues; for example any integer square is congruent to 0 or 1 modulo 4, which helps rule out solutions to some equations.

Other notable observations include patterns in base 10 endings (a square can end only in 0,1,4,5,6 or 9) and the fact that prime factorization of a square has every prime appearing to an even exponent. Numbers without any square factors greater than 1 are called squarefree and form an important complementary concept.

History, geometry and applications

The name and many early studies of square numbers come from geometric arrangements of points and area, where counting unit squares in a grid gives a natural model. Square numbers appear throughout number theory, algebra and combinatorics: they are central to Pythagorean triples, quadratic residues, solutions of Diophantine equations and integer quadratic forms. In applied contexts perfect squares matter in algorithm design, hashing, and when detecting or eliminating quadratic structure in data.

Because of their simple structure and many useful tests (digit patterns, parity of exponents in prime factorization, modular constraints), square numbers remain one of the most elementary and frequently used concepts in arithmetic and number theory.