[GAP Forum] A small question about matrices
Igor Korepanov
paloff at ya.ru
Thu Jun 7 14:41:11 BST 2012
Dear Max,
Thank you for the answer, and still a question about the command TriangulizeMat. It seems to me that `triangulizing' a matrix may mean different things for people in different countries of our big world. But at least in GAP this meaning is fixed forever as it is now, yes?
Best wishes,
Igor
07.06.2012, 17:31, "Max Horn" <max at quendi.de>:
> 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