# How to compute the Jacobi matrix (tridiagonal matrix) of a polynomial with a recurrence relationship?

I am looking at Trefethen and Bau Exercise 37.1: I have two normalizations of the Legendre polynomials with corresponding recurrence relations: $$P_n(1)=1$$ which follows $$P_n(x) = \frac{2n-1}{n} x P_{n-1}(x) -\frac{n-1}{n}P_{n-2}(x)$$ and $$\|q_n\|=1$$ which follows $$xq_n(x)=\beta_{n-1}q_{n-1}(x)+\alpha_n q_n(x) + \beta_n q_{n+1}(x)$$ where $$\beta_n = \tfrac12 (1-(2n)^{-2})^{-1/2}$$

Apparently, $q_{n+1}$ is proportional to $P_n$. I know that the entries of the Jacobi matrix $t_{ij} = (q_i,xq_j)$ in the $L^2([-1,1])$ inner-product space, and I managed to get the right answer for the $q_j$ with $0$ along the main diagonal, $\beta_{j-1}$ on the upper diagonal and $\beta_j$ along the lower diagonal. However, it doesn't seem that I am getting the right answer for the 1st normalization.

Also, I am asked to find the relationship between the two Jacobi matrices--my intuition is that they are equal but I can't quite justify it--I think it has to do with the fact that the characteristic polynomials are the same monic polynomial.

Furthermore, I am asked to find a formula for $q_{n+1}(1)=\|P_n\|$ using the Jacobi matrices. I've tried to solve this by equating the entries for the Jacobi matrices (where one includes a term of $||P_n||^2$) and solving. But I can't get the answer $\|P_n\|=\sqrt{\frac{2}{2n+1}}$.

• Usually, one obtains the corresponding Jacobi matrix from the monic recurrence of your orthogonal polynomial. Thus, renormalize your polynomial to be monic, modify the recurrence relation accordingly, and you can derive the diagonal and off-diagonal elements of the Jacobi matrix from the recurrence coefficients. – J. M. Nov 18 '15 at 11:45
• @J.M. I think the point in that specfic exercise the point is that you are given two distinct recurrence relations for the same polynomials but where the polynomials are normalized differently. – Kirill Nov 18 '15 at 18:10
• @Kirill, right, so perform the monicization on the two distinct recurrences; if they yield the same recurrence coefficients, hallelujah! – J. M. Nov 19 '15 at 0:38
• @J.M. But that's not what the exercise asks for, so I'm not sure what you mean. – Kirill Nov 19 '15 at 2:05
• how is it straight forward algebra? you have one equation and two unknowns – anonym Nov 12 '16 at 18:08

I'm just going to sketch it out. I think the key mistake is assuming that the two matrices are going to be equal---the exercise itself notes that $P_n$ and $q_{n+1}$ are proportional but normalized differently. Also, I'm not sure how exactly you defined the second matrix — you mention "two Jacobi matrices" but the exercise just says "the two tridiagonal matrices corresponding to the formulas".
The matrix $T_{i,j} = (q_i, xq_j)$ has elements $T_{n,n+1} = T_{n+1,n} = \beta_n$.
The tridiagonal matrix $P_{i,j}$ defined by the recurrence for $P_n$ is obtained from rewriting the recurrence as $$x P_n(x) = P_{n,n-1} P_{n-1}(x) + P_{n,n+1} P_{n+1}(x).$$
This is not the same as "$P_{ij} = (P_i, xP_j)$" — the tridiagonal matrices $P$ and $T$ are the matrix representations of "multiplication by $x$" in their respective polynomial basis ($q$ or $P$). So the relationship between them comes from the fact that it's the same linear operator applied to different bases. To check, the eigenvalues of both $P$ and $T$ should be the same and be identical to the roots of the appropriate polynomial—the two matrices are similar.
So it is sufficient to use the fact that $P_n(x) = \|P_n\| q_{n+1}(x)$: $$\beta_n = T_{n,n+1} = (q_n, xq_{n+1}) = \left( \frac{P_{n-1}}{\|P_{n-1}\|}, \frac{x P_n}{\|P_n\|} \right) = \frac{\|P_{n-1}\|}{\|P_n\|}\, P_{n,n-1}.$$
From here getting the value of $\|P_n\|$ is just straightforward algebra and for me it came out to $\sqrt{\frac{2}{2n+1}}$.