On Saturday, March 19, 2016 at 4:31:04 AM UTC+1, Travis Scrimshaw wrote:
>
> Hey all,
>    We ended up needing to compute the determinant of a 0x0 matrix in 
> #17030.Sage currently says the following:
>
> sage: mat = matrix(ZZ, 0, 0)
> sage: mat.det()
> 1
>
> However, the code (and myself) was expecting this to be 0 as the sum in the 
> definition is vacuous.
>
> Although, in a sense, the 0x0 matrix is its own inverse, so this might be an 
> argument for having it be 1.
>
> Thoughts?
>
>
Using the Leibniz formula as the definition, the determinant of an n by n 
matrix is a sum of products, one product for each of the n! permutations on 
n elements. When n = 0, there is exactly one such permutation, the identity 
permutation of the empty set, so there is one term in the sum for the 
determinant, and its value is 1 since it is the empty product.

This convention also agrees with the determinant being the product of all 
eigenvalues, and other useful properties.

Fredrik

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to