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

# NCMatrix - NCMatrix -- Subtract NCMatrices

- Operator: -
- Usage:
    `L = M - N`
- Inputs:
  - M, an instance of the type NCMatrix,
  - N, an instance of the type NCMatrix,
- Outputs:
  - L, an instance of the type NCMatrix,

## Description

This subtracts NCMatrices.

    i1 : A = QQ{x,y,z}

    o1 = A

    o1 : NCPolynomialRing

    i2 : M = ncMatrix {{x, y, z}}

    o2 = | x y z |

    o2 : NCMatrix

    i3 : sigma = ncMap(A,A,{y,z,x})

    o3 = NCRingMap A <--- A

    o3 : NCRingMap

    i4 : N = ncMatrix {{M},{sigma M}, {sigma sigma M}}

    o4 = | x y z |
         | y z x |
         | z x y |

    o4 : NCMatrix

    i5 : N' = ncMatrix {{sigma sigma M}, {sigma M}, {M}}

    o5 = | z x y |
         | y z x |
         | x y z |

    o5 : NCMatrix

    i6 : N - N'

    o6 = | -z+x y-x  z-y  |
         | 0    0    0    |
         | z-x  -y+x -z+y |

    o6 : NCMatrix

## Ways to use this method:

- NCMatrix - NCMatrix -- Subtract NCMatrices

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/NCAlgebra/NCAlgebraDoc.m2:481:0.