# Integer Combination of Coprime Integers

## Contents

## Theorem

Two integers are coprime if and only if there exists an integer combination of them equal to $1$:

- $\forall a, b \in \Z: a \perp b \iff \exists m, n \in \Z: m a + n b = 1$

### General Result

Let $a_1, a_2, \ldots, a_n$ be integers.

Then $\gcd \left\{ {a_1, a_2, \ldots, a_n}\right\} = 1$ if and only if there exists an integer combination of them equal to $1$:

- $\exists m_1, m_2, \ldots, m_n \in \Z: \displaystyle \sum_{k \mathop = 1}^n m_k a_k = 1$

## Proof 1

\(\displaystyle a\) | \(\perp\) | \(\displaystyle b\) | |||||||||||

\(\displaystyle \leadsto \ \ \) | \(\displaystyle \gcd \set {a, b}\) | \(=\) | \(\displaystyle 1\) | Definition of Coprime Integers | |||||||||

\(\displaystyle \leadsto \ \ \) | \(\displaystyle \exists m, n \in \Z: m a + n b\) | \(=\) | \(\displaystyle 1\) | Bézout's Lemma |

Then we have:

\(\displaystyle \exists m, n \in \Z: m a + n b\) | \(=\) | \(\displaystyle 1\) | |||||||||||

\(\displaystyle \leadsto \ \ \) | \(\displaystyle \gcd \set {a, b}\) | \(\divides\) | \(\displaystyle 1\) | Set of Integer Combinations equals Set of Multiples of GCD | |||||||||

\(\displaystyle \leadsto \ \ \) | \(\displaystyle \gcd \set {a, b}\) | \(=\) | \(\displaystyle 1\) | ||||||||||

\(\displaystyle \leadsto \ \ \) | \(\displaystyle a\) | \(\perp\) | \(\displaystyle b\) | Definition of Coprime Integers |

$\blacksquare$

## Proof 2

### Sufficient Condition

Let $a, b \in \Z$ be such that $\exists m, n \in \Z: m a + n b = 1$.

Let $d$ be a divisor of both $a$ and $b$.

Then:

- $d \divides m a + n b$

and so:

- $d \divides 1$

Thus:

- $d = \pm 1$

and so:

- $\gcd \set {a, b} = 1$

Thus, by definition, $a$ and $b$ are coprime.

$\Box$

### Necessary Condition

Let $a \perp b$.

Thus they are not both $0$.

Let $S$ be defined as:

- $S = \set {a m + b n: m, n \in \Z}$

$S$ contains at least one strictly positive integer, because for example $a^2 + b^2 \in S$.

By Set of Integers Bounded Below has Smallest Element, let $d$ be the smallest element of $S$ which is strictly positive.

Let $d = a x + b y$.

It remains to be shown that $d = 1$.

By the Division Theorem:

- $a = d q + r$ where $0 \le r < d$

Then:

\(\displaystyle r\) | \(=\) | \(\displaystyle a - d q\) | |||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle a - \paren {a x + b y} q\) | |||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle a \paren {1 - x q} + b \paren {- y q}\) | |||||||||||

\(\displaystyle \) | \(\in\) | \(\displaystyle S\) |

But we have that $0 \le r < d$.

We have defined $d$ as the smallest element of $S$ which is strictly positive

Hence it follows that $r$ cannot therefore be strictly positive itself.

Hence $r = 0$ and so $a = d q$.

That is:

- $d \divides a$

By a similar argument:

- $d \divides b$

and so $d$ is a common divisor of both $a$ and $b$.

But the GCD of $a$ and $b$ is $1$.

Thus it follows that, as $d \in S$:

- $\exists m, n \in \Z: m a + n b = 1$

$\blacksquare$

## Proof 3

### Sufficient Condition

Let $a, b \in \Z$ be such that $\exists m, n \in \Z: m a + n b = 1$.

Let $d$ be a divisor of both $a$ and $b$.

Then:

- $d \mathrel \backslash m a + n b$

and so:

- $d \mathrel \backslash 1$

Thus:

- $d = \pm 1$

and so:

- $\gcd \left\{ {a, b}\right\} = 1$

Thus, by definition, $a$ and $b$ are coprime.

$\Box$

### Necessary Condition

Let $a \perp b$.

Thus they are not both $0$.

Let $S$ be defined as:

- $S = \left\{ {\lambda a + \mu b: \lambda, \mu \in \Z}\right\}$

$S$ contains at least one strictly positive integer, because for example:

- $a \in S$ (setting $\lambda = 1$ and $\mu = 0$)
- $b \in S$ (setting $\lambda = 0$ and $\mu = 1$)

By Set of Integers Bounded Below has Smallest Element, let $d$ be the smallest element of $S$ which is strictly positive.

Let $d = \alpha a + \beta b$.

Let $c \in S$, such that $\lambda_0 a + \mu_0 b = c$ for some $\lambda_0, \mu_0 \in \Z$.

By the Division Algorithm:

- $\exists \gamma, \delta \in \Z: c = \gamma d + \delta$

where $0 \le \delta < d$

Then:

\(\displaystyle \delta\) | \(=\) | \(\displaystyle c - \gamma d\) | |||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle \left({\lambda_0 a + \mu_0 b}\right) - \gamma \left({\alpha a + \beta b}\right)\) | |||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle \left({\lambda_0 - \gamma \alpha}\right) a + \left({\mu_0 - \gamma \beta}\right) b\) | |||||||||||

\(\displaystyle \) | \(\in\) | \(\displaystyle S\) |

But we have that $0 \le \delta < d$.

We have defined $d$ as the smallest element of $S$ which is strictly positive

Hence it follows that $\delta$ cannot therefore be strictly positive itself.

Hence $\delta = 0$ and so $c = \gamma d$.

That is:

- $d \mathrel \backslash c$

and so the smallest element of $S$ which is strictly positive is a divisor of both $a$ and $b$.

But $a$ and $b$ are coprime.

Thus it follows that, as $d \mathrel \backslash 1$:

- $d = 1$

and so, by definition of $S$:

- $\exists m, n \in \Z: m a + n b = 1$

$\blacksquare$

Note that in the integer combination $m a + n b = 1$, the integers $m$ and $n$ are also coprime.

## Also known as

This result is sometimes known as Bézout's Identity, as is the more general Bézout's Lemma.

Some sources refer to this result as the Euclidean Algorithm, but the latter as generally understood is the procedure that can be used to establish the values of $m$ and $n$, and for any pair of integers, not necessarily coprime.

## Sources

- 1964: Walter Ledermann:
*Introduction to the Theory of Finite Groups*(5th ed.) ... (previous) ... (next): $\S 6$: Examples of Finite Groups: $\text{(iii)}$: $(1.34)$ - 1978: John S. Rose:
*A Course on Group Theory*... (previous) ... (next): $0$: Some Conventions and some Basic Facts