Matrix methods for polynomials