[GAP Forum] Block matrices problem
Anvita
anvita21 at gmail.com
Tue Mar 10 06:47:46 GMT 2009
Dear Forum,
I am stuck again :(
Program 1 :
----------------------------------------------
m:=[[1]];
M:=BlockMatrix([[1,2,m],[2,2,m]],2,2);
Display(M);
M*M;
----------------------------------------------
Result 1 :
-------------------------------------------
gap> m:=[[1]];
[ [ 1 ] ]
gap> M:=BlockMatrix([[2,2,m],[1,2,m]],2,2);
<block matrix of dimensions (2*1)x(2*1)>
gap> Display(M);
[ [ 0, 1 ],
[ 0, 1 ] ]
gap> M*M;
<block matrix of dimensions (2*1)x(2*1)>
-------------------------------------------
Program 2 :
--------------------------------------
m:=[[1]];
M:=BlockMatrix([[1,2,m],[2,1,m],[2,2,m]],2,2);
Display(M);
M*M;
--------------------------------------
Result 2 :
----------------------------------------------------
gap> m:=[[1]];
[ [ 1 ] ]
gap> M:=BlockMatrix([[2,1,m],[2,2,m],[1,2,m]],2,2);
<block matrix of dimensions (2*1)x(2*1)>
gap> Display(M);
[ [ 0, 1 ],
[ 1, 1 ] ]
gap> M*M;
Error, two blocks for position [2][2] called from
BlockMatrix( blocks, bm1!.nrb, bm2!.ncb, bm1!.rpb,
bm2!.cpb, bm1!.zero ) called from
<function>( <arguments> ) called from read-eval-loop
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk>
-----------------------------------------------------
What is wrong with Program 2 as opposed to Program 1 ?
Anvita
More information about the Forum
mailing list