# Matrix | Matrix -- join matrices horizontally

## Synopsis

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

## 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.