For a quadratic polynomial with roots r1 and r2,
ax2+bx+c=a(x−r1)(x−r2). Expanding the right-hand side,
a(x−r1)(x−r2)=a(x2−(r1+r2)x+r1r2)=ax2−a(r1+r2)x+ar1r2. Comparing corresponding coefficients gives
b=−a(r1+r2) and
c=ar1r2. Therefore,
r1+r2=−ab,r1r2=ac. For a cubic polynomial with roots r1,r2,r3,
ax3+bx2+cx+d=a(x−r1)(x−r2)(x−r3). Expanding,
a(x−r1)(x−r2)(x−r3)=a(x3−(r1+r2+r3)x2+(r1r2+r1r3+r2r3)x−r1r2r3). Comparing coefficients gives
r1+r2+r3=−ab, r1r2+r1r3+r2r3=ac, and
r1r2r3=−ad. More generally, suppose
anxn+an−1xn−1+⋯+a1x+a0=an(x−r1)(x−r2)⋯(x−rn). We expand the right-hand side and compare corresponding coefficients term by term.
Coefficient of xn: choosing x from every factor gives
Coefficient of xn−1: pick the constant term −ri from exactly one factor and x from all others. Summing over the choice of factor gives
an−1=−an(r1+r2+⋯+rn), so
r1+r2+⋯+rn=−anan−1. Coefficient of xn−2: pick a constant term −ri from exactly two factors and x from all remaining factors. Summing over the pairs {i,j} gives
an−2=an(r1r2+r1r3+⋯+rn−1rn), so
r1r2+r1r3+⋯+rn−1rn=anan−2. Coefficient of xn−3: pick a constant term −ri from exactly three factors and x from all remaining factors. Summing over the triples gives
an−3=−an(r1r2r3+r1r2r4+⋯+rn−2rn−1rn), so
r1r2r3+r1r2r4+⋯+rn−2rn−1rn=−anan−3. Continuing in the same way, the coefficient of x (the case j=n−1) comes from picking the constant term from all but one factor:
r1r2⋯rn−1+⋯+r2r3⋯rn=(−1)n−1ana1, and the constant term comes from picking the constant term from every factor:
r1r2⋯rn=(−1)nana0.□