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

leadComponent -- the leading component(s) of a vector or matrix

Description

i1 : leadComponent vector{0,0,1,0,1}

o1 = 4
i2 : leadComponent vector{0,0,1,2,3,4,0}

o2 = 5
i3 : leadComponent matrix{{0,0,1}, {0,1,0}, {1,0,0}}

o3 = {2, 1, 0}

o3 : List

Leading appears to be a bit of a misnomer here, since the index/indices return are the last, not the first, corresponding to nonzero elements.

This command also works with vectors and matrices that contain polynomial ring elements.

i4 : R = ZZ/5[a,b,c]; leadComponent vector{a*b^2,3*b*c^3,0}

o5 = 1

See also

Ways to use leadComponent:

  • leadComponent(Matrix)
  • leadComponent(Vector)

For the programmer

The object leadComponent is a method function.


The source of this document is in Macaulay2Doc/functions/leadComponent-doc.m2:41:0.