0
$\begingroup$

...with Mathematica? Or is this going to be impossible? I don't want to start work if it is hopeless. I've already solved the problem on a smaller scale, which involved an 8x8 matrix. Unfortunately, because of the nature of this problem, the next length scale up jumps to 512x512. Crazy.

$\endgroup$
3
  • 6
    $\begingroup$ Numerical or symbolical matrix? Have you tried Eigensystem? $\endgroup$ Commented Jul 27, 2019 at 4:43
  • $\begingroup$ matrix consists of 1's,0's,-1's, and fractions like 1/3,1/9,-1/3,-1/9. A numerical result is fine. $\endgroup$
    – Chris
    Commented Jul 27, 2019 at 19:22
  • 1
    $\begingroup$ If it’s finite precision numerical there’s no issue. 512 x 512 is chump change for Eigensystem if you want the exact result (I.e. get back fractions not decimals) that could be memory intensive. $\endgroup$
    – b3m2a1
    Commented Jul 29, 2019 at 5:34

1 Answer 1

6
$\begingroup$

This should relatively easy to find out.

Make a random Matrix, find out if it's even possible to diagonalize it.

matA = RandomInteger[{-5, 5}, {10, 10}];
DiagonalizableMatrixQ[matA]

*True*

Calculate the Eigenvectors of the matrix to use for further calculations.

$$A_{\text{diag}}={T^{-1}} .A.T$$

matB = Transpose[Eigenvectors[matA]]
matD = Inverse[matB].matA.matB;
DiagonalMatrixQ[matD]
*True*

Assuming your matrix is diagonalisable to begin with, this should give you the solution you're looking for

$\endgroup$
9
  • $\begingroup$ Good point. I can do a simple test. I'm afraid it might overload my desktop mac. So I'll close all the other programs and I'll be ready to turn the power off if it gets stuck. $\endgroup$
    – Chris
    Commented Jul 27, 2019 at 19:20
  • $\begingroup$ Finding the solution of the matrix is diagonalizable or not with a 512x512 matrix only took me a second or two, however i couldnt generate one randomly that was to test with. If you have one already it shouldnt take tooooo much time. $\endgroup$ Commented Jul 27, 2019 at 19:27
  • $\begingroup$ I would think that generating the random 512x512 matrix would be the easy part. $\endgroup$
    – Chris
    Commented Jul 27, 2019 at 19:31
  • 2
    $\begingroup$ Generating a random one yes...one that is diagonalisable right away no so quick... $\endgroup$ Commented Jul 27, 2019 at 19:33
  • 4
    $\begingroup$ @Chris, if your matrix is e.g. Hermitian or normal, then it is guaranteed to be diagonalizable. As you have not mentioned where your matrix came from, we are only able to speculate. $\endgroup$ Commented Jul 28, 2019 at 2:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.