Project point 1 onto the line (at 90 degress) running through point 2 and the origin (0,0).
Useful links