First time here? Check out the FAQ!
answered 2023-12-11 14:03:32 +0100
sage: D = matrix(QQ, 2, [[1, 2], [3, 4]]); D [1 2] [3 4] sage: m = D.nrows() sage: M = matrix(QQ, m, lambda i, j: D[(j-i)%m, (-i)%m]); M [1 3] [4 2]