Write the Extended Euclid Algorithm step-by-step in matrix form in LaTeX.