Vector operations and magnitudes