Skip to content
← All questions

What do a, b, qiq_i, rir_i, and rn−1r_{n-1} mean in the displayed Euclidean algorithm?

In the displayed Euclidean algorithm, aa and bb are the two initial natural numbers whose gcd is being found. qiq_i represents the quotient at the ii-th division step. rir_i represents the remainder at the ii-th division step. rn−1r_{n-1} is the last nonzero remainder in the sequence, which equals gcd⁡(a,b)\gcd(a, b).

Conditions

  • The symbols are from the general statement of the Euclidean algorithm on the left board.

Reasoning, step by step

  1. Identify aa and bb as the inputs.
  2. Identify qiq_i as the quotient of the ii-th division.
  3. Identify rir_i as the remainder of the ii-th division.
  4. Identify rn−1r_{n-1} as the final nonzero remainder before the zero remainder.
  5. Recognize that rn−1=gcd⁡(a,b)r_{n-1} = \gcd(a, b).

Example

The left board shows the chain a=bq1+r1a=bq_1+r_1, b=r1q2+r2b=r_1q_2+r_2, ..., rn−2=rn−1qn+0r_{n-2}=r_{n-1}q_n+0, and concludes rn−1=gcd⁡(a,b)r_{n-1}=\gcd(a,b).

Common misconceptions

  • Confusing qiq_i with the remainder.
  • Thinking rn−1r_{n-1} is the remainder that is 0.
  • Believing aa and bb must be prime numbers.

Watch the explanation

Connected concepts

Explore next

Related questions

Understand why

↗
Find a method

↗
Find a method

↗
Find a method

↗
Understand why

↗

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.