Positive, negative, complex determinants

Click For Summary
SUMMARY

The discussion centers on the properties of determinants in linear algebra, specifically addressing misconceptions about their positivity. Users clarify that determinants can be negative or complex, particularly when dealing with random matrices generated in MATLAB using the command det(randn(12)) and complex matrices with det(randn(12)+i*randn(12)). The conversation emphasizes that while negative determinants are possible, convex optimization problems typically require positive determinants, leading to questions about the validity of using absolute values. The final consensus is that the determinant must be positive for certain applications, particularly when derived from positive definite matrices.

PREREQUISITES
  • Understanding of linear algebra concepts, particularly determinants
  • Familiarity with MATLAB, specifically the det() function
  • Knowledge of convex optimization principles
  • Basic comprehension of complex numbers and their properties
NEXT STEPS
  • Explore the properties of determinants in linear algebra
  • Learn about positive definite matrices and their significance in optimization
  • Investigate MATLAB's LU decomposition algorithm and its impact on determinant calculations
  • Study the implications of complex determinants in mathematical analysis
USEFUL FOR

Mathematicians, data scientists, and engineers engaged in linear algebra, optimization, and computational mathematics will benefit from this discussion.

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.
 
I am studying the mathematical formalism behind non-commutative geometry approach to quantum gravity. I was reading about Hopf algebras and their Drinfeld twist with a specific example of the Moyal-Weyl twist defined as F=exp(-iλ/2θ^(μν)∂_μ⊗∂_ν) where λ is a constant parametar and θ antisymmetric constant tensor. {∂_μ} is the basis of the tangent vector space over the underlying spacetime Now, from my understanding the enveloping algebra which appears in the definition of the Hopf algebra...

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
2
Views
11K
  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K