5⋅5, or
5^{2} (5 squared), can be shown graphically using a
square. Each block represents one unit,
1⋅1, and the entire square represents
5⋅5, or the area of the square.
In mathematics, a square is the result of multiplying a number by itself. The verb "to square" is used to denote this operation. Squaring is the same as raising to the power 2, and is denoted by a superscript 2; for instance, the square of 3 may be written as 3^{2}, which is the number 9. In some cases when superscripts are not available, as for instance in programming languages or plain text files, the notations x^2 or x**2 may be used in place of x^{2}.
The adjective which corresponds to squaring is quadratic.
The square of an integer may also be called a square number or a perfect square. In algebra, the operation of squaring is often generalized to polynomials, other expressions, or values in systems of mathematical values other than the numbers. For instance, the square of the linear polynomial x + 1 is the quadratic polynomial x^{2} + 2x + 1.
One of the important properties of squaring, for numbers as well as in many other mathematical systems, is that (for all numbers x), the square of x is the same as the square of its additive inverse −x. That is, the square function satisfies the identity x^{2} = (−x)^{2}. This can also be expressed by saying that the squaring function is an even function.
In real numbers
The squaring function preserves the order of positive numbers: larger numbers have larger squares. In other words, squaring is a monotonic function on the interval [0, +∞). On the negative numbers, numbers with greater absolute value have greater squares, so squaring is a monotonically decreasing function on (−∞,0]. Hence, zero is its global minimum. The only cases where the square x^{2} of a number is less than x occur when 0 < x < 1, that is, when x belongs to an open interval (0,1). This implies that the square of an integer is never less than the original number.
Every positive real number is the square of exactly two numbers, one of which is strictly positive and the other of which is strictly negative. Zero is the square of only one number, itself. For this reason, it is possible to define the square root function, which associates with a nonnegative real number the nonnegative number whose square is the original number.
No square root can be taken of a negative number within the system of real numbers, because squares of all real numbers are nonnegative. The lack of real square roots for the negative numbers can be used to expand the real number system to the complex numbers, by postulating the imaginary unit i, which is one of the square roots of −1.
The property "every non negative real number is a square" has been generalized to the notion of a real closed field, which is an ordered field such that every non negative element is a square. The real closed fields can not be distinguished from the field of real numbers by their algebraic properties: every property of the real numbers, which may be expressed in firstorder logic (that is expressed by a formula in which the variables that are quantified by ∀ or ∃ represent elements, not sets), is true for every real closed field, and conversely every property of the firstorder logic, which is true for a specific real closed field is also true for the real numbers.
In geometry
There are several major uses of the squaring function in geometry.
The name of the squaring function shows its importance in the definition of the area: it comes from the fact that the area of a square with sides of length l is equal to l^{2}. The area depends quadratically on the size: the area of a shape n times larger is n^{2} times greater. This holds for areas in three dimensions as well as in the plane: for instance, the surface area of a sphere is proportional to the square of its radius, a fact that is manifested physically by the inversesquare law describing how the strength of physical forces such as gravity varies according to distance.
The squaring function is related to distance through the Pythagorean theorem and its generalization, the parallelogram law. Euclidean distance is not a smooth function: the threedimensional graph of distance from a fixed point forms a cone, with a nonsmooth point at the tip of the cone. However, the square of the distance (denoted d^{2} or r^{2}), which has a paraboloid as its graph, is a smooth and analytic function. The dot product of a Euclidean vector with itself is equal to the square of its length: v⋅v = v^{2}. This is further generalised to quadratic forms in linear spaces. The inertia tensor in mechanics is an example of a quadratic form. It demonstrates a quadratic relation of the moment of inertia to the size (length).
In abstract algebra and number theory
The squaring function is defined in any field or ring. An element in the image of this function is called a square, and the inverse images of a square are called square roots.
The notion of squaring is particularly important in the finite fields Z/pZ formed by the numbers modulo an odd prime number p. A nonzero element of this field is called a quadratic residue if it is a square in Z/pZ, and otherwise, it is called a quadratic nonresidue. Zero, while a square, is not considered to be a quadratic residue. Every finite field of this type has exactly (p − 1)/2 quadratic residues and exactly (p − 1)/2 quadratic nonresidues. The quadratic residues form a group under multiplication. The properties of quadratic residues are widely used in number theory.
More generally, in rings, the squaring function may have different properties that are sometimes used to classify rings.
Zero may be the square of some nonzero elements. A commutative ring such that the square of a non zero element is never zero is called a reduced ring. More generally, in a commutative ring, a radical ideal is an ideal I such that x^2 \in I implies x \in I. Both notions are important in algebraic geometry, because of Hilbert's Nullstellensatz.
An element of a ring that is equal to its own square is called an idempotent. In any ring, 0 and 1 are idempotents. There are no other idempotents in fields and more generally in integral domains. However, the ring of the integers modulo n has 2^{k} idempotents, where k is the number of distinct prime factors of n. A commutative ring in which every element is equal to its square (every element is idempotent) is called a Boolean ring; an example from computer science is the ring whose elements are binary numbers, with bitwise AND as the multiplication operation and bitwise XOR as the addition operation.
In a supercommutative algebra (away from 2), the square of any odd element equals to zero.
In complex numbers and related algebras over the reals
The complex square function z^{2} is a twofold cover of the complex plane, such that each nonzero complex number has exactly two square roots. This map is related to parabolic coordinates.
Another, more well known, function is the square of the absolute value  z ^{2} = z z, which is realvalued. It is very important for quantum mechanics: see probability amplitude and Born rule. Complex numbers form one of four possible Euclidean Hurwitz algebras that are defined with a real quadratic form q; here q(z) =  z ^{2}. In a Euclidean Hurwitz algebra this q equals to the square of the distance to 0 discussed above, and the absolute value  z  can be defined as the (arithmetical) square root of q(z). Multiplicativity of q in these algebras explains (or relies upon) certain algebraic identities (see below).
Other uses
Squares are ubiquitous in algebra, more generally, in almost every branch of mathematics, and also in physics where many units are defined using squares and inverse squares: see below.
Least squares is the standard method used with overdetermined systems.
Squaring is used in statistics and probability theory in determining the standard deviation of a set of values, or a random variable. The deviation of each value x_{i} from the mean \overline{x} of the set is defined as the difference x_i  \overline{x}. These deviations are squared, then a mean is taken of the new set of numbers (each of which is positive). This mean is the variance, and its square root is the standard deviation. In finance, the volatility of a financial instrument is the standard deviation of its values.
See also
Related identities

Algebraic (need a commutative ring)

Other
Related physical quantities
Further reading

Marshall, Murray Positive polynomials and sums of squares. Mathematical Surveys and Monographs, 146. American Mathematical Society, Providence, RI, 2008. xii+187 pp. ISBN 9780821844021, ISBN 0821844024

Rajwade, A. R. (1993). Squares. London Mathematical Society Lecture Note Series 171.
This article was sourced from Creative Commons AttributionShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, EGovernment Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a nonprofit organization.