Compression of a linear operator Created 2026-09-24 Updated 2026-10-14
If is a subspace of a space with an inner product and is its orthogonal projection, the compression of an operator to is
If the columns of are an orthonormal basis of , its matrix in that basis is .
Gram-Schmidt process Created 2026-09-24 Updated 2026-10-14
The Gram-Schmidt process turns a finite ordered family of linearly independent vectors in an inner product space over the real numbers into an orthonormal basis of their linear span. It keeps every successive linear span, so the first new vectors describe exactly the same directions as the first inputs. Its idea is geometric: remove the orthogonal projection onto directions already found, then divide the remaining vector by its norm. This makes a complicated basis easier to use without changing the vector subspace it describes.[ref]
Start with and . At step , use the previously obtained orthonormal set to define
The sum is the orthogonal projection onto a finite-dimensional subspace , and is the orthogonal projection residual. Linear independence ensures : otherwise would already be a linear combination of earlier inputs. If the input family is linearly dependent, use only the retained orthonormal vectors in the sum and omit an input whenever its remainder is the zero vector; do not divide by zero. The retained outputs still form an orthonormal basis of the original linear span, but their number can be smaller than .
For a short verification, orthonormality makes every earlier inner product vanish:
Also is minus a linear combination of earlier vectors, while is plus that same linear combination. These two inclusions, followed by division by a nonzero norm, give
The argument also works in an inner product space over the complex numbers with the existing inner product convention, linear in the first argument: the coefficients remain . With the convention linear in the second argument, write instead.
For a first picture, take and in with the ordinary dot product. Then
Subtracting the diagonal component leaves an orthogonal direction; dividing by its norm makes its length one. If the second input were instead, its orthogonal projection would be the entire input and , revealing linear dependence.
For a full three-dimensional calculation, use the ordinary dot product and the input vectors
The first two steps give
At the third step, the inner products are and . Consequently
The three numerator vectors have pairwise dot products and squared Euclidean norms . Thus the displayed outputs are indeed an orthonormal basis, and the three nonzero remainders also confirm linear independence of the inputs. Keeping the removed coefficients produces the QR decomposition below.
An immediate reward is a reusable orthogonal projection: once an orthonormal basis of a vector subspace is known, any vector has
For the linear span of just the first two inputs in the three-dimensional example, gives . Its orthogonal projection residual is , visibly in the missing orthogonal direction. This is the geometry behind the linear least-squares problem.
The formulas above describe exact arithmetic. With floating-point arithmetic, subtracting an orthogonal projection nearly equal to the input can leave a small remainder; dividing by its small norm can magnify existing roundoff error. The Classical Gram-Schmidt and Modified Gram-Schmidt arrangements agree in exact arithmetic but can give different rounded results. Exact linear dependence and a small computed remainder therefore require different judgments in a numerical implementation.[ref]
Assume a positive even weight on a symmetric domain has finite polynomial moments. Subtracting the orthogonal projection onto a finite-dimensional subspace of onto the lower-degree polynomials gives the unique monic orthogonal polynomial. Reflection produces another such monic polynomial, , so uniqueness gives the parity identity. Every coefficient with the opposite parity to its degree therefore vanishes.
The weight is strictly positive and all its polynomial moments are finite. Thus the given integral is a inner product: for a nonzero polynomial, its square is positive on a nonempty interval, so its weighted integral is strictly positive.
In the finite-dimensional vector space , subtract the orthogonal projection onto a finite-dimensional subspace of onto :
This is monic, since the subtracted polynomial has lower degree, and is orthogonal to every lower-degree polynomial. If were two such monic polynomials, their difference would lie in and be orthogonal to that space. Taking its inner product with itself gives zero, hence the difference vanishes. This proves existence and uniqueness for every , with .
Odd moments vanish because the weight is even; the even moments are
Consequently , while a monic quadratic orthogonal to has no linear term, and orthogonality to one gives its constant term . Thus
Finally is also monic and orthogonal to every lower-degree polynomial, by the change of variable . Uniqueness implies . In particular is odd and
This is parity of monic orthogonal polynomials for an even weight.
Normalize by a riskless bank account with , . For risky assets let be the vector of discounted gains, and let denote a discounted square-integrable contingent claim. An initial total capital and stock holding have discounted terminal portfolio wealth : the bank holding finances the initial purchase of the stocks. Thus the space of attainable claims is
It is finite-dimensional and hence closed. The market is complete market when every square-integrable claim is in this span; with finitely many assets this is also equivalent to replication of every bounded claim.
A dominated martingale measure is a probability measure with and , with the gains integrable under . Its Radon-Nikodym derivative satisfies , and . An equivalent martingale measure has almost surely. A signed martingale measure obeys the same normalization and pricing equations without requiring nonnegativity. The distinction matters for quadratic hedging. For the completeness assertion use the usual no-arbitrage hypothesis, expressed here by existence of an equivalent martingale measure .
The unrestricted one-period quadratic hedge minimizes
Put , and . Remove redundant gains so that is invertible. Differentiating in gives . The remaining squared error is
Therefore
The residual is orthogonal in to and every gain, making the fitted claim the orthogonal projection onto a finite-dimensional subspace onto . Its minimum mean-square error is , and it vanishes exactly when is attainable. If initial capital is fixed instead, the normal equation is
This separates hedging with prescribed capital from simultaneous optimization of capital and risky holdings.
The minimal martingale measure in a one-period market is characterized by leaving unchanged the expectation of every centered square-integrable orthogonal to the martingale part . For square-integrable pricing densities this forces into the span of : the orthogonal complement consists exactly of those . The pricing equation then determines
Indeed and . For every such orthogonal , . Conversely a normalized density preserving all these must have the displayed form, since its coefficients must satisfy . The least-squares initial capital is consequently .
For any other square-integrable signed pricing density , put . Both densities price and all gains, so is orthogonal to their span, including . Hence
Equality holds only when . Densities with infinite second moment cannot improve this finite minimum. This proves the requested minimum over dominated martingale measures whenever , and over all square-integrable signed martingale measures without that extra condition. If , it is also an equivalent martingale measure.
Absence of arbitrage alone does not guarantee that the minimal density is a probability density. For a concrete example, let a single discounted gain take values with probabilities . Then , and . Nevertheless pricing probabilities are strictly positive and give mean gain zero, so an equivalent martingale measure exists. This is negative minimal density in an arbitrage-free one-period market. If the term martingale measure is reserved for probabilities, the printed minimum assertion needs the extra nonnegativity hypothesis; otherwise it is the signed minimum-norm assertion just proved. Minimizing over the nonnegative pricing densities instead is a different constrained projection problem.
Finally, prove completeness and uniqueness of dominated martingale measures. If the market is complete market, every event indicator can be replicated. Under any dominated martingale measure, its expectation equals its initial discounted cost. Consequently any two such measures agree on every event and are equal; existence is supplied by .
Conversely suppose has dimension and is a proper subspace of the whole payoff space. Choose disjoint events of positive probability. Such events exist whenever has dimension greater than : otherwise the space has at most atoms and dimension at most . Let be a basis of . The vectors
are linearly dependent. Choose coefficients , not all zero, whose linear combination is zero, and set . It is bounded, not almost surely zero under , and satisfies for every , in particular for . For define
These densities are strictly positive, normalized, have zero gain means, and are different. Thus incompleteness contradicts uniqueness, proving
The existence hypothesis cannot be discarded: with three positive-probability states and gain , the sole dominated martingale probability concentrates on , yet the two-dimensional attainable space does not span all three states. That market permits arbitrage.
Write . If is a best approximation, then for every and real , the competitor satisfies
The linear coefficient must be zero, since otherwise choosing sufficiently small of the appropriate sign makes this expression negative. Hence . In a real inner product space this is the desired orthogonality; in a complex inner product space, apply the same argument to to show that the imaginary part also vanishes. Thus for all .
Conversely, suppose this orthogonality holds. Every competitor has . The Pythagorean identity then gives
Equality forces . We have proved the characterization, as well as uniqueness:
This is the orthogonal projection onto a finite-dimensional subspace. Completeness of the ambient space is not needed. Existence follows, for example, by solving the invertible Gram matrix system in a basis of the finite-dimensional linear subspace.
Since and ,
Therefore
Put . By part (c), the are normalized sample principal components forming an orthonormal set, and
This is the orthogonal projection onto a finite-dimensional subspace spanned by the , so is the unique closest point in that subspace to .
Part (a) shows that is orthogonal to . Since
the Pythagorean theorem in an inner-product space immediately gives
This is the norm decomposition associated with orthogonal projection onto a finite-dimensional subspace.
For any orthonormal basis of , bilinearity gives
Together with , these identities prove pairwise orthogonality. The construction subtracts the orthogonal projection onto a finite-dimensional subspace from , leaving the orthogonal projection residual.
Assume , so the squared-error integral is finite. Write
At a minimum, differentiating with respect to each coefficient gives
By Fourier orthogonality, the constant has squared norm , each nonconstant cosine has squared norm , and all distinct modes are orthogonal. Thus
These are exactly the Fourier coefficients of the Fourier cosine series of the even function. To check that the stationary choice is a unique global minimum, perturb the coefficients by . The residual is orthogonal to every fitted mode, so the cross terms vanish and
with equality only when every perturbation is zero. The truncated series is the orthogonal projection onto a finite-dimensional subspace spanned by the constant and the first cosine modes.
Weighted inner product Created 2026-10-05 Updated 2026-10-14
For a positive weight , the weighted inner product of functions is . It is the usual inner product in the L2 space for the measure . A Sturm-Liouville eigenfunction expansion uses this weight to make its eigenfunctions orthogonal.
The weight specifies how different locations contribute to a squared error: . More weight makes an error in that region more costly. The weighted Euclidean inner product makes the same choice for a finite list of coordinates.
For an explicit real-function example on , let and approximate by a constant function. The orthogonal projection onto a finite-dimensional subspace spanned by the function gives
The best unweighted constant is . Giving greater weight to larger moves the best constant upward, so a weighting choice changes the approximation even though the allowed family of functions is unchanged.