The functions in this section perform orthogonalization and orthonormalization
of matrices and lattices.
Orthogonalize(X) : ModMatRngElt -> ModMatRngElt, 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:
- An orthogonalized matrix Y in S row-equivalent to X over K;
- An invertible matrix T in the matrix ring over K whose degree is the number of rows of X such that TX=Y;
- The rank of X.
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:
- A diagonal matrix G in S similar to F over K;
- An invertible matrix T in the matrix ring over K whose degree is the number of rows of F such that G=TFT^(tr);
- The rank of F.
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.
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.
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.
> 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