HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Complex Roots and Roots of Unity
  1. 1Complex and conjugate roots
  2. 2The roots of unity
  3. 3Polynomial identities
  1. Mathematics
  2. /Complex Roots and Roots of Unity
  3. /Polynomial identities

Course 33.3·Lesson 3 of 3

Polynomial identities

A nonzero polynomial of degree at most nnn has at most nnn roots. So two such polynomials that agree at n+1n + 1n+1 points are equal. This identity theorem finds remainders and proves divisibility by a test at the roots of unity. It also builds the one polynomial through given points, and solves the classic problems where P(k)P(k)P(k) is known at many points. The roots of unity also pick out every third binomial coefficient.

about 30 min1 simulation2 practice questions1 Python program5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

Lesson 3 of 3Show all lessonsHide
Complex Roots and Roots of Unity
  1. 1Complex and conjugate roots
  2. 2The roots of unity
  3. 3Polynomial identities

Try the code and the simulations beside the lesson.

What you will be able to do

  • prove that two polynomials are equal by checking them at enough points;
  • find a remainder from the values of a polynomial, and test divisibility at roots of unity;
  • build the polynomial through given points, and use the roots of unity to sum binomial coefficients.

Too many roots

A straight line that crosses the xxx-axis in two places must be the axis itself. A parabola that meets a line in three points must be that line. This is one simple fact: a nonzero polynomial of degree at most nnn has at most nnn roots. It turns out to be a very strong tool.

The identity theorem

If PPP and QQQ have degree at most nnn and P(xi)=Q(xi)P(x_i) = Q(x_i)P(xi​)=Q(xi​) at n+1n + 1n+1 different points, then P−QP - QP−Q has n+1n + 1n+1 roots. So P−QP - QP−Q is the zero polynomial, and P=QP = QP=Q.

Example. For any distinct aaa, bbb, ccc,

(x−b)(x−c)(a−b)(a−c)\displaystyle \dfrac{(x - b)(x - c)}{(a - b)(a - c)}(a−b)(a−c)(x−b)(x−c)​
+(x−c)(x−a)(b−c)(b−a)\displaystyle \quad + \dfrac{(x - c)(x - a)}{(b - c)(b - a)}+(b−c)(b−a)(x−c)(x−a)​
+(x−a)(x−b)(c−a)(c−b)=1.\displaystyle \quad + \dfrac{(x - a)(x - b)}{(c - a)(c - b)} = 1.+(c−a)(c−b)(x−a)(x−b)​=1.

The left side has degree at most 222 and equals 111 at x=ax = ax=a, bbb and ccc. That is three points, so it equals 111 everywhere.

Remainders

Divide P(x)P(x)P(x) by a polynomial D(x)D(x)D(x) of degree ddd: P=DQ+RP = DQ + RP=DQ+R with RRR of degree less than ddd. At a root ttt of DDD, P(t)=R(t)P(t) = R(t)P(t)=R(t). So

  • dividing by x−ax - ax−a leaves P(a)P(a)P(a);
  • dividing by (x−a)(x−b)(x - a)(x - b)(x−a)(x−b) leaves the line through (a,P(a))(a, P(a))(a,P(a)) and (b,P(b))(b, P(b))(b,P(b)).

Divisibility at roots of unity

x2+x+1x^2 + x + 1x2+x+1 has the roots ω\omegaω and ω2\omega^2ω2. A real polynomial is divisible by it exactly when P(ω)=0P(\omega) = 0P(ω)=0. For example, x3m+x3n+1+x3p+2x^{3m} + x^{3n+1} + x^{3p+2}x3m+x3n+1+x3p+2 at x=ωx = \omegax=ω gives 1+ω+ω2=01 + \omega + \omega^2 = 01+ω+ω2=0. So it is divisible by x2+x+1x^2 + x + 1x2+x+1 for all whole numbers mmm, nnn, ppp.

The polynomial through given points

Through n+1n + 1n+1 points with different xix_ixi​ there is exactly one polynomial of degree at most nnn. Lagrange's formula writes it as

P(x)=∑iyi Li(x),\displaystyle P(x) = \sum_i y_i\,L_i(x),P(x)=i∑​yi​Li​(x),
Li(x)=∏j≠ix−xjxi−xj.\displaystyle L_i(x) = \prod_{j \ne i}\dfrac{x - x_j}{x_i - x_j}.Li​(x)=j=i∏​xi​−xj​x−xj​​.

Each LiL_iLi​ is 111 at xix_ixi​ and 000 at the other points. The identity above is Lagrange's formula for P=1P = 1P=1.

Four points at x = 0, 1, 2 and 3 with heights 1, 2, 4 and 8, and the cubic curve through them. A fifth point at x = 4 shows the cubic at height 15, just below the point of height 16 that doubling would give.

A worked example

A cubic PPP has P(k)=2kP(k) = 2^kP(k)=2k for k=0,1,2,3k = 0, 1, 2, 3k=0,1,2,3. Find P(4)P(4)P(4).

  1. Values. 1,2,4,81, 2, 4, 81,2,4,8.
  2. Differences. 1,2,41, 2, 41,2,4, then 1,21, 21,2, then 111.
  3. Extend. The third difference of a cubic is constant, so it stays 111. The next second difference is 2+1=32 + 1 = 32+1=3, and the next first difference is 4+3=74 + 3 = 74+3=7.
  4. Answer. P(4)=8+7=15P(4) = 8 + 7 = 15P(4)=8+7=15, not 161616. A polynomial is not 2x2^x2x.

