First time here? Check out the FAQ!
answered 8 years ago
Unless i misunderstand you question, if M is your matrix and n is an integer, you can just do:
M
n
sage: M^n
updated 8 years ago
or, if you prefer to be Python compatible:
sage: M**n