Generalized Bezoutian, Factorization of Rational Matrix Functions and Matrix Quadratic Equations