Picking every third binomial coefficient

Expand (1+x)n=∑k(nk)xk(1 + x)^n = \sum_k\binom{n}{k}x^k(1+x)n=∑k​(kn​)xk and put x=1x = 1x=1, ω\omegaω, ω2\omega^2ω2. Add the three results. A term with 3∣k3 \mid k3∣k gives 1+1+1=31 + 1 + 1 = 31+1+1=3, and every other term gives 1+ωk+ω2k=01 + \omega^k + \omega^{2k} = 01+ωk+ω2k=0. So

∑3∣k(nk)\displaystyle \sum_{3 \mid k}\binom{n}{k}3∣k∑​(kn​)
=2n+(1+ω)n+(1+ω2)n3.\displaystyle \quad = \dfrac{2^n + (1 + \omega)^n + (1 + \omega^2)^n}{3}.=32n+(1+ω)n+(1+ω2)n​.

For n=6n = 6n=6: (1+ω)6=(−ω2)6=1(1 + \omega)^6 = (-\omega^2)^6 = 1(1+ω)6=(−ω2)6=1, so the sum is 64+23=22\dfrac{64 + 2}{3} = 22364+2​=22. Check: 1+20+1=221 + 20 + 1 = 221+20+1=22.

Practise with new numbers

Try it in Python

The program builds the polynomial through given points with exact fractions, using Lagrange's formula. Then it checks the sum of every third binomial coefficient against the formula with ω\omegaω.

Read it first. Then run it. Is the value at 4 equal to 15?

1. Add the point (4, 16) to the list and find the value at 5. Is it 32?

2. Change n = 6 to n = 10 in the second part. Do the two numbers still agree?

Common mistakes

  • Too few points. Degree nnn needs n+1n + 1n+1 points to fix the polynomial.
  • The degree of a remainder. Dividing by a quadratic leaves at most a line, ax+bax + bax+b.
  • Divisibility by x2+x+1x^2 + x + 1x2+x+1. Test at ω\omegaω, not at 111.
  • (1+ω)n(1 + \omega)^n(1+ω)n. Write 1+ω=−ω21 + \omega = -\omega^21+ω=−ω2 first, then use ω3=1\omega^3 = 1ω3=1.

Remember these

  • Degree at most nnn and equal at n+1n + 1n+1 points: equal everywhere.
  • Remainder on division by (x−a)(x−b)(x - a)(x - b)(x−a)(x−b): the line through (a,P(a))(a, P(a))(a,P(a)) and (b,P(b))(b, P(b))(b,P(b)).
  • PPP divisible by x2+x+1x^2 + x + 1x2+x+1 exactly when P(ω)=0P(\omega) = 0P(ω)=0.
  • ∑3∣k(nk)=2n+2cos⁡nπ33\sum_{3 \mid k}\binom{n}{k} = \dfrac{2^n + 2\cos\frac{n\pi}{3}}{3}∑3∣k​(kn​)=32n+2cos3nπ​​.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. P(x)P(x)P(x) leaves the remainder 333 on division by x−1x - 1x−1 and 777 on division by x−3x - 3x−3. Find the remainder on division by (x−1)(x−3)(x - 1)(x - 3)(x−1)(x−3).
  1. Is x5+x4+1x^{5} + x^{4} + 1x5+x4+1 divisible by x2+x+1x^2 + x + 1x2+x+1?
  1. A quadratic has P(0)=1P(0) = 1P(0)=1, P(1)=3P(1) = 3P(1)=3 and P(2)=7P(2) = 7P(2)=7. Find P(3)P(3)P(3).
  1. A polynomial of degree 333 is 000 at x=1x = 1x=1, 222, 333 and 444. What can you say about it?
  1. Find (61)+(64)\binom{6}{1} + \binom{6}{4}(16​)+(46​), the coefficients with kkk one more than a multiple of 333, using the total 26=642^6 = 6426=64 and the result 222222 above.

References

  • OpenStax, College Algebra 2e, Chapter 5, the section on dividing polynomials and the remainder theorem.
  • H. S. Hall and S. R. Knight, Higher Algebra, the chapter on the theory of equations.

Enroll free in Complex Roots and Roots of Unity

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (3)

A polynomial P(x) leaves the remainder 4 when it is divided by x - 1, the remainder 7 when divided…Hard · High School (11–12) · by StemPy Lab
A polynomial P of degree 4 has P(k) = k/(k + 1) for k = 0, 1, 2, 3, 4…Advanced · High School (11–12) · by StemPy Lab
A club has 12 members. The committee rule allows a committee of any size, including the empty one…Advanced · High School (11–12) · by StemPy Lab
That was the last lessonBack to the course: take the test
← Complex Roots and Roots of Unity
← The roots of unityNext →

Discussion (0)

Log in to join the discussion.

Loading…

Python Labs (1)

Interpolation and the roots-of-unity filterPython Lab · by StemPy Lab

Question Sets (1)

Complex Roots and Roots of Unity: Test Yourself10 questions · by StemPy Lab

Notes (1)

Complex Roots and Roots of Unity: Quick RevisionNote · by StemPy Lab