Perfect Square
ArithmeticA perfect square is an integer that is the product of some integer multiplied by itself.
Formula
n^2 = n \times n
Definition
A perfect square is a number you get when you multiply a whole number by itself. The result can be arranged as a square of dots.
Example
$9$ is a perfect square because $3 \times 3 = 9$. Other perfect squares: $1, 4, 9, 16, 25, 36, 49, 64, 81, 100$.
Key Insight
You can picture perfect squares as square arrays: $16$ dots can form a $4\times4$ grid. If you cannot make a perfect square array, the number is not a perfect square.
Definition
A perfect square is an integer of the form $n^2$ for some non-negative integer $n$. Perfect squares have an odd number of total factors (since each factor pair shares its middle: $\sqrt{n}$). The square root of a perfect square is always a whole number.
Example
Is $225$ a perfect square? $15^2 = 225$. Yes. Is $50$ a perfect square? $\sqrt{50} = 5\sqrt{2}$, which is irrational. No.
Key Insight
Perfect squares have an odd number of factors because their square root is counted only once instead of as a pair. This is why squares have an odd number of factor pairs, unlike non-square numbers.
Definition
An integer $n \ge 0$ is a perfect square iff, in its prime factorization $n = p_1^{a_1} \cdots p_k^{a_k}$, every exponent $a_i$ is even. Equivalently, $n$ is a quadratic residue modulo every prime. Fermat's theorem on sums of two squares: a prime $p$ is a sum of two squares ($p = a^2 + b^2$) iff $p = 2$ or $p \equiv 1 \pmod 4$.
Example
$36 = 2^2 \cdot 3^2$ (all even exponents, perfect square). $72 = 2^3 \cdot 3^2$ (odd exponent on $2$, not a perfect square). $72 = 36 \cdot 2 = 6^2 \cdot 2$, so $\sqrt{72} = 6\sqrt{2}$.
Key Insight
The theory of quadratic residues (which integers are perfect squares mod $p$) is central to number theory. The Legendre symbol $\left(\frac{n}{p}\right) = +1/-1/0$ encodes this, and quadratic reciprocity (Gauss's "golden theorem") relates the symbols for different primes.