Sage code to check independence of rational points on elliptic curve

algebraic-geometryelliptic-curvessagemath

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.

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.

Related Question