# How to add two points on an elliptic curve

How do you add two points P and Q on an elliptic curve over a finite field $\Bbb F_{p}$. For example: adding the points $(1,4)$ and $(2,5)$ on the curve $y^2 = x^3+2x+2$ over $\Bbb F_{11}$. I know one way involves drawing a straight through the two points P and Q and getting a third point R (P+Q) which means using a straight line equation and the elliptic curve equation. Any insights?

-
Take Silverman's book, or any other one where the addition law for the elliptic group is explained. It seems to be pretty lonhg to develop it here. –  DonAntonio May 5 '13 at 22:13

Consider the case of the curve $y^2 = x^3 + a x + b$ on $\mathbb{R}$ for starters. Let $P = (x_1, y_1)$ and $Q = (x_2, y_2)$ be different points on the curve. You can check that if $s = (y_2 - y_1)/(x_2 - y_1)$, then $x_3 = s^2 - x_1 - x_2$ and $y_3 = y_1 + s (x_3 - x_1)$ then $(x_3, y_3)$ is on the curve and $(x_3, -y_3)$ is collinear with $P$ and $Q$. A computer algebra system like maxima is helpful here.
Adding a point to itself involves a tangent to the curve, and $s = (3 x_1 + a) / 2 y_1$ and $x_3 = s^2 - 2 x_1$ and $y_3 = y_1 + s (x_3 - x_1)$.