Skip to main content
2 of 3
fancy images!
Tetrad
  • 30.1k
  • 12
  • 96
  • 143

A very basic one is the Pythagorean theorem. Also known as the distance formula.

a^2+b^2=c^2 http://mathurl.com/y8ouslw.png where a and b are the edges of a right triangle and c is the hypotenuse. This means that in order to find the length of a vector, you do this:

distance = sqrt( a^2 + b^2 ) http://mathurl.com/2dyhukn.png

Another note of interest is that if you're just comparing distances, you don't have to take the square root (which can be relatively costly). That's why most frameworks have a "distance squared" or "length squared" function for their vectors.

Tetrad
  • 30.1k
  • 12
  • 96
  • 143