Polynomial magic I : Chebyshev polynomials
Orthogonal polynomials pop up everywhere in applied mathematics and in particular in numerical analysis. Within machine learning and optimization, typically (a) they provide natural basis functions which are easy to manipulate, or (b) they can be used to model various acceleration mechanisms.
In this post, I will describe one class of such polynomials, the Chebyshev polynomials (Tchebychev in French, Чебышёв in Russian), whose extremal properties (beyond being orthogonal) are useful in the analysis of accelerated algorithms.
Definition and first properties
The -th Chebyshev polynomial is classically defined as the unique polynomial such that
Recurrence. Summing the two equations , the following recurrence relationship can be deduced:
Together with the first two polynomials and , this leads to , , and so on.
From the recurrence relationships, one can easily deduce that has the parity of and that has degree , with leading coefficient .
Oscillatory behavior. For , for integer, we have , while when goes from to , goes from -1 to 1. Thus, on , oscillates between and , with equality for for . This oscillatory behavior is illustrated below and crucial for the extremal properties below.

First 33 Chebyshev polynomials, plotted between -1 and 1. Note the stronger oscillatory behavior between -1 and 1 as grows.
Orthogonality. Using the orthogonality of the Fourier basis on , we have for , , and with the change of variable , we obtain
Extremal properties
Chebyshev polynomials exhibit many “extremal properties”, of the form: among all polynomials of degree with some form of normalization (e.g., fixed -th order coefficient or value at given point), the one with smallest specific norm is proportional to .
The most classical one is as follows: the polynomial of degree with -th order coefficient equal to one, and with minimum -norm on , is . The proof is particularly elegant and simple (see here). Since this is not the property that we need for optimization, we will consider another one.
Proposition (largest value outside of ). For any polynomial of degree such that for , and any , .
Proof. By contradiction, we assume that there exists such that (the other possibility is done by replacing by ). Without loss of generality, we can assume that (by potentially rescaling ). Then, the polynomial of degree has alternatively strictly positive and negative values between and . Indeed, , and for all . Therefore there are alternating signs, and thus zeros, which implies that since has degree . This is a contradiction with the existence of .
Note that for any , (which can be shown by induction), and is thus increasing on with values quickly increasing as grows. See an illustration below.

First 33 Chebyshev polynomials, plotted between 1 and 4 in logarithmic scale. Note the exploding behavior as grows.
Chebyshev acceleration
We consider a recursion in of the form , with a symmetric matrix and eigenvalues in with . Such recursions are ubiquitous in data science, as (1) gradient descent on a strongly-convex quadratic function, or (b) gossip for distributed averaging [2] (see an example in a section below).
The recursion converges to the unique (because ) fixed point such that . We have, by unrolling the recursion:
This leads to the usual exponential convergence rate . In the following, writing makes explicit the importance of , which is the gap between and the largest eigenvalue of . Increasing this gap is equivalent to accelerating the convergence rate.
In order to speed-up convergence, a classical idea is to take linear combinations of all past iterates. That is, we consider for some weights such that (so that if all iterates are already at , then the weighted average stays there). We have
In order to select the best polynomial, we are looking for such that and is as small as possible. Up to mapping to , we know from the extremal property above that the optimal polynomial is exactly a rescaled Chebyshev polynomial, that is,
The maximal value on is then . In order to compare to (no acceleration), we can provide an equivalent of as (see end of the post). There is no real acceleration when is bounded away from 1, but as tends to , this can be shown (see also the end of the post) to be equivalent to , with the usual “square root” acceleration: is essentially replaced by .
We thus get an acceleration, but as is, computing seems to require to store all values of , which is not practical. Since there is a second-order recursion for Chebyshev polynomials, one can derive one as well, directly for the sequence . A somewhat lengthy calculation (see end of the post) leads to the recursion
Simpler stationary recursion. In the recursion above, the parameter varies with . A similar (then non totally optimal) acceleration can be obtained by replacing all ’s by their limit when tends to infinity, which is characterized by the equation with smallest solutions (see end of the post for detailed computations). The now stationary recursion then becomes
Relationship with other acceleration mechanisms
Non-adaptive schemes. As seen above for an affine operator (i.e., ), Chebyshev acceleration takes a recursion of the form
When is affine, the format does not matter much (and all end up being essentially equivalent), but for gradient descent algorithms where for some non-quadratic function and a step-size, there is a difference, the last one corresponding to Nesterov acceleration (see a nice post on it here), and the one before to classical momentum, also known as the heavy-ball method (see [3]).
Adaptive schemes. The methods above need to know the bound on the spectrum . They have to commit to such a value (which is typically only known through upper bounds) and cannot “get lucky”, that is, even if the best value is known, they cannot benefit from additional better properties of the spectrum of (e.g., clustered eigenvalues). The conjugate gradient method, which accesses the matrix with the slightly stronger oracle of computing any (and not only ), or Anderson acceleration (which does not need a stronger oracle), are adaptive for similar problems [4, 5]. Again, Chebyshev polynomials are present; probably more on this in future posts!
Application to accelerated gossip
A interesting linear recursion pops out in distributed optimization, where we assume that computers or processors are placed in nodes in a network, and the goal is to minimize an average of function , each of them only accessible by the corresponding node. The nodes are allowed to communicate messages along each edge of a network.

