Magnitude and direction of vectors using component method