Macaulay2 » Documentation
Packages » NCAlgebra :: NCMatrix
next | previous | forward | backward | up | index | toc

NCMatrix -- Type of a matrix over a noncommutative ring

Description

This is the type of a matrix over a noncommutative ring. These represent homomorphisms between two free modules in chosen bases (whether you think of it as a map of left or right modules is up you). Modules themselves are not implemented yet in the NCAlgebra package, but are slated for a later release.

Common ways to make (and use) a matrix include

Common ways to get information about matrices

Common operations on matrices:

This is the type of a matrix with entries in an NCRing. Many of the basic operations one can perform on a Matrix are also allowed with an NCMatrix, and the behavior of the functions should be similar to the corresponding 'usual' command. Some examples of creating and using NCMatrices are given below.

i1 : A = QQ{a,b,c,d}

o1 = A

o1 : NCPolynomialRing
i2 : M = ncMatrix {{a,b,c,d}}

o2 = | a b c d |

o2 : NCMatrix
i3 : N = ncMatrix {{M,2*M,3*M},{4*M,5*M,6*M}}

o3 = | a   b   c   d   2*a 2*b 2*c 2*d 3*a 3*b 3*c 3*d |
     | 4*a 4*b 4*c 4*d 5*a 5*b 5*c 5*d 6*a 6*b 6*c 6*d |

o3 : NCMatrix
i4 : B = QQ{x,y,z}

o4 = B

o4 : NCPolynomialRing
i5 : f = y*z + z*y - x^2

            2
o5 = zy+yz-x

o5 : B
i6 : g = x*z + z*x - y^2

         2
o6 = zx-y +xz

o6 : B
i7 : h = z^2 - x*y - y*x

      2
o7 = z -yx-xy

o7 : B
i8 : I = ncIdeal {f,g,h}

                             2      2      2
o8 = Two-sided ideal {zy+yz-x , zx-y +xz, z -yx-xy}

o8 : NCIdeal
i9 : Igb = ncGroebnerBasis I
--Calling Bergman for NCGB calculation.
Complete!

      2    2                2
o9 = y x-xy ; Lead Term = (y x, 1)
       2  2                  2
     yx -x y; Lead Term = (yx , 1)
         2
     zx-y +xz; Lead Term = (zx, 1)
            2
     zy+yz-x ; Lead Term = (zy, 1)
      2                      2
     z -yx-xy; Lead Term = (z , 1)

o9 : NCGroebnerBasis
i10 : M = ncMatrix {{x, y, z}}

o10 = | x y z |

o10 : NCMatrix
i11 : sigma = ncMap(B,B,{y,z,x})

o11 = NCRingMap B <--- B

o11 : NCRingMap
i12 : N = ncMatrix {{M},{sigma M}, {sigma sigma M}}

o12 = | x y z |
      | y z x |
      | z x y |

o12 : NCMatrix
i13 : Nred = N^3 % Igb

o13 = | -y^2*z+y^3+y*x*z-y*x*y+x*y*z+x*y^2+2*x*y*x+x^2*z+3*x^2*y y^2*z+y*x*z+2*y*x*y+x*y*z+3*x*y^2-x*y*x-x^2*z+x^2*y+x^3  2*y^2*z+y^3+y*x*y+x*y*x+2*x^2*z+x^3                      |
      | y^2*z+y*x*z+2*y*x*y+x*y*z+3*x*y^2-x*y*x-x^2*z+x^2*y+x^3  2*y^2*z+y^3+y*x*y+x*y*x+2*x^2*z+x^3                      -y^2*z+y^3+y*x*z-y*x*y+x*y*z+x*y^2+2*x*y*x+x^2*z+3*x^2*y |
      | 2*y^2*z+y^3+y*x*y+x*y*x+2*x^2*z+x^3                      -y^2*z+y^3+y*x*z-y*x*y+x*y*z+x*y^2+2*x*y*x+x^2*z+3*x^2*y y^2*z+y*x*z+2*y*x*y+x*y*z+3*x*y^2-x*y*x-x^2*z+x^2*y+x^3  |

o13 : NCMatrix
i14 : C = B/I

o14 = C

o14 : NCQuotientRing
i15 : phi = ncMap(C,B,gens C)

o15 = NCRingMap C <--- B

o15 : NCRingMap
i16 : NC = phi N

o16 = | x y z |
      | y z x |
      | z x y |

o16 : NCMatrix
i17 : N3C = NC^3

o17 = | -y^2*z+y^3+y*x*z-y*x*y+x*y*z+x*y^2+2*x*y*x+x^2*z+3*x^2*y y^2*z+y*x*z+2*y*x*y+x*y*z+3*x*y^2-x*y*x-x^2*z+x^2*y+x^3  2*y^2*z+y^3+y*x*y+x*y*x+2*x^2*z+x^3                      |
      | y^2*z+y*x*z+2*y*x*y+x*y*z+3*x*y^2-x*y*x-x^2*z+x^2*y+x^3  2*y^2*z+y^3+y*x*y+x*y*x+2*x^2*z+x^3                      -y^2*z+y^3+y*x*z-y*x*y+x*y*z+x*y^2+2*x*y*x+x^2*z+3*x^2*y |
      | 2*y^2*z+y^3+y*x*y+x*y*x+2*x^2*z+x^3                      -y^2*z+y^3+y*x*z-y*x*y+x*y*z+x*y^2+2*x*y*x+x^2*z+3*x^2*y y^2*z+y*x*z+2*y*x*y+x*y*z+3*x*y^2-x*y*x-x^2*z+x^2*y+x^3  |

o17 : NCMatrix
i18 : X = NC + 3*NC

o18 = | 4*x 4*y 4*z |
      | 4*y 4*z 4*x |
      | 4*z 4*x 4*y |

o18 : NCMatrix
i19 : Y = NC | 2*NC

o19 = | x y z 2*x 2*y 2*z |
      | y z x 2*y 2*z 2*x |
      | z x y 2*z 2*x 2*y |

o19 : NCMatrix
i20 : Z = X || NC

o20 = | 4*x 4*y 4*z |
      | 4*y 4*z 4*x |
      | 4*z 4*x 4*y |
      | x   y   z   |
      | y   z   x   |
      | z   x   y   |

o20 : NCMatrix

Functions and methods returning an object of class NCMatrix :

Methods that use an object of class NCMatrix :

For the programmer

The object NCMatrix is a type, with ancestor classes MutableHashTable < HashTable < Thing.