Function reference · Algebra

groebner

Computes a Gröbner basis of a polynomial system.

Pass the polynomials as a vector; the result is a vector too, in lexicographic order. A Gröbner basis rewrites a system into an equivalent, often triangular one that is easier to solve.

In JavaScript you can also pass the variable order.

Notation

groebner(expressionArray, vars)

Write it in an expression: nerdamer('groebner([x^2+y^2-1,y-x])'), or in the Playground.

nerdamer.groebner

nerdamer.groebner(expressionArray: Vector | ExpressionInput | ExpressionInput[], vars?: string[] | Vector | ExpressionInput): Vector

A method on the default import. Arguments can be strings, as in Notation.

import { groebner }

import { groebner } from 'nerdamer/algebra';
groebner(expressionArray: Vector | ExpressionInput | ExpressionInput[], vars?: string[] | Vector | ExpressionInput): Vector

Import only this function, from nerdamer/algebra.

Examples

A circle and a line become a triangular system.

groebner([x^2+y^2-1,y-x])
// → [x-y, -1+2*y^2]
Open in Playground

The Cyclic-3 system.

groebner([x+y+z,x*y+x*z+y*z,x*y*z-1])
// → [x+y+z, y^2+y*z+z^2, -1+z^3]
Open in Playground

← Back to Function reference