Top
Back: power
Forward: submat
FastBack:
FastForward:
Up: matrix_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.3.1.10 skewmat

Procedure from library matrix.lib (see matrix_lib).

Usage:
skewmat(n[,id]); n integer, id ideal

Return:
skew-symmetric nxn matrix, with entries from id
(default: id=maxideal(1))
skewmat(n); creates the generic skew-symmetric matrix

Note:
if id has less than n*(n-1)/2 elements, the matrix is
filled with 0's,

Example:
 
LIB "matrix.lib";
ring R=0,x(1..5),lp;
print(skewmat(4));    // the generic skew-symmetric matrix
==> 0,    x(1), x(2),x(3),
==> -x(1),0,    x(4),x(5),
==> -x(2),-x(4),0,   0,   
==> -x(3),-x(5),0,   0    
ring R1 = 0,(a,b,c),dp;
matrix A=skewmat(4,maxideal(1)^2);
print(A);
==> 0,  a2, ab, ac,
==> -a2,0,  b2, bc,
==> -ab,-b2,0,  c2,
==> -ac,-bc,-c2,0  
int n=3;
ideal i = ideal(randommat(1,n*(n-1) div 2,maxideal(1),9));
print(skewmat(n,i));  // skew matrix of generic linear forms
==> 0,       4a+b-8c, -a+6b+c,  
==> -4a-b+8c,0,       -8a+2b-9c,
==> a-6b-c,  8a-2b+9c,0         
kill R1;


Top Back: power Forward: submat FastBack: FastForward: Up: matrix_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.2, 2023, generated by texi2html.