Re: [sympy] Re: why eigenvectors very slow

2018-10-09 Thread Jacob Miner
I think I understand, but is there an implementation of this technique that can actually perform the linear algebra on a symbolic matrix at such improved compute-time? On Tuesday, October 9, 2018 at 1:58:04 PM UTC-6, Isuru Fernando wrote: > > First k-1 entries of the k th eigenvector for an

Re: [sympy] Re: why eigenvectors very slow

2018-10-09 Thread Isuru Fernando
First k-1 entries of the k th eigenvector for an upper triangular matrix U is U[:k-1,:k-1]^-1 @ U[:k-1,k], which is a triangular solve since U[:k-1,:k-1] is a triangular matrix and it can be done in O(k^2) time. Isuru On Tue, Oct 9, 2018 at 1:27 PM Jacob Miner wrote: > Isuru, > > I went into

Re: [sympy] Re: why eigenvectors very slow

2018-10-09 Thread Jacob Miner
Isuru, I went into Heath's text to get your reference, and it helps layout the method, but can you please clarify what you meant by 'triangular solves'? Thank you. On Tue, Oct 9, 2018, 10:45 Aaron Meurer wrote: > Your matrix is far simpler than I had imagined (you should have > mentioned that

Re: [sympy] Re: why eigenvectors very slow

2018-10-09 Thread Aaron Meurer
Your matrix is far simpler than I had imagined (you should have mentioned that it was triangular). I think as Isuru said we can likely implement a faster method for triangular matrices. The eigenvalues themselves (the diagonals) are already computed very quickly. Aaron Meurer On Tue, Oct 9, 2018

Re: [sympy] Re: why eigenvectors very slow

2018-10-09 Thread Isuru Fernando
Hi, For triangular matrices, it's straightforward to calculate eigenvectors. You just need triangular solves. See Section 4.4.1 of Heath's Scientific Computing 2nd Edition. Isuru On Tue, Oct 9, 2018 at 11:27 AM Jacob Miner wrote: > I will show you a representation of the 7x7 form of my

Re: [sympy] Re: why eigenvectors very slow

2018-10-09 Thread Jacob Miner
I will show you a representation of the 7x7 form of my matrix, the 10x10 includes a couple additional elements, but has the same overall structure and layout. The key point is that the diagonal elements are differences of multiple values, and each of these values occupies a certain element in

Re: [sympy] Re: why eigenvectors very slow

2018-10-04 Thread Aaron Meurer
How sparse is the matrix, and what do the entries look like? One thing that can help depending on what your matrix looks like is to replace large subexpressions with symbols (if there are common subexpressions, cse() can help with this). That way the simplification algorithms don't get caught up

Re: [sympy] Re: why eigenvectors very slow

2018-10-04 Thread Jacob Miner
On Friday, July 10, 2015 at 3:07:17 PM UTC-6, Ondřej Čertík wrote: > > Hi, > > On Fri, Jul 10, 2015 at 7:30 AM, 刘金国 > > wrote: > > 4 x 4 is needed ~~ > > mathematica runs extremely fast for 4 x 4 matrix as it should be, but > ... > > Can you post the Mathematica result? So that we know

Re: [sympy] Re: why eigenvectors very slow

2015-07-10 Thread Ondřej Čertík
Hi, On Fri, Jul 10, 2015 at 7:30 AM, 刘金国 cacate0...@gmail.com wrote: 4 x 4 is needed ~~ mathematica runs extremely fast for 4 x 4 matrix as it should be, but ... Can you post the Mathematica result? So that we know what you are trying to get and we can then help you get it with SymPy. Ondrej