LearnViz Math
Expert ⛓ Discrete Math & Number Theory Topic 73 of 103

Extended Euclidean Algorithm

Find x, y with ax + by = gcd(a,b).

Key idea

Find x, y with ax + by = gcd(a,b).

In depth

It runs the Euclidean algorithm and works backwards to write gcd(a, b) = ax + by. This produces the coefficients (Bézout coefficients), which give modular inverses.

Worked example

gcd(240, 46) = 2 = 240(−9) + 46(47).

Formula

ax + by = gcd

Real-world uses

Common mistake

Making arithmetic mistakes when back-substituting; verify the final identity.

How to learn this

  1. Read the key idea and say it in your own words.
  2. Work through the worked example, then try a similar problem.
  3. Use the interactive lesson’s visual and mini-quiz to check the pattern.

Frequently asked questions

What is Extended Euclidean Algorithm?

Find x, y with ax + by = gcd(a,b). It is a topic at the expert level in Discrete Math & Number Theory.

What is the formula for Extended Euclidean Algorithm?

The key formula is ax + by = gcd.

Where is Extended Euclidean Algorithm used in real life?

Real-world examples: Finding modular inverses for encryption keys and solving ax + by = c problems.

What should I learn before Extended Euclidean Algorithm?

Make sure you are comfortable with GCD and LCM, the previous topic in Discrete Math & Number Theory.

What is a common mistake with Extended Euclidean Algorithm?

Making arithmetic mistakes when back-substituting; verify the final identity.

How can I practise Extended Euclidean Algorithm?

Open the interactive lesson, play with the visual, then answer the three-question mini-quiz. Getting two right marks the topic complete.

What comes after Extended Euclidean Algorithm?

Move on to Bézout’s Identity next.

Related expert topics in Discrete Math & Number Theory