In algebra, we deal with many numbers that can be factored into different parts.
For example 6 can be factored as 2*3, 16 can be factored as 2*8.
In the same ways, factoring of polynomial is also possible.

A polynomial can be defined as an expression involving variables with positive integer power connected by arithmetic operation
When any polynomial is factored, the process is to find simpler polynomials which when multiplied together gives the polynomial that we started with. 
When a polynomial is factored, the main process is to break it down into polynomials that have integer coefficients and constants.

Factoring can only be possible when there are two or more terms are present in the polynomial. So factoring is not possible if we are dealing with a monomial, as factoring is the process of writing a polynomial, as a product of two or more polynomial.
The simplest type of factoring is when there exists a common factor for every term in the polynomial taken.

By definition, if every term given in the polynomial comprises of several factors and if each of these factors has at least one factor that is same, then that factor is known as common factor. That common term, then can be factored out using the reverse law of distribution property.

According to the distributive law $a (b+c) = ab+ac$ and $(b+c) a = ba+ca$
So, its reverse law is
$ab+ac = a (b+c) $ and $ba+ca = (b+c) a$

Lets take an example of a binomial
$4x^ {2}+ x$
Here as it is a binomial there are two terms $4x^2$ and $x$
Factoring each of them
$4x^ {2}= 2*2*x*x$
$x = x*1$
It can be seen that both has x common so,
$4x^ {2} + x= x (4x+1) $
 
To do higher problem, there are certain formulas that can be used.
The following are the list of formula:
  • Difference of two square:
$x^ {2}-y^ {2} =(x+y)*(x-y) $
  • Sum of cubes
$x^ {3} +y^ {3} = (x+y) (x^ {2}-x*y+y^ {2}) $
  • Difference of two cubes
$x^ {3} -y^{3} = (x-y) (x^ {2} +x*y+y^ {2}) $
  • Difference to the power if four:
$x^ {4}-y^ {4} = (x-y) (x+y) (x^ {2} +y^ {2}) $
  • Perfect square:
$x^ {2} +2*x*y+y^ {2} = (x+y) ^ {2} $
$x^{2}-2*x*y+y^ {2} = (x-y) ^ {2} $
  • Perfect cube:
$x^{3}+3*x^{2}*y+3*x*y^{2}+y^{3}= (x+y)^{3}$
$x^{3}-3*x^ {2}*y+3*x*y^ {2}-y^ {3} = (x-y) ^ {3} $
 

Expanding polynomial

Expansion of a polynomial is the process of getting the original polynomial after
expansion.
In expanding with respect to the brackets, each term of one polynomial must be
multiplied with each term of the other polynomial.
There are different ways of performing expansion. Lets look at some important methods.
FOIL:
It is a technique used for multiplying two binomials. FOIL has an expansion as
follows:
F-first term of each binomial,
O-outer term of each binomial,
I- inner term of each binomial,
L-last term of each binomial.

The general form that can be used is
(a + b)(c+ d) = a*c + a*d + b*c + b*d

For example:
Expand
$(x+4)(x-2)$
Solution:
As both are binomials, lets use FOIL method
$(x+4)(x-2)= x*x-x*2+4*x-4*2$
                = $x^{2} -2x+4x-8$
                = $x^{2}+2x-8$
 
Decomposion method:
It is a systematic process in which each term in the first polynomial is distributed to the second polynomial, and it continues until all parentheses are opened.
The general steps to be followed is
$(a + b)(c+ d) = a*(c + d) + b*(c + d)
                       = a*c + a*d + b*c + b*d$
For example
Expand
$(x^{2} +4x +5)*(x+y)$
Solution:
lets use the decomposition method
$(x^{2} +4x +5)*(x+y)= x^{2}*(x+y) + 4x*(x+y)+5*(x+y)$
                               =  $x^{2}*x+x^{2}*y+4x*x+4x*y+5*x+5*y$
                                = $ x^{3} +x^{2}y+4x^{2} +4xy +5x +5y$