First time here? Check out the FAQ!

Ask Your Question
0

How does one detect cyclic vectors in SAGE?

asked 9 years ago

Phoenix gravatar image

updated 9 years ago

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,A2v,..,An1v.

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 9 years ago

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()
Preview: (hide)
link

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: 9 years ago

Seen: 713 times

Last updated: Jun 05 '15