ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 17 Nov 2017 12:15:03 +0100summation of matriceshttps://ask.sagemath.org/question/39638/summation-of-matrices/ Can we use sum function to add a number of matrices? If not, then how to add a number of matrices with just a single command. Suppose I want to create 10 random matrices of order 5x5 and then want their sum as a result. I tried the following command, but it didn't work.
A_{i}=random_matrix(ZZ,5,5) for i in range(1,10);
sum(A_{i}, i, 1, 10)
Note: I even could not generate 10 random matrices with the above command.
Deepak SarmaFri, 17 Nov 2017 12:15:03 +0100https://ask.sagemath.org/question/39638/