# In ECC, how do I prove that point addition is commutative?

I am studying elliptic curve cryptography and this question is related to the commutative property of point addition operation.

Point addition $P_3(x_3,y_3)$ of two points $P_1(x_1, y_1)$ and $P_2(x_2,y_2)$ is given by the following rules: $$x_3 = (\lambda^2 - x_1 - x_2) \bmod n$$ and $$y_3 = (\lambda (x_1 - x_3) - y_1) \bmod n$$ where $$\lambda = \frac{y_2-y_1}{x_2-x_1} \bmod n.$$

To prove that the point addition operation is commutative, I simply interchange $x_1$ by $x_2$, and $y_1$ by $y_2$, and what I get is:

$$x_3' = (\lambda^2 - x_2 - x_1) \bmod n$$ and $$y_3' = (\lambda (x_2 - x_3) - y_2) \bmod n.$$

Now it can be seen that $x_3 = x_3'$ but $y_3 \ne y_3'$; that is, I am not getting the same point $(x_3, y_3)$. But I have read everywhere that point addition is a commutative operation.

• $y_3=y_3^{'}$ is equivalent to $\lambda(x_1-x_3)-y_1 = \lambda(x_2-x_3)-y_2$ or $\lambda=\frac{y_1-y_2}{x_1-x_2}$, so it's ok – Radu Titiu Jan 27 '15 at 12:23

If I am not mistaken, $y_3 = y'_3$:
$y_3 = \frac{y_2 - y_1}{x_2 - x_1}(x_1 - x_3) - y_1 = \frac{y_2 x_1 - y_2 x_3 - y_1 x_1 + y_1 x_3 - y_1 x_2 + y_1 x_1}{x_2 - x_1} = \frac{y_2 x_1 - y_2 x_3 + y_1 x_3 - y_1 x_2}{x_2 - x_1}$
$y'_3= \frac{y_1-y_2}{x_1-x_2}(x_2-x_3) - y_2 = \frac{y_1 x_2 - y_1 x_3 - y_2 x_2 + y_2 x_3 - y_2 x_1 + y_2 x_2}{x_1-x_2} = \frac{y_2 x_1 - y_2 x_3 + y_1 x_3 - y_1 x_2}{x_2 - x_1}$
• @mikeazo. The same principal. The composition law defined purely geometrically. If $P,Q\in E$ then there is a third point $R$ ($P,Q,R$ not necessarily distinct). In order to compute $P+Q$ we get the line $L'$ through $O,R.$ The intersection point of $L'$ with $E$ is $P+Q.$ Now if we repeat the previous definition with $Q,P$ we will find the same point. I.e., $P+Q=Q+P$. – 111 Feb 6 '15 at 17:11
• I, for one, would completely accept a proof which says "addition is commutative because for any two points $P$ and $Q$, the line through $P$ and $Q$ is the same as the line through $Q$ and $P$", and all references I know of do the same. Keep the ugly formulas for implementations, where they belong. – fkraiem Feb 6 '15 at 19:21