Base class for dense matrices

class sage.matrix.matrix_dense.Matrix_dense

Bases: sage.matrix.matrix2.Matrix

antitranspose()

Returns the antitranspose of self, without changing self.

EXAMPLES:

sage: A = matrix(2,3,range(6)); A
[0 1 2]
[3 4 5]
sage: A.antitranspose()
[5 2]
[4 1]
[3 0]
sage: A.subdivide(1,2); A
[0 1|2]
[---+-]
[3 4|5]
sage: A.antitranspose()
[5|2]
[-+-]
[4|1]
[3|0]
transpose()

Returns the transpose of self, without changing self.

EXAMPLES: We create a matrix, compute its transpose, and note that the original matrix is not changed.

sage: M = MatrixSpace(QQ,  2)
sage: A = M([1,2,3,4])
sage: B = A.transpose()
sage: print(B)
[1 3]
[2 4]
sage: print(A)
[1 2]
[3 4]

.T is a convenient shortcut for the transpose:

sage: A.T
[1 3]
[2 4]
sage: A.subdivide(None, 1); A
[1|2]
[3|4]
sage: A.transpose()
[1 3]
[---]
[2 4]