Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im doing a problem for al algorithms class to multiply 2 polynomials using FFT, and am confused as to why they picked 9 in step 3 in this document:

Which means the last piece of the puzzle im missing is how i can find the principal N-th root of unity for any 2 arbitrarily chosen polynomials. (in my case, they are 1+x+2x^2 and 2+3x)

share|cite|improve this question

They are working in the field of integers modulo 41.

We have $9^2 = 81 = 40 \bmod 41 = -1 \bmod 41$ and so $9^4=(9^2)^2=1\bmod 41$.

They could have picked 32 as well.

All you need to do is find an integer that when raised to the $N$th power modulo your prime $p$ gives 1, but when raised to any smaller (positive) power does not give 1 mod $p$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.