First time here? Check out the FAQ!
asked 2010-08-23 15:13:36 +0100
Is there something like ?
sage: A = matrix(QQ,3,3,[3,-1,1,3,6,2,3,3,7]) sage: A.diagonal() [3,6,7]
sage: A = matrix(QQ,3,3,[3,-1,1,3,6,2,3,3,7])
sage: A.diagonal()
[3,6,7]