# leadTerm(Matrix) -- get the greatest term of each column

## Synopsis

• Usage:
leadTerm f
• Inputs:
• f, , in a polynomial ring
• Outputs:
• , the lead term matrix of f

## Description

In Macaulay2, each free module over a polynomial ring comes equipped with a monomial order and this routine returns the matrix whose i-th column is the lead term of the i th column of f.
 i1 : R = QQ[a..d]; i2 : f = matrix{{0,a^2-b*c},{c,d}} o2 = | 0 a2-bc | | c d | 2 2 o2 : Matrix R <--- R i3 : leadTerm f o3 = | 0 a2 | | c 0 | 2 2 o3 : Matrix R <--- R
Coefficients are included in the result:
 i4 : R = ZZ[a..d][x,y,z]; i5 : f = matrix{{0,(a+b)*x^2},{c*x, (b+c)*y}} o5 = | 0 (a+b)x2 | | cx (b+c)y | 2 2 o5 : Matrix R <--- R i6 : leadTerm f o6 = | 0 ax2 | | cx 0 | 2 2 o6 : Matrix R <--- R
The argument f can also be , in which case the lead term matrix of the generating matrix of f is returned.