Building Block Matrices

HorizontalJoin(A, B) : MtrxSprs, MtrxSprs -> MtrxSprs
Given a sparse matrix A with r rows and c columns, and a sparse matrix B with r rows and d columns, both over the same coefficient ring R, return the sparse matrix over R with r rows and (c + d) columns obtained by joining A and B horizontally (placing B to the right of A).
VerticalJoin(A, B) : MtrxSprs, MtrxSprs -> MtrxSprs
Given a sparse matrix A with r rows and c columns, and a sparse matrix B with s rows and c columns, both over the same coefficient ring R, return the sparse matrix with (r + s) rows and c columns over R obtained by joining A and B vertically (placing B underneath A).
DiagonalJoin(A, B) : MtrxSprs, MtrxSprs -> MtrxSprs
Given matrices A with a rows and b columns and B with c rows and d columns, both over the same coefficient ring R, return the sparse matrix with (a + c) rows and (b + d) columns over R obtained by joining A and B diagonally (placing B diagonally to the right of and underneath A, with zero blocks above and below the diagonal).
V2.28, 13 July 2023