[next][previous][up][top][index]
search for:

Matrix || Matrix -- join matrices vertically

Synopsis:

  • Operator: || -- a binary operator
  • Input:
  • an instance of class Matrix.
  • an instance of class Matrix.
  • Output:
  • an instance of class 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 = | a b |
         | c d |

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

    o3 = | e f |
         | g h |

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

    o4 = | a b |
         | c d |
         | e f |
         | 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:

  • Matrix | Matrix -- join matrices horizontally
  • Code:

         -- ../../../Macaulay2/m2/matrix.m2:393
         Matrix || Matrix := Matrix => (f,g) -> concatRows(f,g)

    [next][previous][up][top][index]
    search for: