The dual space represents functionals from the polynomial ring to the base field. Given a polySpace S with n generators f_1,...,f_n and a dualSpace D with m generators p_1,...,p_m, innerProduct returns a nxm matrix M over the base field whose entries are p_j(f_i).
A dual functional is applied to a polynomial by taking the standard inner product of their coefficient vectors. In other words, the functional represented by the monomial a acts on monomials in the polynomial ring as a(a) = 1 and a(b) = 0 for all other monomials b.
i1 : R = CC[x,y]; |
i2 : S = polySpace matrix{{x+y,2*x+y^2}};
|
i3 : D = dualSpace(matrix{{1,x,y}}, origin R);
|
i4 : M = innerProduct(S, D)
o4 = {-1} | 0 1 1 |
{-2} | 0 2 0 |
2 3
o4 : Matrix R <--- R
|
innerProduct can also be called with one or both inputs a ring element. If both arguments are single elements, the output is also a ring element rather than a matrix.
i5 : innerProduct(S, 1+x)
o5 = {-1} | 1 |
{-2} | 2 |
2 1
o5 : Matrix R <--- R
|
i6 : innerProduct(x, D)
o6 = {-1} | 0 1 0 |
1 3
o6 : Matrix R <--- R
|
i7 : innerProduct(x, 1+x) o7 = 1 o7 : R |
The object innerProduct is a method function.