cosP1OP2=(OP1)2+(OP2)2−(P1P2)22(OP1)(OP2)
We have points P1(x1,y1), P2(x2,y2) and O(0,0)
Then,
OP1=√x21+y21
OP2=√x22+y22
P1P2=√(x1−x2)2+(y1−y2)2
Substituting the above results in the given equation, we get
OP1.OP2.cos(P1OP2)=(x21+y21)+(x22+y22)−[(x1−x2)2+(y1−y2)2]2=x1x2+y1y2
Hence proved