Extended Euclidean Theorem

Introduction

The Extended Euclidean Theorem is an extension of the Euclidean Algorithm, which is used to find the greatest common divisor (GCD) of two integers. It provides a way to express the GCD as a linear combination of the two integers.


Theorem

For any integers and , there exist integers and such that:

The integers and can be determined using the Extended Euclidean Algorithm.


Steps for the Extended Euclidean Algorithm

  1. Apply the Euclidean Algorithm: Use repeated division to find by: Continue until the remainder . The GCD is the last non-zero remainder.

  2. Work Backwards: Substitute the remainders from the Euclidean steps to express the GCD as a linear combination of and .


Example

Find and express it as .

  1. Step 1: Euclidean Algorithm:

    So, .

  2. Step 2: Work Backwards: Start with the last non-zero remainder: Substitute : Substitute : Substitute :

    So, and :


Applications

  1. Finding Modular Inverses: If and are coprime, the Extended Euclidean Algorithm can compute .

  2. Solving Linear Diophantine Equations: The algorithm helps find integer solutions for equations of the form .

  3. Cryptography: Used in algorithms like RSA for key generation and modular arithmetic operations.