Matrix solution of polynomial equations