Implemented functions for calculating dot product, vector length, and vector normalization