Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
det of empty matrix is 1 #10383
added a commit
Jan 12, 2016
I believe it is set on purpose. It simplifies coding as it is not necessary make preparations for exceptions.
The value 1 is analogous to the value of an empty product. In fact, the determinant of a diagonal matrix is the product of its diagonal entries. For a 0x0 matrix this product takes conventionally the value 1.
Or applying the Leibniz formula, which (at least according to Wikipedia) is the definition of the determinant, you get Sum(sgn(sigma(i))*Product(a_i,sigma(i), (i, 1, n)), (sigma in S_n)). n=0, so the Product is the empty product (i.e., 1), and the Sum is over S_0, which contains one element (the identity; S_n is a group so it always has at least one element). sgn(e) = 1, so the determinant is 1.