how to generate matrix by existed matrices



Maybe 'addcol' does what you want:

 (%i1) A:matrix([1,2]);
 (%o1) matrix([1,2])

 (%i2) B:matrix([3,4]);
 (%o2) matrix([3,4])

 (%i5) C: addcol(transpose(A),transpose(B));
 (%o5) matrix([1,3],[2,4])

 (%i6) determinant(C);
 (%o6) -2

Also there is a function 'addrow.'

Barton

-----maxima-bounces at math.utexas.edu wrote: -----



>I?have?two?matrices?A,B.?I?want?to?generate?C?by?A?and?B.
>
>there?is?my?question?in?my?code.
>
>How?can?I?to?do?it?
>
>
>(%i65)?A:matrix([1,2])
>
>(%o65)?matrix([1,2])
>
>(%i66)?B:matrix([3,4])
>
>(%o66)?matrix([3,4])
>
>(%i67)?C:matrix([transpose(A),transpose(B)])
>
>(%o67)?matrix([matrix([1],[2]),matrix([3],[4])])
>
>(%i68)?determinant(C)
>
>`determinant'?called?on?a?non-square?matrix.