Perfect square
From Exampleproblems
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.
- Examples: 1, 4, 9, 16, 25, 36, 49, ... 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. (see Square (algebra)).
This is not the same as a magic square.
Using differences of squares as multiplication
Integer multiplication can be done entirely by a difference of two squares.
Examples:
In general, the product of two numbers is equal to the square of their average minus their difference from the average squared.
A geometric constructive "proof" of this relation is shown the following animation: Image:Rectangle to square difference2.gif
The starting rectangle is A by B. The resulting large square is length (A+B)/2, and the smaller gray square (remainder being subtracted) is length |A-B|/2.
Using this relation, you can multiply relatively large nearly equal numbers more quickly if you memorize a relatively small list of squares.
If you're multiplying an even by an odd, you can avoid "halves" by adjust one number, by requiring one more addition at the end
Example:
See also
List of perfect square between 1-10,000
JavaScript code for finding ten-digit numbers, consisting of distinct digits, that are perfect squareses:Cuadrado perfecto fr:Carré parfait sl:Popolni kvadrat zh:完全平方
