As when we know roots of a quadratic equation, we simply do the below thing
For eg. - when the roots of an equation is a and b. Then we simply write (x-a)(x-b)
and then multiply the whole bracket my simply multiplying all the elements with the another element. As if the roots are +a and -b, So we write (x-a)(x+b). So the sign of the roots are opposite.
It can also be explained as when we put the roots in the equation, we are simply putting different values of x in the equation. As the roots are a and b
we take x=a⇒(x-a)=0 and x=b⇒(x-b)=0
and just multiply these brackets and you will get the equation with he roots a and b