Positive, negative, complex determinants

divB
Messages
85
Reaction score
0
Hi,

I have a rather trivial question but google did not really help me. So far I was always familiar with the fact that the determinant of a square matrix is positive.

But it is not. When I randomly execute det(randn(12)) in MATLAB I get a negative determinant every couple of trials.

What is the meaning of a negative determinate? And is it allowed to take the absolute value in this case?
For example, in a convex optimization problem, you often maximize the log-determinant of a matrix. But in order for this to be defined, the determinant should be positive.

Even worse, if I have a complex matrix, the determinant is generally complex too. For example, executing "det(randn(12)+i*randn(12))" in MATLAB always gives a complex determinant.

Similarly to above: How to interpret a complex determinant, what does it tell me?

And if my matrix in such a convex optimization problem is complex, log(det(A)) will also be complex. Since ">" for complex numbers is defined as the absolute value anyway, am I allowed to take the absolute value of the determinant, i.e., "log(abs(det(A)))" ?
 
Physics news on Phys.org
divB said:
Hi,

I have a rather trivial question but google did not really help me. So far I was always familiar with the fact that the determinant of a square matrix is positive.
That is very very wrong. You may just be confusing the notation |A| for the determinant with the absolute value notation.

But it is not. When I randomly execute det(randn(12)) in MATLAB I get a negative determinant every couple of trials.
Well, yes, I would expect "positive" and "negative" determinants to be about equally likely.

What is the meaning of a negative determinate? And is it allowed to take the absolute value in this case?
For example, in a convex optimization problem, you often maximize the log-determinant of a matrix. But in order for this to be defined, the determinant should be positive.
I suspect that you may find that for convex optimization problems the determinant must be positive.

Even worse, if I have a complex matrix, the determinant is generally complex too. For example, executing "det(randn(12)+i*randn(12))" in MATLAB always gives a complex determinant.
Again, not surprising. The real numbers form a subset of the complex numbers of "measure 0".

Similarly to above: How to interpret a complex determinant, what does it tell me?

And if my matrix in such a convex optimization problem is complex, log(det(A)) will also be complex. Since ">" for complex numbers is defined as the absolute value anyway, am I allowed to take the absolute value of the determinant, i.e., "log(abs(det(A)))" ?
How you "interpret" the determinant of a matrix depends upon how you are interpreting the matrix! Again, I suspect that a "convex optimization problem" is a special case. What sort of "convex optimization problem" would give you a complex matrix?

(I would NOT say that "> for complex numbers is defined as the absolute value". I would say that, since the complex numbers is not an ordered field, there is NO ">" on the complex numbers. In particular, we do NOT say that "a> b if and only if |a|> |b|" which is what your wording implies.)
 
  • Like
Likes 1 person
divB said:
Hi,

I have a rather trivial question but google did not really help me. So far I was always familiar with the fact that the determinant of a square matrix is positive.

But it is not. When I randomly execute det(randn(12)) in MATLAB I get a negative determinant every couple of trials.

What is the meaning of a negative determinate? And is it allowed to take the absolute value in this case?
For example, in a convex optimization problem, you often maximize the log-determinant of a matrix. But in order for this to be defined, the determinant should be positive.

Even worse, if I have a complex matrix, the determinant is generally complex too. For example, executing "det(randn(12)+i*randn(12))" in MATLAB always gives a complex determinant.

Similarly to above: How to interpret a complex determinant, what does it tell me?

And if my matrix in such a convex optimization problem is complex, log(det(A)) will also be complex. Since ">" for complex numbers is defined as the absolute value anyway, am I allowed to take the absolute value of the determinant, i.e., "log(abs(det(A)))" ?

Start with a Real matrix with positive determinant and exchange any two of its rows. Or, if n
is odd, and the matrix (this is not true for the movie ;) ) M is nxn, multiply all entries by -1.
This gives you material for a bijection between the two (positive and negative det.; if two rows are equal, then DetM =0).

Still, in a sense, the determinant of a matrix is more likely to be nonzero than to be zero. Maybe that is what you meant?
 
Last edited:
  • Like
Likes 1 person
SteamKing said:
It is? That's news to me. It's also news to these guys:

https://people.richland.edu/james/lecture/m116/matrices/determinant.html

See "Properties of Determinants".

This is probably a bad reference because the first sentence is already "A determinant is a real number associated with every square matrix" - obviously wrong.

Anyways, this sentence was not at all important and you misinterpreted it: I meant I am familiar with the fact, i.e., so far I had only to do with positive definite matrices.

EDIT: By reading my sentence again I wrote it wrong, yes. But I intended to mean something else ;-)
 
Last edited:
HallsofIvy said:
That is very very wrong. You may just be confusing the notation |A| for the determinant with the absolute value notation.

You misinterpreted my sentence, see my first reply.

Well, yes, I would expect "positive" and "negative" determinants to be about equally likely.
I suspect that you may find that for convex optimization problems the determinant must be positive.

I found the issue already: Indeed, it must always be positive. The matric I am using is A^#*A which is positive definite by definition.

However, MATLAB function det() uses a very sub-optimal algorithm based on LU decomposition. I get a complex number but the angle is nearly pi or zero. This explains also why taking the absolute value gives me the correct result.
 
Back
Top