# Matrix || Matrix -- join matrices vertically

## Synopsis

• Operator: ||
• Usage:
f = g || h
• Inputs:
• g, , a m by n matrix.
• h, , a r by n matrix.
• Outputs:
• f, , the m+r by n matrix, obtained from matrices g and h by concatenating the columns.

## 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 | | k l | | m n | | o p | 4 2 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 || 33 o5 = {0} | i j | {0} | k l | {0} | m n | {0} | o p | {1} | 33 0 | {1} | 0 33 | 6 2 o5 : Matrix R <--- R

## Caveat

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