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-free polynomial is a
univariate polynomial
In mathematics, a polynomial is a mathematical expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication and exponentiation to nonnegative integer ...
(over a
field or an
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 ...
) that has no
multiple root
In mathematics, the multiplicity of a member of a multiset is the number of times it appears in the multiset. For example, the number of times a given polynomial has a root at a given point is the multiplicity of that root.
The notion of multip ...
in an
algebraically closed field
In mathematics, a field is algebraically closed if every non-constant polynomial in (the univariate polynomial ring with coefficients in ) has a root in . In other words, a field is algebraically closed if the fundamental theorem of algebra ...
containing its coefficients. In
characteristic 0, or over a
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 ...
, a univariate polynomial is square free if and only if it does not have as a
divisor
In mathematics, a divisor of an integer n, also called a factor of n, is an integer m that may be multiplied by some integer to produce n. In this case, one also says that n is a '' multiple'' of m. An integer n is divisible or evenly divisibl ...
any square of a
non-constant polynomial.
In applications in physics and engineering, a square-free polynomial is commonly called a polynomial with no repeated roots.
The
product rule
In calculus, the product rule (or Leibniz rule or Leibniz product rule) is a formula used to find the derivatives of products of two or more functions. For two functions, it may be stated in Lagrange's notation as (u \cdot v)' = u ' \cdot v ...
implies that, if divides , then divides the
formal derivative
In mathematics, the formal derivative is an operation on elements of a polynomial ring or a ring of formal power series that mimics the form of the derivative from calculus. Though they appear similar, the algebraic advantage of a formal deriv ...
of . The converse is also true and hence,
is square-free if and only if
is a
greatest common divisor
In mathematics, the greatest common divisor (GCD), also known as greatest common factor (GCF), of two or more integers, which are not all zero, is the largest positive integer that divides each of the integers. For two integers , , the greatest co ...
of the polynomial and its derivative.
A square-free decomposition or square-free factorization of a polynomial is a factorization into powers of square-free polynomials
:
where those of the that are non-constant are
pairwise coprime square-free polynomials (here, two polynomials are said ''coprime'' is their greatest common divisor is a constant; in other words that is the coprimality over the
field of fractions
In abstract algebra, the field of fractions of an integral domain is the smallest field in which it can be embedded. The construction of the field of fractions is modeled on the relationship between the integral domain of integers and the fie ...
of the coefficients that is considered).
Every non-zero polynomial admits a square-free factorization, which is unique
up to Two Mathematical object, mathematical objects and are called "equal up to an equivalence relation "
* if and are related by , that is,
* if holds, that is,
* if the equivalence classes of and with respect to are equal.
This figure of speech ...
the multiplication and division of the factors by non-zero constants. The square-free factorization is much easier to compute than the complete
factorization
In mathematics, factorization (or factorisation, see American and British English spelling differences#-ise, -ize (-isation, -ization), English spelling differences) or factoring consists of writing a number or another mathematical object as a p ...
into
irreducible factors, and is thus often preferred when the complete factorization is not really needed, as for the
partial fraction decomposition and the
symbolic integration
In calculus, symbolic integration is the problem of finding a formula for the antiderivative, or ''indefinite integral'', of a given function ''f''(''x''), i.e. to find a formula for a differentiable function ''F''(''x'') such that
:\frac = f(x ...
of
rational fraction
In algebra, an algebraic fraction is a fraction whose numerator and denominator are algebraic expressions. Two examples of algebraic fractions are \frac and \frac. Algebraic fractions are subject to the same laws as arithmetic fractions.
A ration ...
s. Square-free factorization is the first step of the
polynomial factorization algorithms that are implemented in
computer algebra system
A computer algebra system (CAS) or symbolic algebra system (SAS) is any mathematical software with the ability to manipulate mathematical expressions in a way similar to the traditional manual computations of mathematicians and scientists. The de ...
s. Therefore, the algorithm of square-free factorization is basic in
computer algebra
In mathematics and computer science, computer algebra, also called symbolic computation or algebraic computation, is a scientific area that refers to the study and development of algorithms and software for manipulating expression (mathematics), ...
.
Over a field of
characteristic 0, the quotient of
by its greatest common divisor (GCD) with its derivative is the product of the
in the above square-free decomposition. Over a
perfect field of non-zero characteristic , this quotient is the product of the
such that is not a multiple of . Further GCD computations and exact divisions allow computing the square-free factorization (see
square-free factorization over a finite field). In characteristic zero, a better algorithm is known, Yun's algorithm, which is described below.
Its
computational complexity
In computer science, the computational complexity or simply complexity of an algorithm is the amount of resources required to run it. Particular focus is given to computation time (generally measured by the number of needed elementary operations ...
is, at most, twice that of the GCD computation of the input polynomial and its derivative. More precisely, if
is the time needed to compute the GCD of two polynomials of degree
and the quotient of these polynomials by the GCD, then
is an upper bound for the time needed to compute the complete square free decomposition.
There are also known algorithms for square-free decomposition of
multivariate polynomials, that proceed generally by considering a multivariate polynomial as a univariate polynomial with polynomial coefficients, and applying recursively a univariate algorithm.
Yun's algorithm
This section describes Yun's algorithm for the square-free decomposition of univariate polynomials over a field of
characteristic 0.
It proceeds by a succession of
GCD computations and exact divisions.
The input is thus a non-zero polynomial ''f'', and the first step of the algorithm consists of computing the GCD ''a''
0 of ''f'' and its
formal derivative
In mathematics, the formal derivative is an operation on elements of a polynomial ring or a ring of formal power series that mimics the form of the derivative from calculus. Though they appear similar, the algebraic advantage of a formal deriv ...
''f.
If
:
is the desired factorization, we have thus
:
:
and
:
If we set
,
and
, we get that
:
:
and
:
Iterating this process until
we find all the
This is formalized into an algorithm as follows:
The degree of
and
is one less than the degree of
As
is the product of the
the sum of the degrees of the
is the degree of
As the complexity of GCD computations and divisions increase more than linearly with the degree, it follows that the total running time of the "repeat" loop is less than the running time of the first line of the algorithm, and that the total running time of Yun's algorithm is upper bounded by twice the time needed to compute the GCD of
and
and the quotient of
and
by their GCD.
Square root
In general, a polynomial has no polynomial
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 ...
. More precisely, most polynomials cannot be written as the square of another polynomial.
A polynomial has a square root if and only if all exponents of the square-free decomposition are even. In this case, a square root is obtained by dividing these exponents by 2.
Thus the problem of deciding if a polynomial has a square root, and of computing it if it exists, is a special case of square-free factorization.
References
{{Polynomials
Polynomials
Computer algebra
Polynomial factorization algorithms