Here we have a tool solving a set of homogeneous linear equations as in finding the coefficients for the nth degree plane curve, upon which (n+1)(n+2)/2 − 1 given points lie. We may thus find a non-zero x such that Ax = 0. This code generates 9 random rational points, pl, and finds 10 coefficients, c, not all zero, of a cubic curve that goes thru each of the points. You will need this to use the program. See this for meaning of the too clever el routine. The nine zeros produced by routine a show that each point is indeed on the curve.

Having produced the curve with a rational procedure with rational inputs, the coefficients are rational. When we have two rational points on an EC with rational coefficients, the line thru those points will meet the curve again in a point with rational coordinates. A tangent at a rational point also meets the curve at a rational point. To make these two claims true, however, we must add a point at infinity as an honorary solution to the EC equation. Such calculations are at the root of EC crypto so we pursue them here.

Consider the line thru two points, p and q, on the curve. Parameterize that line linearly so that the parameter, λ is 0 at p and 1 at q. L(0) = p and L(1) = q and L(λ) = (X(λ), Y(λ)) where X and Y are both inhomogeneous linear functions of one real. If f(x, y) is the 3rd degree polynomial whose roots are our curve, then g(λ) = f(X(λ), Y(λ)) is a 3rd degree polynomial in λ.
Alternatives:

Simplifying to the Wierstraß equation.


This is a modern book on elliptic curves: J.S. Milne: Elliptic Curves. It is more interested in Fermat’s last theorem but has good dense EC theory. It presents some 19th century math that is relevant to Fermat’s conjecture, but in 21st century form, along with much other relevant modern math.
On another tack: Elliptic Curve Digital Signature Algorithm
Math