up previous next
ConcatDiag

create a simple block matrix

Syntax
ConcatDiag(A: MAT, B: MAT): MAT

Description
This function creates a simple block matrix. The two entries are matrices. ConcatDiag(A, B) will return a matrix of the form
                | A 0 |
                | 0 B |


Example
/**/  A := mat([[1,2,3],   [4,5,6]]);
/**/  B := mat([[101,102], [103,104]]);
/**/  ConcatDiag(A, B);
matrix(QQ,
 [[1, 2, 3, 0, 0],
  [4, 5, 6, 0, 0],
  [0, 0, 0, 101, 102],
  [0, 0, 0, 103, 104]])

See Also