Extended Euclidean algorithm using coordinate matrices
General version of the extended Euclidean algorithm that, given a list of integers, returns their greatest common divisor and its Bézout coefficients in terms of those integers.
The algorithm treats the integers as a vector space and uses the list of integers given as a linearly dependent spanning set for that space, using coordinate matrices to find coefficients such that the GCD can be expressed as a linear combination of those integers.