In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, a square is the result of
multiplying a
number
A number is a mathematical object used to count, measure, and label. The most basic examples are the natural numbers 1, 2, 3, 4, and so forth. Numbers can be represented in language with number words. More universally, individual numbers can ...
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, wh ...
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 language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s or
plain text
In computing, plain text is a loose term for data (e.g. file contents) that represent only characters of readable material but not its graphical representation nor other objects ( floating-point numbers, images, etc.). It may also include a lim ...
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
An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
may also be called a ''
square number'' or a ''perfect square''. In
algebra
Algebra is a branch of mathematics that deals with abstract systems, known as algebraic structures, and the manipulation of expressions within those systems. It is a generalization of arithmetic that introduces variables and algebraic ope ...
, the operation of squaring is often generalized to
polynomial
In mathematics, a polynomial is a Expression (mathematics), mathematical expression consisting of indeterminate (variable), indeterminates (also called variable (mathematics), variables) and coefficients, that involves only the operations of addit ...
s, 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 an element , denoted , is the element that when added to , yields the additive identity, 0 (zero). In the most familiar cases, this is the number 0, but it can also refer to a more generalized zero el ...
. That is, the square function satisfies the identity . This can also be expressed by saying that the square function is an
even function.
In real numbers
The squaring operation defines a
real function
In mathematical analysis, and applications in geometry, applied mathematics, engineering, and natural sciences, a function of a real variable is a function whose domain is the real numbers \mathbb, or a subset of \mathbb that contains an inter ...
called the or the . Its
domain is the whole
real line
A number line is a graphical representation of a straight line that serves as spatial representation of numbers, usually graduated like a ruler with a particular origin (geometry), origin point representing the number zero and evenly spaced mark ...
, and its
image
An image or picture is a visual representation. An image can be Two-dimensional space, two-dimensional, such as a drawing, painting, or photograph, or Three-dimensional space, three-dimensional, such as a carving or sculpture. Images may be di ...
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
In mathematics, a monotonic function (or monotone function) is a function between ordered sets that preserves or reverses the given order. This concept first arose in calculus, and was later generalized to the more abstract setting of or ...
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 the set (mathematics), set of all real numbers lying between two fixed endpoints with no "gaps". Each endpoint is either a real number or positive or negative infinity, indicating the interval extends without ...
. This implies that the square of an integer is never less than the original number .
Every positive
real number
In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
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
In mathematics, a square root of a number is a number such that y^2 = x; in other words, a number whose ''square'' (the result of multiplying the number by itself, or y \cdot y) is . For example, 4 and −4 are square roots of 16 because 4 ...
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 number
In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s, 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 number
In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the for ...
s, by postulating the
imaginary unit
The imaginary unit or unit imaginary number () is a mathematical constant that is a solution to the quadratic equation Although there is no real number with this property, can be used to extend the real numbers to what are called complex num ...
, 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
In mathematics, a real closed field is a field F that has the same first-order properties as the field of real numbers. Some examples are the field of real numbers, the field of real algebraic numbers, and the field of hyperreal numbers.
Def ...
, which is an
ordered field
In mathematics, an ordered field is a field together with a total ordering of its elements that is compatible with the field operations. Basic examples of ordered fields are the rational numbers and the real numbers, both with their standard ord ...
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
Area is the measure of a region's size on a surface. The area of a plane region or ''plane area'' refers to the area of a shape or planar lamina, while '' surface area'' refers to the area of an open surface or the boundary of a three-di ...
: it comes from the fact that the area of a
square
In geometry, a square is a regular polygon, regular quadrilateral. It has four straight sides of equal length and four equal angles. Squares are special cases of rectangles, which have four equal angles, and of rhombuses, which have four equal si ...
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
A sphere (from Ancient Greek, Greek , ) is a surface (mathematics), surface analogous to the circle, a curve. In solid geometry, a sphere is the Locus (mathematics), set of points that are all at the same distance from a given point in three ...
is proportional to the square of its radius, a fact that is manifested physically by the
inverse-square law describing how the strength of physical forces such as gravity varies according to distance.
The square function is related to
distance
Distance is a numerical or occasionally qualitative measurement of how far apart objects, points, people, or ideas are. In physics or everyday usage, distance may refer to a physical length or an estimation based on other criteria (e.g. "two co ...
through the
Pythagorean theorem and its generalization, the
parallelogram law.
Euclidean distance is not a
smooth function: 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
In geometry, a paraboloid is a quadric surface that has exactly one axial symmetry, axis of symmetry and no central symmetry, center of symmetry. The term "paraboloid" is derived from parabola, which refers to a conic section that has a similar p ...
as its graph, is a smooth and
analytic function
In mathematics, an analytic function is a function that is locally given by a convergent power series. There exist both real analytic functions and complex analytic functions. Functions of each type are infinitely differentiable, but complex ...
.
The
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
of a
Euclidean vector
In mathematics, physics, and engineering, a Euclidean vector or simply a vector (sometimes called a geometric vector or spatial vector) is a geometric object that has magnitude (or length) and direction. Euclidean vectors can be added and scal ...
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 t ...
s in
linear spaces via the
inner product
In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, ofte ...
. The
inertia tensor in
mechanics
Mechanics () is the area of physics concerned with the relationships between force, matter, and motion among Physical object, physical objects. Forces applied to objects may result in Displacement (vector), displacements, which are changes of ...
is an example of a quadratic form. It demonstrates a quadratic relation of the
moment of inertia to the size (
length
Length is a measure of distance. In the International System of Quantities, length is a quantity with Dimension (physical quantity), dimension distance. In most systems of measurement a Base unit (measurement), base unit for length is chosen, ...
).
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 root
In mathematics, a square root of a number is a number such that y^2 = x; in other words, a number whose ''square'' (the result of multiplying the number by itself, or y \cdot y) is . For example, 4 and −4 are square roots of 16 because 4 ...
s''.
The notion of squaring is particularly important in the
finite field
In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field (mathematics), field that contains a finite number of Element (mathematics), elements. As with any field, a finite field is a Set (mathematics), s ...
s Z/''p''Z formed by the numbers modulo an odd
prime number
A prime number (or a prime) is a natural number greater than 1 that is not a Product (mathematics), product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime ...
. A non-zero element of this field is called a
quadratic residue
In number theory, an integer ''q'' is a quadratic residue modulo operation, modulo ''n'' if it is Congruence relation, congruent to a Square number, perfect square modulo ''n''; that is, if there exists an integer ''x'' such that
:x^2\equiv q \pm ...
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
Number theory is a branch of pure mathematics devoted primarily to the study of the integers and arithmetic functions. Number theorists study prime numbers as well as the properties of mathematical objects constructed from integers (for example ...
.
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 (mathematics), 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 prope ...
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 which uses abstract algebraic techniques, mainly from commutative algebra, to solve geometry, geometrical problems. Classically, it studies zero of a function, zeros of multivariate polynomials; th ...
, 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 domain
In mathematics, an integral domain is a nonzero commutative ring in which the product of any two nonzero elements is nonzero. Integral domains are generalizations of the ring of integers and provide a natural setting for studying divisibilit ...
s. However,
the ring of the integers
modulo
In computing and mathematics, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another, the latter being called the '' modulus'' of the operation.
Given two positive numbers and , mo ...
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
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
is the ring whose elements are
binary number
A binary number is a number expressed in the Radix, base-2 numeral system or binary numeral system, a method for representing numbers that uses only two symbols for the natural numbers: typically "0" (zero) and "1" (one). A ''binary number'' may ...
s, with
bitwise AND as the multiplication operation and bitwise XOR as the addition operation.
In a
totally ordered ring, 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 t ...
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 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. The algebra of quater ...
s by doubling. The doubling method was formalized by
A. A. Albert who started with the
real number
In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
field and the square function, doubling it to obtain the
complex number
In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the for ...
field with quadratic form , and then doubling again to obtain quaternions. The doubling procedure is called the
Cayley–Dickson construction
In mathematics, the Cayley–Dickson construction, sometimes also known as the Cayley–Dickson process or the Cayley–Dickson procedure produces a sequence of algebra over a field, algebras over the field (mathematics), field of real numbers, eac ...
, 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
On
complex number
In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the for ...
s, the square function
is a twofold
cover in the sense that each non-zero complex number has exactly two square roots.
The square of the
absolute value
In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if x is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), ...
of a complex number is called its absolute square, squared modulus, or squared magnitude.
It is the product of the complex number with its
complex conjugate, and equals the sum of the squares of the real and imaginary parts of the complex number.
The absolute square of a complex number is always a nonnegative real number, that is zero if and only if the complex number is zero. It is easier to compute than the absolute value (no square root), and is a
smooth real-valued function. Because of these two properties, the absolute square is often preferred to the absolute value for explicit computations and when methods of
mathematical analysis
Analysis is the branch of mathematics dealing with continuous functions, limit (mathematics), limits, and related theories, such as Derivative, differentiation, Integral, integration, measure (mathematics), measure, infinite sequences, series ( ...
are involved (for example
optimization
Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criteria, from some set of available alternatives. It is generally divided into two subfiel ...
or
integration).
For
complex vectors, the dot product can be defined involving the
conjugate transpose, leading to the ''
squared norm''.
Other uses
Squares are ubiquitous in algebra, more generally, in almost every branch of mathematics, and also in
physics
Physics is the scientific study of matter, its Elementary particle, fundamental constituents, its motion and behavior through space and time, and the related entities of energy and force. "Physical science is that department of knowledge whi ...
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
Statistics (from German language, German: ', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a s ...
and
probability theory
Probability theory or probability calculus is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expre ...
in determining the
standard deviation
In statistics, the standard deviation is a measure of the amount of variation of the values of a variable about its Expected value, mean. A low standard Deviation (statistics), deviation indicates that the values tend to be close to the mean ( ...
of a set of values, or a
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a Mathematics, mathematical formalization of a quantity or object which depends on randomness, random events. The term 'random variable' in its mathema ...
. The deviation of each value from the
mean
A mean is a quantity representing the "center" of a collection of numbers and is intermediate to the extreme values of the set of numbers. There are several kinds of means (or "measures of central tendency") in mathematics, especially in statist ...
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
In probability theory and statistics, variance is the expected value of the squared deviation from the mean of a random variable. The standard deviation (SD) is obtained as the square root of the variance. Variance is a measure of dispersion ...
, and its square root is the standard deviation.
See also
*
Cube (algebra)
In arithmetic and algebra, the cube of a number is its third exponentiation, power, that is, the result of multiplying three instances of together.
The cube of a number is denoted , using a superscript 3, for example . The cube Mathematical ...
*
Euclidean distance
*
Exponentiation by squaring
*
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 ...
s
*
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 ...
*
Polynomial ring
In mathematics, especially in the field of algebra, a polynomial ring or polynomial algebra is a ring formed from the set of polynomials in one or more indeterminates (traditionally also called variables) with coefficients in another ring, ...
*
Polynomial SOS, the representation of a non-negative polynomial as the sum of squares of polynomials
*
Quadratic equation
In mathematics, a quadratic equation () is an equation that can be rearranged in standard form as
ax^2 + bx + c = 0\,,
where the variable (mathematics), variable represents an unknown number, and , , and represent known numbers, where . (If and ...
*
Square-free polynomial
*
Sums of squares (disambiguation page with various relevant links)
Related identities
; Algebraic
(need a commutative ring
In mathematics, a commutative ring is a Ring (mathematics), 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 prope ...
):
*
Brahmagupta–Fibonacci identity, related to complex numbers
in the sense discussed above
*
Degen's eight-square identity, related to
octonions in the same way
*
Difference of two squares
*
Euler's four-square identity, 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. The algebra of quater ...
s in the same way
*
Lagrange's identity
; Other
*
Parseval's identity
*
Pythagorean trigonometric identity
Related physical quantities
*
acceleration
In mechanics, acceleration is the Rate (mathematics), rate of change of the velocity of an object with respect to time. Acceleration is one of several components of kinematics, the study of motion. Accelerations are Euclidean vector, vector ...
, length per square time
*
coupling constant (has square charge in the denominator, and may be expressed with square distance in the numerator)
*
cross section (physics)
In physics, the cross section is a measure of the probability that a specific process will take place in a collision of two particles. For example, the Rutherford cross-section is a measure of probability that an alpha particle will be deflec ...
, an area-dimensioned quantity
*
kinetic energy
In physics, the kinetic energy of an object is the form of energy that it possesses due to its motion.
In classical mechanics, the kinetic energy of a non-rotating object of mass ''m'' traveling at a speed ''v'' is \fracmv^2.Resnick, Rober ...
(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
Cambridge University Press was the university press of the University of Cambridge. Granted a letters patent by King Henry VIII in 1534, it was the oldest university press in the world. Cambridge University Press merged with Cambridge Assessme ...
, year=1993 , isbn=0-521-42668-5 , zbl=0785.11022
Algebra
Elementary arithmetic
2
Squares in number theory
Unary operations