The locus of point from a position in a direction on a plane is called ray.
The ray is one directional straight line. It is actually formed by a point which starts from a position on a plane and continues its traveling infinitely in a direction. It seems, it is a part of the straight line.
According to the way a ray is formed in geometrical system, the ray is represented in mathematical form in mathematics.
Here, $R$ is the location where the ray is started and then $S$ is another location through which the ray is passed to continue travelling infinitely. Therefore, write names of both points and then draw a right arrow above them to represent a ray in mathematics. In other words, $\overrightarrow{RS}$ is the mathematical representation of a ray.