next | previous | forward | backward | up | top | index | toc | home

Matrix | Matrix -- join matrices horizontally

Synopsis

Description

i1 : R = ZZ[i..p];
i2 : g = matrix {{i,j},{k,l}}

o2 = | i j |
     | k l |

             2       2
o2 : Matrix R  <--- R
i3 : h = matrix {{m,n},{o,p}}

o3 = | m n |
     | o p |

             2       2
o3 : Matrix R  <--- R
i4 : f= g | h

o4 = | i j m n |
     | k l o p |

             2       4
o4 : Matrix R  <--- R
If one of the arguments is a ring element or an integer, then it will be multiplied by a suitable identity matrix.
i5 : f | (m-n)

o5 = | i j m n m-n 0   |
     | k l o p 0   m-n |

             2       6
o5 : Matrix R  <--- R

Caveat

It is assumed that the matrices g and h have the same Ring.

See also