Is there a uniform way to define angle bisectors using vectors? 
Look at the left figure. $x_1$ and $x_2$ are two vectors with the same length (norm). Then $x_1+x_2$ is along the bisector of the angle subtended by $x_1$ and $x_2$. But look at the upper right figure. When $x_1$ and $x_2$ are collinear and in reverse directions, $x_1+x_2=0$ and no longer represent the bisector of the angle (in this case 180 deg). The bisector should be perpendicular to $x_1$ and $x_2$. (The $x_1+x_2$ works well for the case shown in the lower right figure.)
Question: Is there a way to represent the bisector for all the three cases? I don't want to exclude the upper right case. Is it possibly helpful to introduce some infinity elements?

I also would like to give a solution, which I am currently using in my work.
The key idea is to use a rotation matrix.
Suppose the angle between $x_1$ and $x_2$ is $\theta$. Let $R(\theta/2)$ be a rotation matrix, which can rotate a vector $\theta/2$. Then
$$y=R(\theta/2)x_1$$
is a unified way to express the bisector.
Of course, we need also pay attention to the details, which can be determined straightforwardly:

*

*the rotation matrix rotates a vector clockwise or counter-clockwise?


*how to define the angle $\theta$?


*the bisector should be $y=R(\theta/2)x_1$ or $y=R(\theta/2)x_2$?
EDIT: I give an example here. Consider two unit-length vectors $x_1$ and $x_2$, which will give two angles: one is in [0,pi] and the other is in (pi,2pi). We can define the angle $\theta$ such that rotating $x_1$ counterclockwise $\theta$ about the origin yields $x_2$. Here $\theta\in[0,2\pi)$. Consequently define the rotation matrix $R(\theta/2)$ rotates a vector counterclockwise $\theta/2$. (The formula of this kind of R is given here) Thus $R(\theta/2)x_1$ is a unit-length vector lying on the bisector of $\theta$.
Another thing as mentioned by coffemath is that: how to compute the angle given two vectors? Of course, it is not enough to only use $\cos \theta=x_1^Tx_2$ because $\cos \theta$ gives two angles whose sum is $2\pi$. However, if we carefully define the angle $\theta$ and $R$ we can also compute $\sin \theta$. For example, we define the angle and rotation matrix as above mentioned. Then define $x_2^{\perp}=R(\pi/2)x_2$. Then it can be calculated that $x_1^Tx_2^{\perp}=-\sin \theta$. hence from both $\cos\theta$ and $\sin\theta$, we can compute $\theta$.
