implementing mathComponent for Vectors and segments