mathematical definition of a ray