Top
Back: D.3.1.3 diag
Forward: D.3.1.5 flatten
FastBack: D. SINGULAR libraries
FastForward: E. Release Notes
Up: D.3.1 matrix_lib
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

D.3.1.4 dsum

Procedure from library matrix.lib (see matrix_lib).

Usage:

dsum(A1,A2,..); A1,A2,... matrices

Return:

matrix, direct sum of A1,A2,...

Example:

 
LIB "matrix.lib";
ring r = 0,(x,y,z),ds;
matrix A[3][3] = 1,2,3,4,5,6,7,8,9;
matrix B[2][2] = 1,x,y,z;
print(A);
→ 1,2,3,
→ 4,5,6,
→ 7,8,9 
print(B);
→ 1,x,
→ y,z 
print(dsum(A,B));
→ 1,2,3,0,0,
→ 4,5,6,0,0,
→ 7,8,9,0,0,
→ 0,0,0,1,x,
→ 0,0,0,y,z 

Top Back: D.3.1.3 diag Forward: D.3.1.5 flatten FastBack: D. SINGULAR libraries FastForward: E. Release Notes Up: D.3.1 matrix_lib Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.