Definitions

# Factorization

[fak-tuh-rahyz]
In mathematics, factorization (also factorisation ) or factoring is the decomposition of an object (for example, a number, a polynomial, or a matrix) into a product of other objects, or factors, which when multiplied together give the original. For example, the number 15 factors into primes as 3 × 5, and the polynomial x2 − 4 factors as (x − 2)(x + 2). In all cases, a product of simpler objects is obtained.

The aim of factoring is usually to reduce something to "basic building blocks," such as numbers to prime numbers, or polynomials to irreducible polynomials. Factoring integers is covered by the fundamental theorem of arithmetic and factoring polynomials by the fundamental theorem of algebra. Vieta's formulas relate the coefficients of a polynomial to its roots.

The opposite of factorization is expansion. This is the process of multiplying together factors to recreate the original, "expanded" polynomial.

Integer factorization for large integers appears to be a difficult problem. There is no known method to carry it out quickly. Its complexity is the basis of the assumed security of some public key cryptography algorithms, such as RSA.

A matrix can also be factorized into a product of matrices of special types, for an application in which that form is convenient. One major example of this uses an orthogonal or unitary matrix, and a triangular matrix. There are different types: QR decomposition, LQ, QL, RQ, RZ.

Another example is the factorization of a function as the composition of other functions having certain properties; for example, every function can be viewed as the composition of a surjective function with an injective function. This situation is generalized by factorization systems.

## Prime factorization of an integer

By the fundamental theorem of arithmetic, every positive integer has a unique prime factorization. Given an algorithm for integer factorization, one can factor any integer down to its constituent primes by repeated application of this algorithm. For very large numbers, no efficient algorithm is known. For smaller numbers, however, there are a variety of different algorithms that can be applied.

Any quadratic polynomial over the complex numbers (polynomials of the form $ax^2+bx+c$ where $a$, $b$, and $c$$mathbb\left\{C\right\}$) can be factored into an expression with the form $a\left(x - alpha\right)\left(x - beta\right)$ using the quadratic formula. The method is as follows:

$ax^2 + bx + c = a\left(x - alpha\right)\left(x - beta\right) = aleft\left(x - left\left(frac\left\{-b + sqrt\left\{b^2-4ac\right\}\right\}\left\{2a\right\}right\right)right\right) left\left(x - left\left(frac\left\{-b - sqrt\left\{b^2-4ac\right\}\right\}\left\{2a\right\}right\right)right\right)$

where $alpha$ and $beta$ are the two roots of the polynomial, found with the quadratic formula.

### Polynomials factorable over the integers

Quadratic polynomials can sometimes be factored into two binomials with simple integer coefficients by use of Vieta's formulas, without the need to use the quadratic formula. In a quadratic equation, this will expose its two roots. The formula

$ax^2+bx+c ,!$

would be factored into:

$\left(mx+p\right)\left(nx+q\right) ,!$
where
$mn = a, ,$
$pq = c, mbox\left\{ and\right\} ,$
$pn + mq = b. ,$

You can then set each binomial equal to zero, and solve for x to reveal the two roots. Factoring does not involve any other formulas, and is mostly just something you see when you come upon a quadratic equation.

Take for example 2x2 − 5x + 2 = 0. Because a = 2 and mn = a, mn = 2, which means that of m and n, one is 1 and the other is 2. Now we have (2x + p)(x + q) = 0. Because c = 2 and pq = c, pq = 2, which means that of p and q, one is 1 and the other is 2 or one is −1 and the other is −2. A guess and check of substituting the 1 and 2, and −1 and −2, into p and q (while applying pn + mq = b) tells us that 2x2 − 5x + 2 = 0 factors into (2x − 1)(x − 2) = 0, giving us the roots x = {0.5, 2}

Note: A quick way to check whether the second term in the binomial should be positive or negative (in the example, 1 and 2 and −1 and −2) is to check the second operation in the trinomial (+ or −). If it is +, then check the first operation: if it is +, the terms will be positive, while if it is −, the terms will be negative. If the second operation is −, there will be one positive and one negative term; guess and check is the only way to determine which one is positive and which is negative.

If a polynomial with integer coefficients has a discriminant that is a perfect square, that polynomial is factorable over the integers.

For example, look at the polynomial 2x2 + 2x - 12. If you substitute the values of the expression into the quadratic formula, the discriminant $b^2-4ac$ becomes 22 - 4 × 2 × -12, which equals 100. 100 is a perfect square, so the polynomial 2x2 + 2x - 12 is factorable over the integers; its factors are 2, (x - 2), and (x + 3).

Now look at the polynomial x2 + 93x - 2. Its discriminant, 932 - 4 × 1 × -2, is equal to 8657, which is not a perfect square. So x2 + 93x - 2 cannot be factored over the integers.

### Perfect square trinomials

Some quadratics can be factored into two identical binomials. These quadratics are called perfect square trinomials. Perfect square trinomials can be factored as follows:

$a^2 + 2ab + b^2 = \left(a + b\right)^2,!$
$a^2 - 2ab + b^2 = \left(a - b\right)^2,!$

### Sum/difference of two squares

Another common type of algebraic factoring is called the difference of two squares. It is the application of the formula
$a^2 - b^2 = \left(a+b\right)\left(a-b\right) ,!$
to any two terms, whether or not they are perfect squares. If the two terms are subtracted, simply apply the formula. If they are added, the two binomials obtained from the factoring will each have an imaginary term. This formula can be represented as
$a^2 + b^2 = \left(a+bi\right)\left(a-bi\right) ,!$.

