# homogeneousVectorFieldDegree -- check if vector fields are homogeneous, and of what degree

## Synopsis

• Usage:
l=homogeneousVectorFieldDegree(M)
l=homogeneousVectorFieldDegree(m)
• Inputs:
• M, , of vector fields
• m, , of vector fields
• Outputs:
• l, a list, either of degrees or false if a vector field is not homogeneous

## Description

This finds the degree of each vector field. When given a Matrix, the function checks the degree of each column. When given a Module, the function checks the degree of each generator.

In a coordinate system $x_1,\ldots,x_n$ with $x_i$ having degree $k_i$, each $\partial_{x_i}$ has degree $-k_i$. Hence, a non-zero vector field $\sum_i f_i\partial_{x_i}$ has degree $d$ if and only if for each $i$, $f_i$ is either $0$ or weighted homogeneous of degree $d+k_i$. The zero vector field has degree $-\infty$.

 i1 : R=QQ[x,y]; i2 : M=matrix {{x^2,1,0,x^2,x*y},{y^2,0,0,y^4,y^2}} o2 = | x2 1 0 x2 xy | | y2 0 0 y4 y2 | 2 5 o2 : Matrix R <--- R i3 : homogeneousVectorFieldDegree(M) o3 = {{1}, {-1}, -infinity, false, {1}} o3 : List i4 : homogeneousVectorFieldDegree(image M) o4 = {{1}, {-1}, -infinity, false, {1}} o4 : List

We also handle non-standard degrees:

 i5 : R=QQ[x,y,Degrees=>{{3},{1}}]; i6 : M=matrix {{x^2,1,0,x^2,x*y},{y^2,0,0,y^4,y^2}} o6 = | x2 1 0 x2 xy | | y2 0 0 y4 y2 | 2 5 o6 : Matrix R <--- R i7 : homogeneousVectorFieldDegree(M) o7 = {false, {-3}, -infinity, {3}, {1}} o7 : List

and multidegrees:

 i8 : R=QQ[x,y,Degrees=>{{3,1},{1,1}}]; i9 : M=matrix {{x^2,1,0,x^2,x*y},{y^2,0,0,y^4,y^2}} o9 = | x2 1 0 x2 xy | | y2 0 0 y4 y2 | 2 5 o9 : Matrix R <--- R i10 : homogeneousVectorFieldDegree(M) o10 = {false, {-3, -1}, -infinity, false, {1, 1}} o10 : List