DirectSum
The direct sum of a sequence of matrices.
Syntax
-
DirectSum(A[, B[, ...]])-
A, B, ...are matrices
-
Description
If A, B, ... is a sequence of matrices, then DirectSum(A, B, ...) returns the block diagonal matrix having A, B, ... on the diagonal.
Notes
The n-ary ⊕ operator is implemented by DirectSum.
Examples
A ≔ ❨❨1, 2❩, ❨3, 4❩❩; B ≔ ❨❨5, 1, 3❩, ❨1, 0, 2❩❩; C ≔ ❨❨5, 1❩, ❨0, 1❩❩;
DirectSum(A, B, C)
⎛1 2 0 0 0 0 0⎞ ⎜3 4 0 0 0 0 0⎟ ⎜0 0 5 1 3 0 0⎟ ⎜0 0 1 0 2 0 0⎟ ⎜0 0 0 0 0 5 1⎟ ⎝0 0 0 0 0 0 1⎠