Two-dimensional grid with nodes.
The simplest of such problem is the network averaging problem where , for a uni-dimensional parameter and . The solution of this consensus is .
The gossip algorithm [2] consists in iteratively replacing the value at a given node by a weighted average of the values at neighboring nodes (and node ). If all nodes communicate simultaneously, then the vector is replaced by , hence a linear recursion
When applying the gossip matrix iteratively to , the projection on the eigensubspace corresponding to the unit eigenvalue is not changed, while all other projections on the other eigensubspaces converge to zero at rate at most . Thus converges to the constant vector at rate , and thus to a constant vector, with the average in all components.
Given that we have a linear recursion, we can use Chebyshev acceleration defined above and obtain substantial improvements, as illustrated below. For the use of this acceleration within distributed optimization algorithms, see [6] and references therein.

Comparison of gossip algorithms on a two-dimensional grid (each cell correspond to a value to average): (left) regular gossip, (center) accelerated second-order recursion with constant coefficients, (right) Chebyshev acceleration. Convergence is much faster with acceleration, (only) slightly better for Chebyshev acceleration, which is the optimal polynomial acceleration.
Conclusion
Among classical classes of orthogonal polynomials, Chebyshev polynomials are special, because beyond being orthogonal, they satisfy extremal properties that are particularly useful in numerical analysis.
In future posts, I plan to go over Jacobi polynomials (which include Legendre, Gegenbauer and Chebyshev polynomials), Hermite polynomials, and finally Bernoulli polynomials (which are not orthogonal but still very special). For all of these, there are natural applications in machine learning.
Acknowledgements. I would like to thank Raphaël Berthier for proofreading this blog post and making good clarifying suggestions.
References
[1] John C. Mason, and David C. Handscomb. Chebyshev polynomials. Chapman and Hall/CRC, 2002. [2] Stephen Boyd, Arpita Ghosh, Balaji Prabhakar, Devavrat Shah. Randomized gossip algorithms. IEEE/ACM Transactions on Networking, 14:2508-2530, 2006. [3] Euhanna Ghadimi, Hamid Reza Feyzmahdavian, and Mikael Johansson. Global convergence of the heavy-ball method for convex optimization. European Control Conference (ECC), 2015. [4] Homer F. Walker, Peng Ni. Anderson acceleration for fixed-point iterations. SIAM Journal on Numerical Analysis, 49(4):1715-1735, 2011. [5] Damien Scieur, Alexandre d’Aspremont, Francis Bach. Regularized Nonlinear Acceleration. Mathematical Programming, 2018. [6] Kevin Scaman, Francis Bach, Sébastien Bubeck, Yin-Tat Lee, Laurent Massoulié. Optimal algorithms for smooth and strongly convex distributed optimization in networks. Proceedings of the International Conference on Machine Learning (ICML), 2017. [7] Mieczysław A. Kłopotek. Spectral Analysis of Laplacians of an Unweighted and Weighted Multidimensional Grid Graph — Combinatorial versus Normalized and Random Walk Laplacians. Technical report, ArXiv:1707.05210, 2019.
Detailed Computations
Limit of . For , then a well-known property of Chebyshev polynomials is that (which can be shown by induction using basic hyperbolic trigonometry identities). Moreover, we have and thus
Recurrence for Chebyshev acceleration. We have, using the recursion for Chebyshev polynomials
Using , and denoting , we get
Convergence of stationary recursion. The roots of are the ones of , with smallest solutions . In order to study the second-order recursion
Eigenvalues of the Laplacian matrix of a square grid. Given a chain of length such as depicted below, the Laplacian matrix can be shown (see [7]) to have eigenvalues for .

One-dimensional grid with .
For a two-dimensional grid of size , then the Laplacian matrix can be shown (see [7]) to have eigenvalues for . Therefore, the second smallest eigenvalue is \lambda_\min = 2 – 2 \cos \frac{\pi}{m} and the largest eigenvalue is \lambda_\max = 4 + 4 \cos \frac{\pi}{m}. We then select such that 1-\alpha \lambda_\min = \rho and 1-\alpha \lambda_\max = -\rho, leading to \alpha = \frac{2}{\lambda_\min + \lambda_\max} = \frac{2}{6 + 2 \cos \frac{\pi}{m}} and finally \rho = \frac{\lambda_\max – \lambda_\min}{\lambda_\max + \lambda_\min} = \frac{2 +6 \cos \frac{\pi}{m} }{6 + 2 \cos \frac{\pi}{m}}\sim \frac{8 – 3 \frac{\pi^2}{m^2}}{8 – \frac{\pi^2}{m^2}}\sim 1 – \frac{\pi^2}{4 m^2}. Thus, as a function of , the eigengap is proportional to .
More generally, for the grid of size in dimension , then we get \lambda_\min = 2 – 2 \cos \frac{\pi}{m} and \lambda_\max = 2d + 2d \cos \frac{\pi}{m}, and \rho = \frac{\lambda_\max – \lambda_\min}{\lambda_\max + \lambda_\min} = \frac{2d-2 +(2d+2) \cos \frac{\pi}{m} }{2d+2 + (2d-2) \cos \frac{\pi}{m}}\sim \frac{4d – (d+1) \frac{\pi^2}{m^2}}{4d – (d-1)\frac{\pi^2}{m^2}}\sim 1 – \frac{\pi^2}{2d m^2}. Thus, as a function of , the eigengap is proportional to . Moreover, when is large, the normalizing factor tends to .