Macaulay2 » Documentation
Packages » Macaulay2Doc » matrices » submatrices » Matrix ^ Array
next | previous | forward | backward | up | index | toc

# Matrix ^ Array -- component of map corresponding to summand of target

- Operator: ^
- Usage:
    `F^[i,j,...,k]`
- Inputs:
  - F, a matrix
  - [i,j,...,k], an array of indices
- Outputs:
  - a matrix

## Description

The target of the matrix F should be a direct sum, and the result is the component of this map corresponding to the sum of the components numbered or named i, j, ..., k. Free modules are regarded as direct sums of modules. In otherwords, this routine returns the map given by certain blocks of columns.

    i1 : R = ZZ[a..d];

    i2 : F = (vars R) ++ ((vars R) ++ matrix{{a-1,b-3},{c,d}})

    o2 = | a b c d 0 0 0 0 0   0   |
         | 0 0 0 0 a b c d 0   0   |
         | 0 0 0 0 0 0 0 0 a-1 b-3 |
         | 0 0 0 0 0 0 0 0 c   d   |

                 4      10
    o2 : Matrix R  <-- R

    i3 : F^[1]

    o3 = | 0 0 0 0 a b c d 0   0   |
         | 0 0 0 0 0 0 0 0 a-1 b-3 |
         | 0 0 0 0 0 0 0 0 c   d   |

                 3      10
    o3 : Matrix R  <-- R

    i4 : F_[1]^[1]

    o4 = | a b c d 0   0   |
         | 0 0 0 0 a-1 b-3 |
         | 0 0 0 0 c   d   |

                 3      6
    o4 : Matrix R  <-- R

If the components have been given names (see directSum), use those instead.

    i5 : G = (a=>R^2) ++ (b=>R^1)

          3
    o5 = R

    o5 : R-module, free

    i6 : N = map(G,R^2, (i,j) -> (i+37*j)_R)

    o6 = | 0 37 |
         | 1 38 |
         | 2 39 |

                 3      2
    o6 : Matrix R  <-- R

    i7 : N^[a]

    o7 = | 0 37 |
         | 1 38 |

                 2      2
    o7 : Matrix R  <-- R

    i8 : N^[b]

    o8 = | 2 39 |

                 1      2
    o8 : Matrix R  <-- R

    i9 : N = directSum(x1 => matrix{{a,b-1}}, x2 => matrix{{a-3,b-17,c-35}}, x3 => vars R)

    o9 = | a b-1 0   0    0    0 0 0 0 |
         | 0 0   a-3 b-17 c-35 0 0 0 0 |
         | 0 0   0   0    0    a b c d |

                 3      9
    o9 : Matrix R  <-- R

    i10 : N^[x1,x3]

    o10 = | a b-1 0 0 0 0 0 0 0 |
          | 0 0   0 0 0 a b c d |

                  2      9
    o10 : Matrix R  <-- R

This works the same way for maps between chain complexes.

## See also

- Matrix ^ Array -- component of map corresponding to summand of target
- Module _ Array -- inclusion from summand
- directSum -- direct sum of modules or maps

## Ways to use this method:

- Matrix ^ Array -- component of map corresponding to summand of target

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/operators/caret.m2:235:0.