http://hk.geocities.com/cowcow138168/prove.jpg
Let the position vector of A & B be vector a and vector b respectively.
Then vector OA = vector a
vector OB = vector b
|vector OA|^2
=vector OA‧vector OA
=|vector a|^2
|vector OB|^2
=vector OB‧vector OB
=|vector b|^2
vector AB = vector OB- vector OA = vector b - vector a
|vector AB|^2
=vector AB ‧vector AB
=|vector b - vector a|^2
=|vector b | ^2 -2 vector a‧vector b + |vector a | ^2
=|vector b|^2-2|vector a| |vector b| cos 90(degrees) + |vector a | ^2 (dot product)
=|vector a|^2+|vector b|^2
So |vector OA|^2+|vector OB|^2=|vector AB|^2
if only consider the magnitudes, vector OA=OA, vector OB = OB, vector AB = AB
So OA^2+OB^2=AB^2