Determinant of Characterisitic Polynomial

In summary, the conversation discusses finding the characteristic polynomial and evaluating the discriminant of a matrix with complex entries. It takes a few hours for smaller matrices, but days for a 10x10 matrix. Parallel processing is not an option and the individual is wondering if there is a more efficient way to evaluate the discriminant. The characteristic polynomial takes seconds in Mathematica, but it is the evaluation of the discriminant that takes a long time. The entries in the matrix are non-numeric and the individual is required to use Mathematica for their research group.
  • #1
azuresky101
2
0
I'm doing a calculation which finds the characteristic polynomial of a matrix, HH, with rather complex entries and then determines the discriminant of that polynomial. For smaller matrices up to around 7x7 it finishes evaluating the Discriminant command within a few hours, but at a 10x10, which is what I need, it takes days to evaluate. Running in parallel won't work for the built in Discriminant command. I was wondering if there was a more efficient way to evaluate the discriminant of high-order polynomial, as I know my code is basic.

CPHH = Collect[CharacteristicPolynomial[HH, x],x]];
DD = Discriminant[CPHH, x, Method -> SylvesterMatrix];
Simplify[DD, TimeConstraint -> Infinity]

If the rest of the code would be useful in determining a solution I'd be happy to post it

***Meant Discriminant in Title***
 
Physics news on Phys.org
  • #2
Well, I have not had to do Matlab nor linear algebra since grad school (a couple of decades ago), so, I had to look up what Characteristic Polynomial is...I just saw a video in YouTube where the prof solved the Char. Poly for a 3x3 matrix in a few minutes...does it really take a few hours to solve a 7x7 in matlab?...I feel like I could solve it by hand in less than one!

What do you mean by "rather complex entries"?

Back then, MATLAB was not faster than a C or Fortran program; lately, I have seen postings in forums that seem to indicate that that continues to be the case...maybe you should write your own program to solve this.
 
  • #3
Finding the characteristic polynomial takes seconds in mathematica. Its evaluating the discriminant of that polynomial that takes so long.

A typical entry in the 21x21 looks like this 1/2 h (61 h k1 - 159 h k2 - 14 g Hz uB). I forgot the particle is spin 10 so the hamiltonian is 21x21, not 10x10 like I said earlier.

Unfortunately it's required of me to use mathematica, as that is what everyone in the research group uses.
 
  • #4
Oh, so it is mathematica and not matlab...same problem, I don't use either.

I looked up Discriminant of a Polynomial, now...I see that they can get pretty lengthy and you seem to be using non-numeric entries which I presume makes things more time consuming.

Anyway, good luck, I am afraid I can't help.
 
  • #5


I would first like to commend you on your efforts to find a solution for efficiently calculating the discriminant of a high-order polynomial. This is a common challenge in mathematical and scientific calculations, and it requires a careful approach to ensure accuracy and efficiency.

From what I can gather, you are using the built-in Mathematica function, Discriminant, to calculate the discriminant of the characteristic polynomial of a complex matrix. However, you have encountered a problem with the efficiency of this function when dealing with larger matrices.

One potential solution to this issue could be to look into alternative methods for calculating the discriminant. For example, instead of using the built-in function, you could try using a different algorithm or approach that may be more efficient for your specific problem. This could involve researching and implementing your own code or utilizing a different software package that may have a more efficient method for calculating the discriminant.

Another option could be to optimize your code for parallel processing. You mentioned that running in parallel did not work for the built-in Discriminant command, but there may be ways to modify your code or use a different parallel processing method that could improve efficiency.

Lastly, it may be helpful to carefully analyze your code and look for any potential areas where it could be optimized or simplified. Sometimes, a small change in the code can make a big difference in efficiency.

Overall, it is important to carefully consider all options and approaches when facing a problem with efficiency in scientific calculations. I hope these suggestions are helpful and I wish you success in finding a solution that works for you.
 

1. What is the determinant of a characteristic polynomial?

The determinant of a characteristic polynomial is a numerical value that represents certain properties of a square matrix. It is calculated by taking the coefficients of the polynomial and arranging them in a specific way, resulting in a single number.

2. How is the determinant of a characteristic polynomial used?

The determinant of a characteristic polynomial is used to find the eigenvalues of a matrix, which are important values in linear algebra. It is also used to determine whether a matrix is invertible or singular.

3. What is the relationship between the determinant of a characteristic polynomial and the eigenvalues of a matrix?

The determinant of a characteristic polynomial is equal to the product of the eigenvalues of a matrix. This means that by finding the determinant, we can also find the eigenvalues of a matrix.

4. Can the determinant of a characteristic polynomial be negative?

Yes, the determinant of a characteristic polynomial can be negative. The sign of the determinant does not affect the eigenvalues of the matrix, as they are always calculated with the absolute value of the determinant.

5. Are there any applications of the determinant of a characteristic polynomial?

Yes, the determinant of a characteristic polynomial has various applications in fields such as physics, engineering, and computer science. It is used in solving systems of linear equations, calculating the stability of a system, and in computer graphics.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
222
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • Poll
  • Science and Math Textbooks
Replies
4
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • Math Proof Training and Practice
2
Replies
55
Views
8K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
16K
Back
Top