Each Lagrange basis polynomial can be rewritten as the product of three parts, a function common to every basis polynomial, a node-specific constant {{tmath|1=\textstyle w_j = \prod_{m\neq j}(x_j - x_m)^{-1} }} (called the
barycentric weight), and a part representing the displacement from to : \ell_j(x) = \ell(x) \dfrac{w_j}{x - x_j} By factoring out from the sum, we can write the Lagrange polynomial in the so-called
first barycentric form: L(x) = \ell(x) \sum_{j=0}^k \frac{w_j}{x-x_j}y_j. If the weights have been pre-computed, this requires only operations compared to for evaluating each Lagrange basis polynomial individually. (See
Big O notation.) The barycentric interpolation formula can also easily be updated to incorporate a new node {{tmath|\textstyle x_{k+1} }} by dividing each of the , by {{tmath|\textstyle (x_j - x_{k+1})}} and constructing the new {{tmath|\textstyle w_{k+1} }} as above. For any , \sum_{j=0}^k \ell_j(x) = 1 because the
constant function g(x) = 1 is the unique polynomial of degree \leq k interpolating the data {{nowrap|\{(x_0, 1), (x_1, 1), \ldots, (x_k, 1) \}.}} We can thus further simplify the barycentric formula by dividing { \begin{aligned} L(x) &= \ell(x) \sum_{j=0}^k \frac{w_j}{x-x_j}y_j \Bigg/ \ell(x) \sum_{j=0}^k \frac{w_j}{x-x_j} \\[10mu] &= \sum_{j=0}^k \frac{w_j}{x-x_j}y_j \Bigg/ \sum_{j=0}^k \frac{w_j}{x-x_j}. \end{aligned} This is called the
second form or
true form of the barycentric interpolation formula. This second form has advantages in computation cost and accuracy: it avoids evaluation of \ell(x); the work to compute each term in the denominator w_j/(x-x_j) has already been done in computing \bigl(w_j/(x-x_j)\bigr)y_j and so computing the sum in the denominator costs only k addition operations; for evaluation points x which are close to one of the nodes x_j,
catastrophic cancelation would ordinarily be a problem for the value (x-x_j), however this quantity appears in both numerator and denominator and the two cancel leaving good relative accuracy in the final result. Using this formula to evaluate L(x) at one of the nodes x_j will result in the
indeterminate \infty y_j/\infty; computer implementations must replace such results by L(x_j) = y_j. Each Lagrange basis polynomial can also be written in barycentric form: \ell_j(x) = \frac{w_j}{x-x_j} \Bigg/ \sum_{m=0}^k \frac{w_m}{x-x_m}. ==A perspective from linear algebra==