Interactive Educational Modules in
Scientific Computing

Polynomial Bases

This module plots various sets of basis functions for the space of polynomials of a given degree and illustrates the effect of the choice of basis functions on the conditioning of the problem of computing a polynomial interpolant.

The user selects a set of basis functions and the dimension of the basis. For the set of functions and dimension chosen, the basis functions are plotted for interpolating equally spaced data points on the interval [0, 1]. The corresponding basis matrix and its condition number are also shown.

The basis matrix for the monomial basis functions is particularly ill-conditioned, and its conditioning worsens as the dimension is increased. This conditioning can be improved by shifting and scaling the monomials. The Lagrange basis functions always yield a perfectly conditioned basis matrix, namely the identity matrix. The Newton basis functions yield a lower triangular basis matrix with a condition number between those for the Lagrange and monomial bases.

Reference: Michael T. Heath, Scientific Computing, An Introductory Survey, 2nd edition, McGraw-Hill, New York, 2002. See Section 7.3, especially Figures 7.1, 7.2, and 7.3.

Developers: Evan VanderZee and Michael Heath