Positive, negative, complex determinants

In summary: So it might be -1e-10, which is strange, but happens.Anyways, we can close this topic. Thanks for your help!In summary, the conversation discusses the concept of determinants in square matrices and their properties. It is mentioned that the determinant is often thought to be positive, but this is not always the case. The concept of negative and complex determinants is also brought up, along with the question of whether it is allowed to take the absolute value of the determinant in certain cases. The conversation ends with the realization that for convex optimization problems, the determinant must be positive.
  • #1
divB
87
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
  • #2
  • #3
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
  • #4
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
  • #5
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:
  • #6
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.
 

1. What are positive, negative, and complex determinants?

Positive, negative, and complex determinants are mathematical terms used to describe the sign and type of a determinant, which is a value that can be calculated from a matrix of numbers. A positive determinant means that the matrix is oriented in a certain direction, a negative determinant means that the matrix is oriented in the opposite direction, and a complex determinant involves imaginary numbers.

2. How are positive, negative, and complex determinants used in science?

In science, positive and negative determinants are often used in physics and engineering to represent the direction of a vector or the orientation of a force. Complex determinants are used in fields such as quantum mechanics and electromagnetism, where calculations involving imaginary numbers are necessary.

3. What is the difference between a positive and negative determinant?

The main difference between a positive and negative determinant is the orientation of the matrix. A positive determinant means that the matrix is oriented in a certain direction, while a negative determinant means that the matrix is oriented in the opposite direction. This can be visualized as a clockwise or counterclockwise rotation of the matrix.

4. How are positive, negative, and complex determinants calculated?

To calculate a determinant, you first need to have a square matrix with an equal number of rows and columns. For positive and negative determinants, you can use the standard formula of multiplying the elements in the main diagonal and subtracting the product of the elements in the opposite diagonal. For complex determinants, you will need to use the more advanced method of finding the eigenvalues and eigenvectors of the matrix.

5. What are some real-life examples of positive, negative, and complex determinants?

In real life, positive and negative determinants can be seen in the direction of a magnetic field or the orientation of a plane in flight. Complex determinants can be observed in quantum mechanics experiments or in the analysis of electronic circuits. They are also used in computer graphics to determine the orientation and perspective of objects in a 3D space.

Similar threads

Replies
3
Views
1K
  • Linear and Abstract Algebra
Replies
8
Views
2K
  • Linear and Abstract Algebra
Replies
10
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
10K
  • Linear and Abstract Algebra
Replies
13
Views
5K
Replies
4
Views
1K
  • Linear and Abstract Algebra
Replies
4
Views
3K
Replies
6
Views
2K
  • Differential Equations
Replies
3
Views
2K
  • Linear and Abstract Algebra
Replies
1
Views
727
Back
Top