what is the fundamental algebra result that allows you to equate coefficients for 2 polynomials if they have equal values for all values of x?

and how can you replace this expression-

F(x)=A(x-alpha1)(x-alpha2)....)x-alphar)

with F(x)=A(x-alpha1)^m1(x-alpha2)^m2....(x-alphar)^mr, with A=an

mk are integers >=1 and are multiplicities of the roots mk being the multiplicity of alphak

thanks very much!