In
mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, a square is the result of
multiplying
Multiplication (often denoted by the cross symbol , by the mid-line dot operator , by juxtaposition, or, on computers, by an asterisk ) is one of the four elementary mathematical operations of arithmetic, with the other ones being addition ...
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
A subscript or superscript is a character (such as a number or letter) that is set slightly below or above the normal line of type, respectively. It is usually smaller than the rest of the text. Subscripts appear at or below the baseline, whil ...
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 (
caret) 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 is the
quadratic polynomial .
One of the important properties of squaring, for numbers as well as in many other mathematical systems, is that (for all numbers ), the square of is the same as the square of its
additive inverse
In mathematics, the additive inverse of a number is the number that, when added to , yields zero. This number is also known as the opposite (number), sign change, and negation. For a real number, it reverses its sign: the additive inverse (opp ...
. That is, the square function satisfies the identity . This can also be expressed by saying that the square function is an
even function
In mathematics, even functions and odd functions are functions which satisfy particular symmetry relations, with respect to taking additive inverses. They are important in many areas of mathematical analysis, especially the theory of power seri ...
.
In real numbers
The squaring operation defines a
real function called the or the . Its
domain
Domain may refer to:
Mathematics
*Domain of a function, the set of input values for which the (total) function is defined
**Domain of definition of a partial function
**Natural domain of a partial function
**Domain of holomorphy of a function
* Do ...
is the whole
real line
In elementary mathematics, a number line is a picture of a graduated straight line (geometry), line that serves as visual representation of the real numbers. Every point of a number line is assumed to correspond to a real number, and every real ...
, and its
image
An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensiona ...
is the set of nonnegative real numbers.
The square function preserves the order of positive numbers: larger numbers have larger squares. In other words, the square is a
monotonic function on the interval . On the negative numbers, numbers with greater absolute value have greater squares, so the square is a monotonically decreasing function on . Hence,
zero is the (global)
minimum of the square function.
The square of a number is less than (that is ) if and only if , that is, if belongs to the
open interval
In mathematics, a (real) interval is a set of real numbers that contains all real numbers lying between any two numbers of the set. For example, the set of numbers satisfying is an interval which contains , , and all numbers in between. Other ...
. 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 non-negative real number the non-negative 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
non-negative. 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 , 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 and every polynomial of odd degree has a root. The real closed fields cannot be distinguished from the field of real numbers by their algebraic properties: every property of the real numbers, which may be expressed in
first-order 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 first-order 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 square function in geometry.
The name of the square 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 is equal to . The area depends quadratically on the size: the area of a shape times larger is 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
inverse-square law
In science, an inverse-square law is any scientific law stating that a specified physical quantity is inversely proportional to the square of the distance from the source of that physical quantity. The fundamental cause for this can be understo ...
describing how the strength of physical forces such as gravity varies according to distance.
The square function is related to
distance through the
Pythagorean theorem
In mathematics, the Pythagorean theorem or Pythagoras' theorem is a fundamental relation in Euclidean geometry between the three sides of a right triangle. It states that the area of the square whose side is the hypotenuse (the side opposite t ...
and its generalization, the
parallelogram law.
Euclidean distance is not a
smooth function
In mathematical analysis, the smoothness of a function (mathematics), function is a property measured by the number of Continuous function, continuous Derivative (mathematics), derivatives it has over some domain, called ''differentiability cl ...
: the
three-dimensional graph of distance from a fixed point forms a
cone, with a non-smooth point at the tip of the cone. However, the square of the distance (denoted or ), 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: . This is further generalised to
quadratic form
In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example,
:4x^2 + 2xy - 3y^2
is a quadratic form in the variables and . The coefficients usually belong to a ...
s in
linear spaces via the
inner product. The
inertia tensor
The moment of inertia, otherwise known as the mass moment of inertia, angular mass, second moment of mass, or most accurately, rotational inertia, of a rigid body is a quantity that determines the torque needed for a desired angular acceler ...
in
mechanics is an example of a quadratic form. It demonstrates a quadratic relation of the
moment of inertia
The moment of inertia, otherwise known as the mass moment of inertia, angular mass, second moment of mass, or most accurately, rotational inertia, of a rigid body is a quantity that determines the torque needed for a desired angular acceler ...
to the size (
length
Length is a measure of distance. In the International System of Quantities, length is a quantity with dimension distance. In most systems of measurement a base unit for length is chosen, from which all other units are derived. In the Interna ...
).
There are infinitely many
Pythagorean triples, sets of three positive integers such that the sum of the squares of the first two equals the square of the third. Each of these triples gives the integer sides of a right triangle.
In abstract algebra and number theory
The square 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/''p''Z formed by the numbers modulo an odd
prime number . A non-zero element of this field is called a
quadratic residue
In number theory, an integer ''q'' is called a quadratic residue modulo ''n'' if it is congruent to a perfect square modulo ''n''; i.e., if there exists an integer ''x'' such that:
:x^2\equiv q \pmod.
Otherwise, ''q'' is called a quadratic no ...
if it is a square in Z/''p''Z, and otherwise, it is called a quadratic non-residue. Zero, while a square, is not considered to be a quadratic residue. Every finite field of this type has exactly quadratic residues and exactly quadratic non-residues. The quadratic residues form a
group under multiplication. The properties of quadratic residues are widely used in
number theory.
More generally, in rings, the square function may have different properties that are sometimes used to classify rings.
Zero may be the square of some non-zero elements. A
commutative ring
In mathematics, a commutative ring is a ring in which the multiplication operation is commutative. The study of commutative rings is called commutative algebra. Complementarily, noncommutative algebra is the study of ring properties that are not sp ...
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 such that
implies
. Both notions are important in
algebraic geometry
Algebraic geometry is a branch of mathematics, classically studying zeros of multivariate polynomials. Modern algebraic geometry is based on the use of abstract algebraic techniques, mainly from commutative algebra, for solving geometrical ...
, 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
In computing, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another (called the '' modulus'' of the operation).
Given two positive numbers and , modulo (often abbreviated as ) is t ...
has idempotents, where is the number of distinct
prime factors of .
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 number
A binary number is a number expressed in the base-2 numeral system or binary numeral system, a method of mathematical expression which uses only two symbols: typically "0" (zero) and "1" ( one).
The base-2 numeral system is a positional notatio ...
s, with
bitwise AND as the multiplication operation and bitwise XOR as the addition operation.
In a
totally ordered ring
In abstract algebra, an ordered ring is a (usually commutative) ring ''R'' with a total order ≤ such that for all ''a'', ''b'', and ''c'' in ''R'':
* if ''a'' ≤ ''b'' then ''a'' + ''c'' ≤ ''b'' + ''c''.
* if 0 ≤ ''a'' and 0 ≤ ''b'' then ...
, for any . Moreover, if and only if .
In a
supercommutative algebra where 2 is invertible, the square of any ''odd'' element equals zero.
If ''A'' is a
commutative semigroup, then one has
:
In the language of
quadratic form
In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example,
:4x^2 + 2xy - 3y^2
is a quadratic form in the variables and . The coefficients usually belong to a ...
s, this equality says that the square function is a "form permitting composition". In fact, the square function is the foundation upon which other quadratic forms are constructed which also permit composition. The procedure was introduced by
L. E. Dickson
Leonard Eugene Dickson (January 22, 1874 – January 17, 1954) was an American mathematician. He was one of the first American researchers in abstract algebra, in particular the theory of finite fields and classical groups, and is also remem ...
to produce the
octonions out of
quaternion
In mathematics, the quaternion number system extends the complex numbers. Quaternions were first described by the Irish mathematician William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space. Hamilton defined a quatern ...
s by doubling. The doubling method was formalized by
A. A. Albert
Abraham Adrian Albert (November 9, 1905 – June 6, 1972) was an American mathematician. In 1939, he received the American Mathematical Society's Cole Prize in Algebra for his work on Riemann matrices. He is best known for his work on the ...
who started with the
real number field ℝ and the square function, doubling it to obtain the
complex number field with quadratic form , and then doubling again to obtain quaternions. The doubling procedure is called the
Cayley–Dickson construction, and has been generalized to form algebras of dimension 2
n over a field ''F'' with involution.
The square function ''z''
2 is the "norm" of the
composition algebra ℂ, where the identity function forms a trivial involution to begin the Cayley–Dickson constructions leading to bicomplex, biquaternion, and bioctonion composition algebras.
In complex numbers and related algebras over the reals
The ordinary
complex square function is a twofold cover of the
complex plane
In mathematics, the complex plane is the plane formed by the complex numbers, with a Cartesian coordinate system such that the -axis, called the real axis, is formed by the real numbers, and the -axis, called the imaginary axis, is formed by the ...
, such that each non-zero complex number has exactly two square roots. This map is related to
parabolic coordinates
Parabolic coordinates are a two-dimensional orthogonal coordinate system in which the coordinate lines are confocal parabolas. A three-dimensional version of parabolic coordinates is obtained by rotating the two-dimensional system about the symme ...
.
The absolute square of a complex number is the product involving its
complex conjugate.
It is also known as modulus squared or magnitude squared, after the
real-value square of the
complex-number modulus (
magnitude or absolute value), .
It equals the sum of real-valued squares of the complex number's
real and imaginary parts,
.
It can be generalized to complex-valued vectors as the ''
norm squared
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an algebra ...
''.
The squared modulus is applied in
signal processing, to relate the
Fourier transform
A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
and the
power spectrum, and also in
quantum mechanics, relating
probability amplitudes and
probability densities.
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
Inverse or invert may refer to:
Science and mathematics
* Inverse (logic), a type of conditional sentence which is an immediate inference made from another conditional sentence
* Additive inverse (negation), the inverse of a number that, when ad ...
squares: see
below
Below may refer to:
*Earth
*Ground (disambiguation)
*Soil
*Floor
*Bottom (disambiguation)
Bottom may refer to:
Anatomy and sex
* Bottom (BDSM), the partner in a BDSM who takes the passive, receiving, or obedient role, to that of the top or ...
.
Least squares
The method of least squares is a standard approach in regression analysis to approximate the solution of overdetermined systems (sets of equations in which there are more equations than unknowns) by minimizing the sum of the squares of the res ...
is the standard method used with
overdetermined systems.
Squaring is used in
statistics
Statistics (from German language, German: ''wikt:Statistik#German, Statistik'', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of ...
and
probability theory in determining the
standard deviation
In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while ...
of a set of values, or a
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the po ...
. The deviation of each value from the
mean of the set is defined as the difference
. 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
Finance is the study and discipline of money, currency and capital assets. It is related to, but not synonymous with economics, the study of production, distribution, and consumption of money, assets, goods and services (the discipline of fina ...
, the
volatility of a financial instrument is the standard deviation of its values.
See also
*
Exponentiation by squaring
*
Polynomial SOS, the representation of a non-negative polynomial as the sum of squares of polynomials
*
Hilbert's seventeenth problem, for the representation of
positive polynomials as a sum of squares of
rational function
In mathematics, a rational function is any function that can be defined by a rational fraction, which is an algebraic fraction such that both the numerator and the denominator are polynomials. The coefficients of the polynomials need not be rat ...
s
*
Square-free polynomial
*
Cube (algebra)
*
Metric tensor
In the mathematical field of differential geometry, a metric tensor (or simply metric) is an additional structure on a manifold (such as a surface) that allows defining distances and angles, just as the inner product on a Euclidean space allows ...
*
Quadratic equation
*
Polynomial ring
*
Sums of squares (disambiguation page with various relevant links)
Related identities
; Algebraic
(need a commutative ring
In mathematics, a commutative ring is a ring in which the multiplication operation is commutative. The study of commutative rings is called commutative algebra. Complementarily, noncommutative algebra is the study of ring properties that are not sp ...
):
*
Difference of two squares
*
Brahmagupta–Fibonacci identity, related to complex numbers
in the sense discussed above
*
Euler's four-square identity
In mathematics, Euler's four-square identity says that the product of two numbers, each of which is a sum of four square (algebra), squares, is itself a sum of four squares.
Algebraic identity
For any pair of quadruples from a commutative ring, th ...
, related to
quaternion
In mathematics, the quaternion number system extends the complex numbers. Quaternions were first described by the Irish mathematician William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space. Hamilton defined a quatern ...
s in the same way
*
Degen's eight-square identity In mathematics, Degen's eight-square identity establishes that the product of two numbers, each of which is a sum of eight squares, is itself the sum of eight squares.
Namely:
\begin
& \left(a_1^2+a_2^2+a_3^2+a_4^2+a_5^2+a_6^2+a_7^2+a_8^2\right)\lef ...
, related to
octonions in the same way
*
Lagrange's identity
; Other
*
Pythagorean trigonometric identity
The Pythagorean trigonometric identity, also called simply the Pythagorean identity, is an identity expressing the Pythagorean theorem in terms of trigonometric functions. Along with the sum-of-angles formulae, it is one of the basic relations b ...
*
Parseval's identity
Related physical quantities
*
acceleration, length per square time
*
cross section (physics), an area-dimensioned quantity
*
coupling constant
In physics, a coupling constant or gauge coupling parameter (or, more simply, a coupling), is a number that determines the strength of the force exerted in an interaction. Originally, the coupling constant related the force acting between two ...
(has square charge in the denominator, and may be expressed with square distance in the numerator)
*
kinetic energy (quadratic dependence on velocity)
*
specific energy, a (square velocity)-dimensioned quantity
Footnotes
Further reading
* Marshall, Murray Positive polynomials and sums of squares. Mathematical Surveys and Monographs, 146. American Mathematical Society, Providence, RI, 2008. xii+187 pp. ,
* {{cite book , title=Squares , volume=171 , series=London Mathematical Society Lecture Note Series , first=A. R. , last=Rajwade , publisher=
Cambridge University Press , year=1993 , isbn=0-521-42668-5 , zbl=0785.11022
Algebra
Elementary arithmetic
2
Squares in number theory
Unary operations