[top][index]
search for:

directSum -- direct sum of modules or maps

directSum(M,N,...) -- forms the direct sum of matrices or modules.

The components can be recovered later with components.

Projection and inclusion maps for direct sums:

  • Module ^ [...] -- projection onto some factors of a direct sum module
  • Module _ [...] -- get inclusion map into direct sum
  • Matrix ^ {...} -- select some rows of a matrix
  • Matrix _ {...} -- get some columns from a matrix
  • It sometimes happens that the user has indices for the components of a direct sum preferable to the usual consecutive small integers. In this case the preferred indices can be specified with code like directSum(a=>M,b=>N,...), as in the following example.

    i1 : F = directSum(a=>ZZ^1, b=>ZZ^2, c=>ZZ^3)

           6
    o1 = ZZ

    o1 : ZZ-module, free
    i2 : F_[b]

    o2 = | 0 0 |
         | 1 0 |
         | 0 1 |
         | 0 0 |
         | 0 0 |
         | 0 0 |

                  6        2
    o2 : Matrix ZZ  <--- ZZ
    i3 : F^[c]

    o3 = | 0 0 0 1 0 0 |
         | 0 0 0 0 1 0 |
         | 0 0 0 0 0 1 |

                  3        6
    o3 : Matrix ZZ  <--- ZZ

    Similar syntax works with ++.

    i4 : F = (a => ZZ^1) ++ (b => ZZ^2)

           3
    o4 = ZZ

    o4 : ZZ-module, free
    i5 : F_[b]

    o5 = | 0 0 |
         | 1 0 |
         | 0 1 |

                  3        2
    o5 : Matrix ZZ  <--- ZZ

    See also:

  • ++ -- a binary operator, usually used for direct sum
  • components -- list the components of a direct sum
  • indexComponents -- specify keys for components of a direct sum
  • indices -- specify keys for components of a direct sum
  • Ways to use directSum :

  • directSum Sequence
  • directSum List

  • [top][index]
    search for: