det(M:MAT) the resulting type depends on the entries of the matrix.
/**/ Use R ::= QQ[x]; /**/ M := Mat(R,[[x,x^2], [x,x^3]]); /**/ det(M); x^4 -x^3 /**/ det(Mat(QQ,[[1,2], [0,5]])); 5