### 7.1.19 Bézout’s identity

Bézout’s Identity states that for any integers a and b, there exist integers u and v such that gcd(a,b)=au+bv. The iegcd or igcdex command computes the coefficients u and v.

- iegcd takes two arguments: a and b, integers.
- iegcd(a,b) returns the list [u,v,d], where au+bv=d and d=gcd(a,b).

#### Example

iegcd(48,30)

| ⎡ ⎣ | 2,−3,6 | ⎤ ⎦

In other words, 2 · 48+ (−3) · 30=6.