[GAP Forum] A small question about matrices

Max Horn max at quendi.de
Thu Jun 7 14:31:33 BST 2012


Dear Igor,


Am 07.06.2012 um 14:14 schrieb Igor Korepanov:

> Dear GAP maintainers,
> 
> If I am right, the CanonicalBasis command for vector spaces in a situation like this:
> 
> gap> A := [ [1,2,3], [4,5,6], [7,8,9] ];                    
> [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ]
> gap> BasisVectors( CanonicalBasis( VectorSpace( Rationals, A ) ) );
> [ [ 1, 0, -1 ], [ 0, 1, 2 ] ]
> 
> builds exactly the same matrix as TriangulizeMat, save that zero row(s) is/are stripped off:
> 
> gap> TriangulizeMat( A );;   A;
> [ [ 1, 0, -1 ], [ 0, 1, 2 ], [ 0, 0, 0 ] ]
> 
> My question is: could you confirm that this is firmly so?

Depends on what you exactly want confirmed:

I can confirm that CanonicalBasis in this particular case is currently using TriangulizeMat.

However, in other circumstances (i.e. for other kinds of vector spaces), other methods for CanonicalBasis could be called which work differently. Moreover, at least in principle, it would be possible for future GAP versions to change how CanonicalBasis is implemented; since the documentation does not explicitly specify that TriangulizeMat is used, you should not rely on this! That said, it's rather unlikely that this behavior will change.


Hope that helps,
Max


More information about the Forum mailing list