gbasis
Groebner basis of a set of polynomials.
Category: Mathematics > Polynomials
Syntax
G = gbasis(P, vars)
Groebner basis of the polynomials P in the variables vars.
G = gbasis(P, vars, 'MonomialOrder', order)
Uses the given monomial ordering.
Description
A Groebner basis is a canonical generating set for the ideal spanned by the polynomials. It allows a division algorithm whose remainder does not depend on the order of division, so it decides ideal membership and underlies elimination. With the lexicographic ordering the basis is triangular in the variables, which solves polynomial systems: the last element depends on one variable only.
The variable order matters. In the example below the lexicographic basis ends in a polynomial of y alone.
Input arguments
P- Vector of symbolic polynomials.
vars- Vector of the variables, in order of priority.
'MonomialOrder''lexicographic','degreeLexicographic'or'degreeInverseLexicographic'(the default).
Output arguments
G- Row vector of polynomials that generate the same ideal as
Pand form a Groebner basis for the chosen ordering.
Example
Default ordering and lexicographic
syms x y
gbasis([x^2 - y, x*y - 1], [x y])
gbasis([x*y - 1, x^2 - y], [x y], 'MonomialOrder', 'lexicographic')
Output
ans =
[x^2 - y, x*y - 1, y^2 - x]
ans =
[- y^2 + x, y^3 - 1]
Notes
MatLivre returns only the basis (one output).