First time here? Check out the FAQ!
answered 2020-11-27 08:54:06 +0100
Like this
sage: M = matrix(2, 2, [1, 2, 3, 4]) sage: sum(M.coefficients()) 10