How to find order of a point on an elliptic curve?

114 Views Asked by At

Basic arithmetic of Elliptic curves:

I want to see:

  • The point $P=(1,1)$ is of order $4$ on the elliptic curve $y^2=x^3-x^2+x/\mathbb Q$.

The following PARI/GP code gives answer:

E=ellinit(ellfromeqn(-y^2+x^3-x^2+4)); 
P=[1,1]; 
for(n=1,4,print(n," ",ellmul(E,P,n)))

with output

P=[1,1]; 
for(n=1,4,print(n," ",ellmul(E,P,n)))
1 [1, 1]
2 [0, 0]
3 [1, -1]
4 [0]

But I want to check in hand calculations.

The tangent line of the elliptic curve $E:y^2=x^3-x^2+x$ at $(1,1)$ is given by $$L: y=x-2,$$ where the slope is $y'(1,1)=\frac{3x^2-2x+1}{2y}|_{(1,1)}=1$.

The line $L$ intersects the elliptic curve $E$ at $(1,-1)$.

So $2P=-(1,-1)=(1,1)=P$. This seems odd.

Here $2P$ should be (in fact $(0,0)$) other than $P$.

Where is the mistake then ?

Edit: I made silly mistake in finding the tangent line. It would be just $L:~ y=x$. Thanks to @reuns