Math Help - Euclidean Algorithm

1. Euclidean Algorithm

Using the Euclidean Algorithm to solve 13 in Z30

30 = 2x13+4
13= 3x4+1

Eliminating multiples of four

1= 13-3x4
= 13-3(30-2x13)
= 7x13-3x30 ---- How was this achieved?

Thanks

2. $13-3(30-2 \cdot 13) = 13-(3 \cdot 30 - 6 \cdot 13) = 13 - 3 \cdot 30 + 6 \cdot 13 = (6+1) \cdot 13 - 3 \cdot 30 = 7 \cdot 13 - 3 \cdot 30$

3. Originally Posted by mark090480
Using the Euclidean Algorithm to solve 13 in Z30

30 = 2x13+4
13= 3x4+1

Eliminating multiples of four

1= 13-3x4
= 13-3(30-2x13)
= 13- 3(30)- 3(-2(13))= 13- 3(30)+ 6(13)= 7(13)- 3(30)

= 7x13-3x30 ---- How was this achieved?

Thanks

4. Could you explain what is going on here? I don't understand why we do it in that way. My maths books just tells me how and not why. Thanks.