Let the ray be $R= \{x_0+t d \}_{t \ge 0}$. Let $d_2,...,d_n$ be a basis for $\{ d \}^\bot$, then $R = \{ x | d_k^T(x-x_0) = 0, d^T(x-x_0) \ge 0\}$.