 
 
 
 
 
   
 and
 and 
 . Then
there exists
. Then
there exists 
 such that
 such that 
 
 and
 and  in practice, because that's what you will
need to do in order to solve equations like
 in practice, because that's what you will
need to do in order to solve equations like
 .
.
 and
 and  .
The steps of the Euclidean
.
The steps of the Euclidean  algorithm are:
 algorithm are:
|  |  | so  |  | |
|  |  | so  |  | 
 and
 and  .  In the last step, we write
.  In the last step, we write
 as a linear combination of
 as a linear combination of  and
 and  , as desired.
, as desired.That example wasn't too complicated, next we try a much longer example.
 and
 and  .  We have
.  We have
|  |  | so  |  | |
|  |  | so  |  | |
|  |  | so  |  | |
|  |  | so  |  | |
|  |  | so  |  | 
 and
 and  .
.
 .  In fact, there are always 
infinitely many solutions.  If
.  In fact, there are always 
infinitely many solutions.  If  is a solution to
 is a solution to 
 
 ,
, 
 
 .
.
It is also possible to compute  and
 and  using PARI.
 using PARI.
? ?bezout
bezout(x,y): gives a 3-dimensional row vector [u,v,d] such that 
             d=gcd(x,y) and u*x+v*y=d.
? bezout(130,61)
%1 = [23, -49, 1]
 
 
 
 
