Ask Your Question

Revision history [back]

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