Ask Your Question
0

How does one detect cyclic vectors in SAGE?

asked 2015-06-04 22:12:06 +0100

Phoenix gravatar image

updated 2015-09-02 12:31:55 +0100

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
1

answered 2015-06-05 13:32:26 +0100

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)]))

Or,

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

Stats

Asked: 2015-06-04 22:12:06 +0100

Seen: 691 times

Last updated: Jun 05 '15