Macaulay2 » Documentation
Packages » Macaulay2Doc » matrices » Matrix » transpose
next | previous | forward | backward | up | index | toc

transpose -- transpose a matrix or table

Description

Here is an example.
i1 : S = ZZ/10007[x,y,z];
i2 : f = matrix{{x^3,x*y^2,x},{y*x^2,y^3,y}}

o2 = | x3  xy2 x |
     | x2y y3  y |

             2      3
o2 : Matrix S  <-- S
i3 : entries f

        3     2        2    3
o3 = {{x , x*y , x}, {x y, y , y}}

o3 : List
i4 : g = transpose f

o4 = {-3} | x3  x2y |
     {-3} | xy2 y3  |
     {-1} | x   y   |

             3      2
o4 : Matrix S  <-- S
i5 : transpose entries f

        3   2        2   3
o5 = {{x , x y}, {x*y , y }, {x, y}}

o5 : List
The output of transpose is a map between the duals of the original source and target free modules. See:
i6 : degrees f

o6 = {{{0}, {0}}, {{3}, {3}, {1}}}

o6 : List
i7 : degrees g

o7 = {{{-3}, {-3}, {-1}}, {{0}, {0}}}

o7 : List

Caveat

transpose works only for maps between free modules. Use dual for more general maps.

See also

Ways to use transpose:

  • transpose(List)
  • transpose(Matrix)
  • transpose(MutableMatrix)

For the programmer

The object transpose is a method function with a single argument.


The source of this document is in Macaulay2Doc/functions/transpose-doc.m2:40:0.