# Revision history [back]

### polynomial kernel

Is there any particular reason why computing the kernel of a matrix over a polynomial ring might fail? Consider the following example:

sage: PR.<x1, x2, x3, y1, y2, y3> = QQ[]
sage: def P(t):
...       u = 1 - t
...       x = x1*t*t + x2*t*u*2 + x3*u*u
...       y = y1*t*t + y2*t*u*2 + y3*u*u
...       return (x, y)
sage: def C(t):
...       x, y = P(t)
...       return vector(PR, [x^2, y^2, x*y, x, y, 1])
sage: M = Matrix([C(t) for t in [0, 1, -1, 2, 1/2]])
sage: M.right_kernel()
Traceback (most recent call last):
...
ArithmeticError: Ideal Ideal (x3^2, x1^2) of Multivariate Polynomial Ring
in x1, x2, x3, y1, y2, y3 over Rational Field not principal


It seems to me as if being able to compute the reduced echelon form (using the frac method) should be enough to actually compute a kernel as well, without any additional requirements. I will demonstrate this in an answer below. So why does computing the echelon form work, but computing the kernel not?