For example, $4x^2 + 49$ can be factored into $\left(2x + 7i\right)\left(2x - 7i\right)$.

## Factoring other polynomials

### Sum/difference of two cubes

Another less-used but still common formula for factoring is the sum or difference of two cubes. The sum can be represented by
$a^3 + b^3 = \left(a + b\right)\left(a^2 - ab + b^2\right),!$
and the difference by
$a^3 - b^3 = \left(a - b\right)\left(a^2 + ab + b^2\right),!$
For example, x3 − 103 (or x3 − 1000) can be factored into (x − 10)(x2 + 10x + 100).

### Sum/difference of any two numbers raised to the same power

In general, $\left(a-b\right)$ is a factor of $a^n - b^n$ where $n$ is a positive integer. So,
$a^n - b^n = \left(a - b\right)\left(a^\left\{n-1\right\} + a^\left\{n-2\right\}b + a^\left\{n-3\right\}b^2 + ... + a^2b^\left\{n-3\right\} + ab^\left\{n-2\right\} + b^\left\{n-1\right\}\right) ,!$

Also, $\left(a+b\right)$ is a factor of $a^n - b^n$ where $n$ is a positive even integer. Such that,

$a^n - b^n = \left(a + b\right)\left(a^\left\{n-1\right\} - a^\left\{n-2\right\}b + a^\left\{n-3\right\}b^2 - ... - a^2b^\left\{n-3\right\} + ab^\left\{n-2\right\} - b^\left\{n-1\right\}\right) ,!$

Likewise, $\left(a+b\right)$ is a factor of $a^n + b^n$ where $n$ is a positive odd integer. So that,

$a^n + b^n = \left(a + b\right)\left(a^\left\{n-1\right\} - a^\left\{n-2\right\}b + a^\left\{n-3\right\}b^2 - ... + a^2b^\left\{n-3\right\} - ab^\left\{n-2\right\} + b^\left\{n-1\right\}\right) ,!$

## Factoring by grouping

Another way to factor some equations is factoring by grouping. This is done by placing the terms in an expression into two or more groups, where each group can be factored by a known method. The results of these factorizations can sometimes be combined to make an even more simplified expression.

For example, suppose you had the expression

$4x^3sin^2x-312x^2sin^2x+4620xsin^2x-8024sin^2x-3x^3+234x^2-3465x+6018 ,$
which upon first glance looks like an unwieldy expression. One logical step, if you decide to factor by grouping, would be to combine all of the expressions with $sin x,!$ and all without $sin x,!$. Then you would have the expression
$\left(4x^3sin^2x-312x^2sin^2x+4620xsin^2x-8024sin^2x\right)-\left(3x^3-234x^2+3465x-6018\right) ,$
where each of the two groups can be factored giving us
$4sin^2x\left(x^3-78x^2+1155x-2006\right) - 3\left(x^3-78x^2+1155x-2006\right) ,$
This can be further simplified into
$\left(4sin^2x -3\right)\left(x^3-78x^2+1155x-2006\right) ,$
when can then be factored into
$\left(4sin^2x -3\right)\left(x-59\right)\left(x-17\right)\left(x-2\right) ,$
and finally
$\left(2sin x+sqrt 3\right)\left(2sin x-sqrt 3\right)\left(x-59\right)\left(x-17\right)\left(x-2\right) ,$
which is the expression in fully factored form.

## Other common formulas

There are many additional formulas that can be used to easily factor a polynomial. Some common ones are listed below.

Expanded form Factored form
$a^3+b^3+c^3-3abc,!$ $\left(a+b+c\right)\left(a^2+b^2+c^2-ab-bc-ca\right),!$
$a^2\left(b+c\right)+b^2\left(c+a\right)+c^2\left(a+b\right)+2abc,!$ $\left(a+b\right)\left(b+c\right)\left(c+a\right),!$
$\left(a+b\right)\left(b+c\right)\left(c+a\right)+abc,!$ $\left(a+b+c\right)\left(ab+bc+ca\right),!$
$a^2\left(b+c\right)+b^2\left(c+a\right)+c^2\left(a+b\right)+3abc,!$ $\left(a+b+c\right)\left(ab+bc+ca\right),!$
$bc\left(b-c\right)+ca\left(c-a\right)+ab\left(a-b\right),!$ $-\left(a-b\right)\left(b-c\right)\left(c-a\right),!$
$a^2\left(b-c\right)+b^2\left(c-a\right)+c^2\left(a-b\right),!$ $-\left(a-b\right)\left(b-c\right)\left(c-a\right),!$
$a^3\left(b-c\right)+b^3\left(c-a\right)+c^3\left(a-b\right),!$ $-\left(a-b\right)\left(b-c\right)\left(c-a\right)\left(a+b+c\right),!$
$a^4 + 4b^4 ,!$ (Sophie Germain's identity) $\left(a^2 + 2ab + 2b^2\right) \left(a^2 - 2ab + 2b^2\right) ,!$

## Factoring in mathematical logic

In mathematical logic and automated theorem proving, factoring is the technique of deriving a single, more specific atom from a disjunction of two more general unifiable atoms. For example, from ∀ X, Y : P(X, a) or P(b, Y) we can derive P(b, a).