Hi,
The alg() returns the cofactor of a matrix, wich is defined as [MATH]el(A;i;j)=(-1)^(i+j)*el(M;i;j)[/MATH], where [MATH]el(M;i;j)[/MATH] is the minor of a matrix.
In the help for alg() function you can see:
[MATH]alg(mat(1;2;3;4;5;6;7;8;9;3;3);1;2)=6[/MATH]
For matrix [MATH]A←mat(1;2;3;4;5;6;7;8;9;3;3)[/MATH], The minor [MATH]el(M;1;2)[/MATH] of A is:
[MATH]el(M;1;2)←det(mat(#;#;#;4;#;6;7;#;9;3;3))[/MATH]
[MATH]el(M;1;2)←det(mat(4;6;7;9;2;2))[/MATH]
so, [MATH]el(A;1;2)[/MATH] is the cofactor of A, calculated as:
[MATH]el(A;1;2)

-1)^(1+2)*(4*9-7*6)=6[/MATH].
Regards,
Oscar Campo