Let be a complex rational function. Then we can write for complex polynomials and . Note that the Euclidean algorithm can be carried out in exact arithmetic–no need to find roots of polynomial equations.
Nonzero complex polynomials and have no common complex zeros if and only if there exist complex polynomials and such that
MATLAB can find the greatest common divisor (highest common factor) for polynomials via command
[g,M,N]=gcd(P,Q)