Symmetry of the real inner product gives . Moreover, i with shows that
so the Gram matrix is a positive semidefinite matrix. To also check reality of every eigenvalue, allow a nonzero vector with . Since is a real symmetric matrix,
Here is the conjugate transpose, and cancels the imaginary part. Thus
because . This proves both that every eigenvalue is real and that it is nonnegative.
If every , then each diagonal entry of the Gram matrix is , so its matrix trace is . Using iii and the permitted arithmetic-geometric mean inequality,
The bound is attained by any orthonormal family, whose Gram matrix is the identity matrix.
A row's squared Euclidean norm is , and the dot product of the two rows is . Thus the row Gram matrix is
For the column Gram matrix, the first and third squared column norms are , the middle one is , and the respective cross-products are . Hence
The two products are square matrices of different sizes; their unequal dimensions are consistent with being rectangular.
A Hermitian matrix obeys , where the dagger is conjugate transpose. If with , then . This scalar is real because its complex conjugate equals . Since , the eigenvalue is real.
For the Gram matrix, conjugate symmetry of the inner product gives
Thus is Hermitian. The assumption that the vectors form a basis additionally makes positive definite, though only Hermiticity is needed here.
The adjoint operator , when it exists, is defined by
for all vectors in the relevant domains. This convention takes the inner product to be conjugate-linear in its first argument. Nondegeneracy makes the adjoint unique.
For the standard complex inner product , the equality becomes for every , so
Thus the matrix adjoint is the Hermitian conjugate, not merely the transpose unless the entries are real. In a basis with positive Hermitian Gram matrix , the same definition instead gives , making the dependence on the chosen inner product explicit.
Expand the quadratic form of this Gram matrix:
For , linear independence of the real vectors implies , so its squared Euclidean norm is strictly positive. Thus
proving the positive definiteness of a Gram matrix in the independent-vector case.
Write . The allowed orthogonal projection characterization, applied to the basis , gives the normal equations
Explicitly if is odd and if it is even. These equations can also be derived by differentiating with respect to each coefficient.
The Gram matrix is a symmetric positive-definite matrix. For any nonzero real coefficient vector ,
The polynomial inside the square is nonzero, so its square is positive on some interval. Hence has zero kernel and is invertible. Thus the normal equations have exactly one solution, giving exactly one best least-squares polynomial. This proves both existence and uniqueness. For completeness, if the residual is orthogonal to , then for every the Pythagorean theorem gives , directly verifying minimality and uniqueness.
Write for the vector space of polynomials of polynomial degree at most , and put . As the question calls the weighted integral an inner product, its finiteness is implicit; for example, a positive integrable weight suffices for all the continuous functions involved here.
For every , differentiating the squared weighted norm at its minimum gives the orthogonality equations
In particular, the requested linear system is
Its Gram matrix is a symmetric positive-definite matrix: for any nonzero vector ,
Indeed a nonzero polynomial is nonzero on some open interval, and the weight is positive. Therefore is an invertible matrix, proving uniqueness. Conversely, if these equations hold, the Pythagorean theorem in an inner-product space gives, for every ,
so the solution really is the unique best approximation.
Put . It is a symmetric matrix and a positive semidefinite matrix, while is also a positive semidefinite matrix. By the spectral theorem, choose an orthogonal matrix such that
The bounds follow directly from . Define the diagonal matrices
The columns of are mutually orthogonal, since . For each , set . These columns are orthonormal. At a zero , one has ; choose by completing the already prescribed columns to an orthonormal set of columns in . Such a completion exists because . This gives , including the zero columns.
Likewise, the Gram matrix of is . Normalize its nonzero columns and complete at its zero columns in , using . The resulting has orthonormal columns and . Combining the identities gives
This is a form of the cosine-sine decomposition. Completing the zero columns is essential: neither block was assumed to have full column rank.
An error of order in a squared singular value can become an error of order after taking its square root. To keep nonsingular as required, take and
Then , and the computed eigendecomposition has exactly the permitted backward error:
Nevertheless the second computed singular value has error
By the singular value perturbation bound, every product with these computed singular values and exactly orthonormal outer factors has spectral norm error at least this large. In particular, even the favorable choice gives
which has no uniform bound in big O notation. Therefore backward stability for the eigendecomposition of the Gram matrix does not imply backward stability for the singular value decomposition.
There is a related loss of orthonormality in the raw formula: evaluating exactly for these perturbed factors gives , whose second column has length tending to zero. Its product with equals , but its diagonal factors are consequently not a singular value decomposition. The paper's idealized orthonormality assumption lets us isolate the unavoidable singular value error even if this additional problem is repaired.
The least-squares normal equations are
The full column rank of gives for nonzero , so is a symmetric positive-definite matrix. Apply the Conjugate gradient method to this linear system. To verify that its solution is the desired one, let solve the displayed equations. Then , and for any the Pythagorean identity gives
Thus is the unique minimizer of the linear least-squares problem.
One can apply without forming the Gram matrix: compute . More explicitly, initialize , , ; until the linear-system residual vanishes, use the Conjugate gradient method recurrence
Each dense application of this way costs operations. The condition number satisfies , where ; this is the conditioning cost of the least-squares normal equations.
Independence and common error variance give . For the fixed matrix , the covariance transformation rule gives
Thus the covariance is determined by the error variance and the inverse Gram matrix of the design columns.
Write and . Orthogonality of to and gives
The Gram matrix is positive definite, with determinant , so the solution is unique. Solving yields
The singular weight requires care about the space of admissible polynomials. Since , has finite squared norm. A polynomial has finite error relative to near zero exactly when : a nonzero constant term makes the integrand asymptotic to , whose integral diverges. If , the residual is and the integrand is .
Thus the full space is not a subspace of , so the projection theorem cannot be applied to it as written. Nevertheless a unique best finite-error approximation does exist in
For , this is the zero space and the answer is . For , is finite dimensional and its Gram matrix is positive definite, because a nonzero polynomial cannot vanish on an interval. Solving the normal equations therefore gives its unique orthogonal projection of . All omitted polynomials have infinite error, so this also minimizes the extended error over the full polynomial set. The distinction is an invalid full-space projection premise, not nonexistence of every finite-error best approximation. As throughout weighted , use equivalence classes for the underlying measure.
Write and . Orthogonality of to and gives
The Gram matrix is positive definite, with determinant , so the solution is unique. Solving yields
The singular weight requires care about the space of admissible polynomials. Since , has finite squared norm. A polynomial has finite error relative to near zero exactly when : a nonzero constant term makes the integrand asymptotic to , whose integral diverges. If , the residual is and the integrand is .
Thus the full space is not a subspace of , so the projection theorem cannot be applied to it as written. Nevertheless a unique best finite-error approximation does exist in
For , this is the zero space and the answer is . For , is finite dimensional and its Gram matrix is positive definite, because a nonzero polynomial cannot vanish on an interval. Solving the normal equations therefore gives its unique orthogonal projection of . All omitted polynomials have infinite error, so this also minimizes the extended error over the full polynomial set. The distinction is an invalid full-space projection premise, not nonexistence of every finite-error best approximation. As throughout weighted , use equivalence classes for the underlying measure.
If is a minimizer, then for each the quadratic
has a minimum at , so . Conversely, if this orthogonality holds, then for every the Pythagorean theorem in the inner product space gives
Thus the minimizers are exactly the orthogonal projections characterized by
For existence, write . The conditions form the normal equations , with Gram matrix and . For every nonzero coefficient vector ,
Indeed a nonzero polynomial is nonzero on some open interval away from , where the weight is positive. Hence is a positive-definite matrix and is invertible, proving existence and uniqueness of . Uniqueness also follows from the preceding Pythagorean theorem identity. The zero of the weight at one point therefore causes no degeneracy on continuous functions or polynomials.
Write . Orthogonality of to gives
The entries are obtained by integrating over the given interval. Subtracting the second equation divided by two from the first gives . Thus
The Gram matrix is positive definite, with determinant , so this orthogonal projection is the unique best approximation.
As explained by admissible polynomials for a singular inverse-linear weight, there is a domain issue: the constant polynomial does not belong to the weighted space, because . Hence the full space is not a subspace of , and the preceding inner-product projection theorem cannot be applied to it as stated.
Nevertheless a meaningful finite-error best approximation does exist after restricting to admissible polynomials. The target lies in for every , since its squared integrand near zero is . A polynomial has finite error exactly when : otherwise the residual tends to a nonzero constant and its weighted squared integral diverges; if , it has at least a simple zero and is integrable in the required norm. Thus the admissible approximation space is
For it is , giving best approximation zero. For it is a finite-dimensional inner-product subspace with positive definite Gram matrix, so it has a unique orthogonal projection of . Therefore the full polynomial-space formulation is not defined inside , but the finite-error interpretation has a unique best approximation. Declaring that no best approximation can exist under any interpretation would miss this admissible subspace.
If the error is orthogonal to , then for any ,
proving sufficiency. Conversely, if minimizes, perturb it to for any real . The squared error becomes
A minimum at forces the linear coefficient to vanish, proving necessity.
For existence, choose the basis . Its Gram matrix is positive definite because is the squared norm of the nonzero polynomial with coefficients . Thus is invertible, and the normal equations have a solution, giving an orthogonal residual and therefore a minimizer. The Pythagorean identity shows any other minimizer differs by a polynomial of zero norm, so it is equal to the first. Hence the best polynomial exists and is unique.