(quote ||,Matrix,Matrix)

f||g -- yields the matrix obtained from matrices f and g by concatenating the columns.

i1 : R = ZZ[a..h];
i2 : p = matrix {{a,b},{c,d}}

o2 = {0} | a b |
     {0} | c d |

             2       2
o2 : Matrix R  <--- R
i3 : q = matrix {{e,f},{g,h}}

o3 = {0} | e f |
     {0} | g h |

             2       2
o3 : Matrix R  <--- R
i4 : p || q

o4 = {0} | a b |
     {0} | c d |
     {0} | e f |
     {0} | g h |

             4       2
o4 : Matrix R  <--- R

If one of the arguments is ring element or an integer, then it will be multiplied by a suitable identity matrix.

i5 : p || 33

o5 = {0} | a  b  |
     {0} | c  d  |
     {1} | 33 0  |
     {1} | 0  33 |

             4       2
o5 : Matrix R  <--- R

See also || and Matrix || Matrix.


topindexpreviousupnext