Advanced maths

Jacobi matrix reconstruction calculator from eigenvalues and spectral weights

Reconstruct the unique symmetric tridiagonal Jacobi matrix with positive subdiagonals from its first-coordinate spectral measure.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Reconstruct the unique symmetric tridiagonal Jacobi matrix with positive subdiagonals from its first-coordinate spectral measure.

THE FORMULAx p_k(x) = beta_(k+1) p_(k+1)(x) + alpha_k p_k(x) + beta_k p_(k-1)(x).

A worked example

Equal spectral weights at eigenvalues 1 and 3 reconstruct [[2,1],[1,2]]. Its diagonal entries are 2 and its positive subdiagonal is 1.

Good to know

2–12 distinct real eigenvalues and strictly positive weights summing to1. Stable weighted Lanczos/Stieltjes reconstruction, full spectrum and first-coordinate weights verified. State uniqueness convention and reject ill-conditioned unresolved supports; no generic inverse matrix from eigenvalues alone.

What the spectral weights add

The eigenvalues of a symmetric matrix do not determine its entries uniquely. A Jacobi matrix is a more structured object: it is real symmetric and tridiagonal, with strictly positive subdiagonal entries. Supplying both its distinct eigenvalues and their first-coordinate spectral weights determines the unique matrix within that convention.

A spectral weight is the squared first component of a normalized eigenvector. The weights are positive and add to one. They identify how the first coordinate sees each eigenmode, resolving information that the spectrum alone omits. This makes the page an inverse spectral construction rather than a generic matrix builder that arbitrarily chooses eigenvectors for a requested spectrum.

Jacobi matrix reconstruction calculator from eigenvalues and spectral weights worked example13w=1/2w=1/2Jacobi matrix[ 2 1 ][ 1 2 ]
Scroll across to see the full diagram.
Equal spectral weights at eigenvalues 1 and 3 reconstruct [[2,1],[1,2]]. Its diagonal entries are 2 and its positive subdiagonal is 1.

Compare this with the Gaussian quadrature calculator from supplied weight moments. Reconstruct a positive-subdiagonal tridiagonal operator from a discrete spectral measure, rather than derive quadrature nodes and weights from entered moments.

Entering a discrete probability measure

Provide a list of distinct real eigenvalues and one corresponding strictly positive weight for each. The association between each node and its weight matters, even if the pairs are later sorted numerically. Reordering only the node list changes the measure. Reordering both lists together should leave the reconstructed Jacobi matrix unchanged.

The weights must sum to one within the stated arithmetic tolerance. A zero weight would remove a spectral point from the first-coordinate measure and conflict with the irreducible positive-subdiagonal convention at the requested order. Nearly coincident nodes or extremely uneven weights can make the reconstruction ill-conditioned, requiring an explicit unresolved result rather than silently merging points.

Weighted orthogonal polynomials

Start with the constant polynomial of unit weighted norm on the entered nodes. Multiplication by the node coordinate acts as a self-adjoint operator under this weighted inner product. Orthogonalizing successive polynomial degrees gives a three-term recurrence, whose central coefficients become the Jacobi diagonal and whose positive neighboring coefficients become the subdiagonal entries.

A weighted Lanczos or Stieltjes construction computes these coefficients without fitting arbitrary dense matrices. Full reorthogonalization can control accumulated loss of orthogonality for a small finite input. The positive sign convention for each new norm fixes a potential ambiguity: changing signs of basis vectors without that convention could flip subdiagonal signs while preserving the same spectral values.

Reading the reconstructed matrix

The returned diagonal entries are often denoted alpha, and the subdiagonal entries beta. Only these two lists are needed to describe the whole symmetric tridiagonal matrix. The first basis vector corresponds to the constant polynomial in the discrete spectral measure. This is why the supplied weights refer specifically to the matrix's first coordinate rather than an unspecified vector.

A completed order-n construction terminates after using the n distinct support points. The next recurrence norm is zero in exact mathematics because no additional independent polynomial value vector exists. Early numerical breakdown before the requested order indicates unresolved support or conditioning. It should not be hidden by appending arbitrary zero rows and calling the resulting matrix the desired irreducible reconstruction.

The equal two-point worked example

The default measure assigns equal weights to the eigenvalues one and three. Its weighted mean is two, so the first diagonal entry is two. Subtracting that mean gives values minus one and one, whose weighted squared norm is one. The positive subdiagonal is therefore one, and the remaining diagonal entry is also two.

The reconstructed matrix is [[2,1],[1,2]]. Its normalized eigenvectors have first-coordinate squares one half at both eigenvalues. Directly computing its characteristic polynomial gives (lambda minus one) times (lambda minus three). These checks independently verify both parts of the input, rather than validating the matrix only against the eigenvalue list and ignoring the supplied spectral weights.

Residual and invariance checks

Recompute the eigenvalues of the returned matrix and compare them with the entered nodes. Recompute the squared first components of the corresponding normalized eigenvectors and compare them with the paired weights. Checking only one of these conditions is insufficient. Orthogonality of the polynomial value vectors and positivity of every subdiagonal provide additional internal diagnostics.

Adding a constant to every node should add that constant to every diagonal entry while leaving the subdiagonal unchanged. Multiplying all nodes by a positive factor should multiply the entire reconstructed matrix by that factor. These affine tests are easy to interpret and can expose recurrence indexing mistakes that a single symmetric two-node example might not reveal.

Using the inverse spectral result

The matrix describes the exact entered finite measure, within numerical tolerance. It does not infer a physical chain from noisy measurements, estimate missing weights or select an order automatically. If weights are uncertain, many nearby Jacobi matrices may be plausible. Small residuals against rounded inputs do not establish robustness to those external measurement errors.

This task also differs from finding Gaussian quadrature nodes from moments, although both use orthogonal polynomial structure. Here the nodes and weights are already supplied and the requested output is their multiplication operator in a specific basis. Keeping that direction of the problem explicit avoids treating an arbitrary eigenvalue-only construction as a unique answer to a more informative inverse question.

A few questions, answered

Are eigenvalues alone enough?

No. The first-coordinate spectral weights are also needed for the stated unique positive-subdiagonal Jacobi matrix.

Why must every weight be positive?

The supported irreducible order-n matrix requires the first coordinate to see every one of its n distinct eigenvalues.

Can the subdiagonal signs be negative?

The uniqueness convention here fixes all subdiagonal entries to be strictly positive.

What does early recurrence breakdown mean?

The requested independent support could not be resolved numerically; the page should not manufacture missing coefficients.

Find your calculator

Start typing to explore the library.