1 | initial version |
sage: PolynomialRing(QQ, 'x', 5).gens()
(x0, x1, x2, x3, x4)
For your symbolic matrix, perhaps this is more to your liking?
sage: matrix(SR,4,4, lambda i,j: SR.symbol("a%s%s"%(i,j)))
[a00 a01 a02 a03]
[a10 a11 a12 a13]
[a20 a21 a22 a23]
[a30 a31 a32 a33]