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

# Matrix ++ Matrix -- direct sum of maps

- Operator: ++

## Description

f++g -- computes the direct sum of two maps between modules.

If an argument is a ring element or integer, it is promoted to a one by one matrix.

    i1 : R = ZZ/101[a..c];

    i2 : vars R ++ transpose vars R

    o2 = {0}  | a b c 0 |
         {-1} | 0 0 0 a |
         {-1} | 0 0 0 b |
         {-1} | 0 0 0 c |

                 4      4
    o2 : Matrix R  <-- R

    i3 : oo^[1]

    o3 = {-1} | 0 0 0 a |
         {-1} | 0 0 0 b |
         {-1} | 0 0 0 c |

                 3      4
    o3 : Matrix R  <-- R

    i4 : a++b++c

    o4 = | a 0 0 |
         | 0 b 0 |
         | 0 0 c |

                 3      3
    o4 : Matrix R  <-- R

Selecting rows or columns of blocks:

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

## See also

- directSum -- direct sum of modules or maps
- Matrix | Matrix -- join matrices horizontally
- Matrix || Matrix -- join matrices vertically

## Ways to use this method:

- Matrix ++ Matrix -- direct sum of maps
- `Matrix ++ RingElement`
- `RingElement ++ Matrix`
- `RingElement ++ RingElement`

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/directSum-doc.m2:73:0.