## Synopsis

• Usage:
• Inputs:
• Outputs:
• an integer, or List of integers, the largest index of a nonzero element of v

## 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

• leadTerm -- get the greatest term
• position -- the first element of a list satisfying a condition
• positions -- which elements of a list satisfy a condition
• select -- select from a list, hash table, or string
• support -- list of variables occurring in a polynomial or matrix