Sage code to check independence of rational points on elliptic curve

554 Views Asked by At

Suppose I have three rational points $(x_1,y_1),(x_2,y_2),(x_3,y_3)$ on certain elliptic curve. Then they are linearly independent if and only if the determinant of matrix $(<P_i,P_j>)_{i,j}$ is non zero where $<\_,\_ >$ is Neron-Tate height pairing.

How to write a code in Sage or Pari to compute this determinant. Note that I don't want to write an equation of my elliptic curve in the code to compute rational points first. Rather I know my rational points and want to directly put rational points and compute the determinant.

3

There are 3 best solutions below

2
On BEST ANSWER

In SageMath this can be accomplished using the command height_pairing_matrix. For example:

sage: E = EllipticCurve([1, 0, 0, 0, 1])
sage: E
Elliptic Curve defined by y^2 + x*y = x^3 + 1 over Rational Field
sage: pts = E.gens()
sage: pts
[(-1 : 1 : 1), (0 : -1 : 1)]
sage: M = E.height_pairing_matrix(points = pts)
sage: M
[0.541484699372469 0.161800998136433]
[0.161800998136433 0.463307138146013]
sage: M.det()
0.224694163418167

You can find more information, including many examples, in the documentation.

0
On

I am not a sage expert. But I know you can call pari within sage and here you can compute the Gram/height matrix from the points and determine its determinant. Suppose you e is your elliptic curve (in pari this created by ellinit) and suppose P1,P2,P3 are your points then you just use the following commands:

v=[P1,P2,P3];
m = ellheightmatrix(e,v);
print(matdet(m));

If the last line is $0$ then your points are dependent. Either something similar is done in sage or just call pari commands from sage.

3
On

Something similar was already asked at Independence of points on Elliptic curve the answers there are the same as above but maybe a little more extensive.

Edit: I just noticed the question asker is the same as the previous question. So maybe this question really is trying to ask something different. The height of a point will depend on the elliptic curve itself so you will need to put the equation of the curve somewhere.