How to find magnitude and direction of a vector.