The piecewise-linear hat functions have disjoint supports unless their nodes coincide or are neighbours. Direct integration on the two adjacent intervals gives
Since and the hat is symmetric about , its load is . Thus the reaction-diffusion finite element matrix gives the explicit equations
The coefficient matrix is a tridiagonal matrix and a positive-definite matrix by the energy identity in part (b), hence nonsingular. A separate spectral verification uses the sine basis with and gives
Both terms are positive for the Dirichlet modes. This also identifies precisely how the diffusion stiffness matrix and reaction mass matrix combine.
Expand the unknown in Fourier modes:
By Termwise differentiation of a Fourier series,
Also,
Therefore the coefficient of on the left-hand side is
The right-hand side has coefficients
because the coefficient of each of is and the constant coefficient is one. Hence the Fourier spectral system for a cosine-modulated second derivative is
Its coefficient array is an infinite tridiagonal matrix.
For a spectral truncation, retain the modes , set
and impose the displayed coefficient equation for every . This gives an explicit -dimensional tridiagonal system. The resulting finite Fourier series automatically satisfies the periodic boundary conditions.
For Cardinal cubic B-splines, the values at integer knots are
and all other knot values vanish. Since ,
This tridiagonal matrix is strictly diagonally dominant. The standard inverse bound for such a matrix gives
The minimum denominator is , so
Part (b) then yields
Set . At step , let be the column below the diagonal. Choose a Householder reflection sending onto its first coordinate axis, and embed it as
If , use . Left multiplication annihilates entries in column . Right multiplication performs the matching operation on row , because the matrix remains symmetric. The first coordinates are fixed, so zeros already created in earlier columns and rows are preserved.
Here the orthogonality of each is used explicitly: , so each update is a similarity transformation and preserves eigenvalues. After steps,
where is orthogonal and is a real symmetric tridiagonal matrix. This is Householder tridiagonalization.
For an efficient QR algorithm, first reduce a general real matrix to upper Hessenberg matrix by orthogonal similarities. For a real symmetric matrix, use Householder tridiagonalization; the resulting symmetric tridiagonal matrix is the usual input in this setting. These structures are preserved by suitable QR algorithm implementations and greatly reduce the work per iteration.
The output is the eigenvalues, together with an orthogonal reduction when the factors are accumulated. In the symmetric case the target is a diagonal matrix, whose diagonal entries are the real eigenvalues; the accumulated orthogonal columns are eigenvectors. For a general real matrix, the target is the real form in a Schur decomposition: an upper block triangular matrix with diagonal blocks of size one or two. The two-by-two blocks represent complex conjugate eigenvalue pairs. An arbitrary unshifted iteration need not converge, so these describe the intended converged output, with appropriate shifts and block deflation in the QR algorithm.
The four row Gershgorin discs have centres and radii , respectively. Their real-axis intersections are
None of the Gershgorin discs contains zero, so the Gershgorin circle theorem gives
The discs centred at and are each isolated. By Gershgorin eigenvalue counting, they contain exactly one eigenvalue apiece, and both eigenvalues are simple. Each must be real: the characteristic polynomial is real, so a nonreal root would bring a distinct conjugate root into the same disc. Denote these eigenvalues by and . The remaining two eigenvalues lie in the union of the negative-centred discs.
For the shift , the distances satisfy
for either of the other eigenvalues , since its real part is at most . Thus is uniquely closest to . Once is checked not to be an eigenvalue, the natural full target-disc interval enclosure and a conservative asymptotic direction factor are
As always, inverse iteration requires a nonzero initial target component. The following calculation verifies the shift and gives sharper information.
For the tridiagonal matrix, let be the determinant of the leading block of . Expansion along the last row gives
In particular, , and . Both shifted linear systems are nonsingular. Further exact evaluations are
The intermediate value theorem gives a real root in each of , , and . As has polynomial degree four, these are all its roots and each is simple. In particular, is a diagonalizable matrix, and . The closest competitor to at the shift is , so this refinement yields
For the shift , the original Gershgorin discs only give and ; those bounds do not decide which is closer. The refined interval enclosures do:
for the negative eigenvalues. Therefore the answer for this particular matrix is yes:
Both shifts select the same eigenvector line and alternate signs because . The factor bounds concern asymptotic directional convergence, rather than a universal error reduction from the first iterate for a nonsymmetric matrix. The wider interval remains a valid full-disc enclosure for both shifts; records the stronger information obtained from the characteristic polynomial.
The singular value decomposition gives
Therefore , counting multiplicities. These are the nonnegative square roots: zero singular values must be included if is singular. Strict positivity requires full rank, which the question does not assume.
Write the lower bidiagonal matrix entries as and . Its columns and have disjoint supports if , so has no entries outside the three central diagonals. More explicitly,
This proves both symmetry and the tridiagonal matrix structure.
A generic lower triangular matrix has a dense first column. The first left Householder transformation in its QR decomposition mixes those rows, usually creating entries throughout the rows to the right. Subsequent eliminations impose upper triangularity but no further systematic zeros; thus is generically a full upper triangular matrix.
For Householder bidiagonalization use two-sided operations instead. At stage , a right Householder transformation acting on columns clears the current row beyond its diagonal. Then a left Householder transformation acting on rows clears column below its first subdiagonal. The left operation leaves row unchanged; both operations preserve the already completed lower-bidiagonal rows and columns. Continue for , omitting a final unnecessary left operation. The result is
It follows that . Hence the two symmetric matrices are orthogonally similar and have the same eigenvalues. By part (c), compute the eigenvalues of the symmetric tridiagonal matrix and take their nonnegative square roots to obtain all singular values of .
For a tridiagonal matrix with subdiagonal , diagonal and superdiagonal , banded Gaussian elimination introduces no fill beyond the original band. The Thomas algorithm uses
Update the right side by , . Then back substitution gives
Each row requires only a fixed number of arithmetic operations, so both work and storage are . The assumed absence of a need for pivoting includes nonzero elimination pivots .
A real square orthogonal matrix satisfies , so it preserves the Euclidean norm. The columns of are orthonormal, hence . The induced matrix norm therefore gives
For the left truncation, , and equality is guaranteed for arbitrary only when . Indeed, if , take , where is an omitted column of . Then but . Merely taking does not guarantee preservation for an arbitrary .
A full QR decomposition of a real matrix is , with orthogonal and upper trapezoidal; for a square matrix, is upper triangular. Fix the following sign convention for a Givens rotation: it is the identity except for its block
The block transpose times the block is because , proving orthogonality. Writing , the choice gives and . To zero the other coordinate take , giving . If , both entries are already zero and the identity suffices.
For a tridiagonal matrix, successively rotate adjacent row pairs , each time zeroing the current entry . Earlier columns remain triangular because both affected rows are already zero there. The result is upper triangular, so gives its QR decomposition. Only rotations are required; the resulting has at most two superdiagonals.
For a full square matrix, process columns . Within column , for , rotate rows to eliminate the current entry. Previously cleared columns stay clear. With in application order, , one has . This is QR decomposition by Givens rotations.
Let denote the given tridiagonal matrix and put , including for the empty determinant. The starting values are
For , apply the following elementary row operations in the indicated order, always using the updated rows:
The first three rows now begin
with the fourth column omitted if . When , also use . The resulting block upper triangular matrix has a upper triangular matrix with diagonal entries all one in its top left corner, and in its bottom right corner. All elementary row operations preserved the determinant except the single row interchange. Therefore
Applying this recurrence relation to the three starting values proves by mathematical induction that
Equivalently, the sequence is periodic with period six, with values starting at . A compact closed form is .
The zero matrix has the required pattern, and matrix addition and scalar multiplication preserve every prescribed zero entry. This proves the vector subspace condition. A basis consists of the matrix units
They independently select every permitted entry of a tridiagonal matrix, so the dimension is for .
Use banded Gaussian elimination followed by back substitution. To distinguish the right-hand side from the upper-diagonal coefficients , write it as . If the modified pivot elements are nonzero, the tridiagonal elimination recurrences are
They eliminate just the one entry below each pivot element. Solve the resulting upper bidiagonal matrix system by
There is a bounded number of arithmetic operations per row in each sweep, giving arithmetic operations and storage. The unpivoted recurrences cost arithmetic operations under the usual scalar-operation count.
For a general tridiagonal matrix, nonsingularity alone does not guarantee these pivot elements. If a zero or unsafe pivot element occurs, use partial pivoting between the current row and the next row. These are the only possible nonzero candidates in the current column; adjacent row swaps introduce at most a second upper diagonal. Tracking that fill-in keeps both Gaussian elimination and back substitution at arithmetic operations. For example, is invertible but requires a row swap. If the input is singular, report a zero final pivot element; a unique solution cannot be promised, and compatibility or free-variable analysis is a separate issue. No nonsingularity or safe-pivot assumption is silently inferred from the word tridiagonal.
Put and suppose , so there are interior grid points , . Write . The fixed ends impose homogeneous Dirichlet boundary conditions,
For a sufficiently smooth displacement field, the two Taylor series at fixed time give
where all displayed derivatives on the right are evaluated at . Adding cancels the odd terms, leaving the second-order central difference
Substitute this finite difference into the wave equation and retain continuous time. The resulting method of lines gives coupled second-order ordinary differential equations,
In particular, the first and last equations are and for . With the interior displacement vector only,
Equivalently, , , and all other entries vanish. This entrywise definition also covers small , including when . The matrix is a symmetric matrix and a tridiagonal matrix. The spatial approximation has error in Big O notation; time has not yet been discretized.
Let a real tridiagonal matrix have diagonal entries , positive upper entries , and positive lower entries . Set , and . Then is a symmetric matrix with diagonal and adjacent entries . Indeed its two adjacent entries are and , which are equal by construction. All other zeros are preserved. This matrix similarity implies real eigenvalues and diagonalizability, by the spectral theorem for real symmetric matrices. No sign assumption on is needed. In the weighted formulation of positive diagonal symmetrization of a matrix, the positive diagonal matrix is .
Let . Store the tridiagonal matrix by its diagonal , lower diagonal , and upper diagonal . The linear system is
with the nonexistent endpoint terms omitted. Initialize and . For , compute the elimination multiplier, modified pivot element, and modified right-hand side:
These recurrence relations apply the elementary row operation after the preceding row has already been reduced. The transformed linear system is an upper bidiagonal matrix:
Thus back substitution is especially short:
For , only remains. Check each pivot element before its first division, including before back substitution.
Figure 1.
Tridiagonal elimination preserves the narrow band: only one row and one diagonal coefficient change per step
. Details.
Equivalently, this constructs an LU decomposition with unit lower bidiagonal matrix , whose lower diagonal is , and upper bidiagonal matrix , whose diagonal is and upper diagonal is . The sweep is forward substitution in . There is no fill-in outside these bands when no rows are interchanged. LAPACK's DGTSV source uses these same coefficient and right-hand-side updates in its branch without row interchange.[ref]
The Thomas algorithm is Gaussian elimination specialized to a tridiagonal matrix: each row couples an unknown only to its immediate neighbours. Eliminating one unknown changes just the next diagonal entry and right-hand side. Provided all pivot elements are nonzero, a forward sweep followed by back substitution solves an -unknown linear system in time and storage, using Big O notation. Treating the same entries as a full matrix wastes the zeros: classical dense LU factorization and solve costs grow cubically for factorization and quadratically for storage.
A concrete reason to care is the Dirichlet Poisson solution by tridiagonal elimination: a three-point finite difference for the second derivative couples adjacent points on a mesh, producing precisely this tridiagonal matrix. The same structure occurs in one-dimensional Crank-Nicolson method calculations. NPTEL's archived Lecture 13 introduces the Thomas algorithm from that time-stepping problem and labels the procedure “Thomas algorithm (1949)”.[ref]
Tridiagonal solve costs 2026-10-14
For the displayed unpivoted Thomas algorithm with one right-hand side, count each scalar addition, subtraction, multiplication or division as one arithmetic operation. Forming takes five arithmetic operations per forward step. The last unknown takes one division; each remaining back substitution step takes three arithmetic operations. Thus
This is an operation-count model, excluding assignments, indexing, pivot checks and any special simplifications of the coefficients. It is not a timing benchmark. The original tridiagonal matrix needs scalar entries, and its right-hand side another . Overwriting with and with , then with , keeps storage ; the arrays, rather than the few loop temporaries, determine the total space complexity.
For repeated right-hand sides, retain the LU decomposition: computing once costs arithmetic operations, and each subsequent pair of forward substitution and back substitution sweeps costs . Hence right-hand sides cost arithmetic operations. This is the banded counterpart of Reusing LU factors for multiple right-hand sides.
An invertible matrix need not admit the unpivoted Thomas algorithm. For example,
Here and , but makes undefined. Interchanging the two equations instead gives the upper triangular matrix system , , solved immediately by back substitution. Even a nonzero first diagonal does not guarantee all later pivot elements: has determinant , yet .
For a general tridiagonal matrix, use a solver with partial pivoting when these structural guarantees are unavailable or a dangerously small pivot element occurs. Adjacent row interchanges can introduce a second upper diagonal, so a pivoted solver must track that additional fill-in; it cannot blindly continue the unpivoted recurrence relations. LAPACK's DGTSV explicitly performs partial pivoting, stores this extra upper diagonal, and includes it in back substitution. Its fixed-width storage and bounded work per row retain time for one right-hand side and storage.[ref]