[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Orthogonalization

Orthogonalization

The functions in this section perform orthogonalization and orthonormalization of matrices and lattices.

Orthogonalize(X) : ModMatRngElt -> ModMatRngElt, AlgMatElt, RngIntElt
Orthogonalize(X) : AlgMatElt -> AlgMatElt, AlgMatElt, RngIntElt
Given a matrix X belonging to the the matrix module S=Hom_R(M, N) or the matrix algebra S=M_n(R), where R is a subring of the real field, compute a matrix Y which is row-equivalent over K to X but whose rows are also orthogonal (i.e., YY^(tr) is a diagonal matrix), where K is the field of fractions of R. The rows of X need not be linearly independent. This function returns three values:
OrthogonalizeGram(F) : ModMatRngElt -> ModMatRngElt, AlgMatElt, RngIntElt
OrthogonalizeGram(F) : AlgMatElt -> AlgMatElt, AlgMatElt, RngIntElt
Given a symmetric matrix F belonging to the the matrix module S=Hom_R(M, M) or the matrix algebra S=M_n(R), where R is a subring of the real field, compute a matrix G which is similar to F over K but is also diagonal, where K is the field of fractions of R. The rows of F need not be Z-linearly independent. This function returns three values:
Orthogonalize(L) : Lat -> Lat, AlgMatElt
Given a lattice L, return a new lattice L' which has the same Gram matrix as L but has a weighted standard Euclidean inner product, i.e., the inner product matrix is a diagonal matrix. It may be convenient to work with the lattice L' instead of L, since the weighted standard Euclidean inner product can be efficiently evaluated.
Orthonormalize(F, K) : AlgMatElt, Fld -> AlgMatElt
Cholesky(F, K) : AlgMatElt, Fld -> AlgMatElt
Orthonormalize(F) : AlgMatElt -> AlgMatElt
Cholesky(F) : AlgMatElt -> AlgMatElt
Given a symmetric positive definite matrix F belonging to the the matrix module S=Hom_R(M, M) or the matrix algebra S=M_n(R), where R is a subring of the real field, together with a real field K, return a lower triangular matrix T over K such that F = TT^(tr). (This will involve taking square roots so that is why the result must be a real matrix.) The argument for the real field K may be omitted, in which case K is taken to be the current default real field. Note that this function takes a Gram matrix F, not a basis matrix as in the previous functions.
Orthonormalize(L) : Lat -> AlgMatElt
Cholesky(L) : Lat -> AlgMatElt
Orthonormalize(L) : Lat -> AlgMatElt
Cholesky(L) : Lat -> AlgMatElt
Given a lattice L with Gram matrix F, together with a real field K, return a new lattice over K which has the same Gram matrix F as L but has the standard Euclidean inner product. (This will involve taking square roots so that is why the result must be over a real field.) The argument for the real field K may be omitted, in which case K is taken to be the current default real field. This function is equivalent to the invocation LatticeWithBasis(Orthonormalize(GramMatrix(L), K)). It is sometimes more convenient to work with the resulting lattice since it has the standard Euclidean inner product.

Example Lat_Orthogonalize (H45E15)

As an example for a lattice with non-trivial basis and inner product matrices we choose the dual lattice of the 12-dimensional Coxeter-Todd lattice. We compute the inner products of all pairs of shortest vectors and notice that this gets faster after changing to an isomorphic lattice with weighted standard Euclidean inner product.

> L := Dual(CoordinateLattice(Lattice("Kappa", 12)));
> SL := ShortestVectors(L); 
> SL := SL cat [ -v : v in SL ]; #SL;
756
> time { (v,w) : v,w in SL };
{ -4, -2, -1, 0, 1, 2, 4 }
Time: 115.950
> M := Orthogonalize(L);
> SM := ShortestVectors(M);
> SM := SM cat [ -v : v in SM ]; #SM;
756
> time { (v,w) : v,w in SM };
{ -4, -2, -1, 0, 1, 2, 4 }
Time: 18.989

[Next] [Prev] [Right] [Left] [Up] [Index] [Root]