Ask Your Question

How does one detect cyclic vectors in SAGE?

asked 2015-06-04 15:12:06 -0500

Phoenix gravatar image

updated 2015-09-02 05:31:55 -0500

FrédéricC gravatar image

Given a vector $v$ and a matrix $A$ of dimension $n$, one would say that $v$ is a cyclic vector of $A$ if the following set is linearly independent ${ v,Av,A^2v,..,A^{n-1}v }$.

Is there a way to test this property on SAGE given a $v$ and a $A$?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2015-06-05 06:32:26 -0500

tmonteil gravatar image

You can get the list of vectors as follows:

sage: [A^k*v for k in range(n)]

Then you can check that they are linearly independent by looking at the determinant of the matrix made with those vectors:

sage: det(matrix([A^k*v for k in range(n)]))


sage: matrix([A^k*v for k in range(n)]).is_invertible()
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-06-04 15:12:06 -0500

Seen: 438 times

Last updated: Jun 05 '15