Jacobi matrix (source code)

= Jacobi matrix
{c}
{wiki}

A <Jacobi matrix> is a real symmetric <tridiagonal matrix> with positive off-diagonal entries. Its diagonal entries $b_j$ and off-diagonal entries $a_j>0$ encode the three-term recurrence of <orthonormal polynomials>:
$$
xp_j(x)=a_{j+1}p_{j+1}(x)+b_jp_j(x)+a_jp_{j-1}(x),
$$
where $p_{-1}=0$ and the $a_0p_{-1}$ term is omitted. In the <orthonormal polynomial> basis this is the <matrix> of multiplication by $x$, truncated to finitely many basis vectors. Positivity of $a_j$ excludes a reducible split into independent blocks.<nist-digital-library-of-mathematical-functions/18 Orthogonal Polynomials>[§18.2(iv), three-term recurrence and Jacobi matrices]{ref}

The determinant $D_n(x)=\det(xI-J_n)$ of the leading $n$-by-$n$ block satisfies $D_{n+1}=(x-b_n)D_n-a_n^2D_{n-1}$, with $D_0=1$. Thus its <eigenvalues> are the <zeros of orthogonal polynomials> of degree $n$. For unit weight on $[-1,1]$, the first two normalized <polynomials> give $J_2=\left(\begin{smallmatrix}0&1/\sqrt3\\1/\sqrt3&0\end{smallmatrix}\right)$, whose <eigenvalues> $\pm1/\sqrt3$ are the two-node <Gaussian quadrature> nodes.