implemented normalization and magnitude functions for arbitrary vectors of numbers