# 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 think algebraic-geometry refers here to another sort of questions, maybe LA is enough? –  Ilya May 25 '12 at 12:51
The bisector can be defined as the set of points $y$ such that $\langle y,x_1 \rangle = \langle y,x_2 \rangle$ (similary to the bisection). –  user10676 May 25 '12 at 13:10
@user10676 $<y,x_1>=<y,x_2>$ means $y^T(x_1-x_2)=0$. If $x_1=x_2$ as shown in the lower right figure, any $y$ satisfies $y^T(x_1-x_2)=0$. So perhaps bisector can not be defined using this equation. –  Shiyu May 25 '12 at 14:01
In the right figure we have $x_1=-x_2$, so that the condition would give $2y^Tx_1=0$, which is the condition for orthogonality, and in this case, bisection. –  guaraqe May 25 '12 at 14:55
The upper right case does not generalize well to higher dimensions, while the others do, so there is reason to not expect a uniform representation that covers all the cases. –  Rahul May 27 '12 at 8:09

In the plane, define $P(x_1,x_2)=\{y:y^T(x_1-x_2)=0\}.$

Then define the bisecting line for $x_1,x_2$ of the same length as the collection of vectors $$\{s(x_1+x_2)+ty : s,t \in R, y\in P(x_1,x_2)\}.$$ This is a bit ungainly but it works in the three cases, since in the "bad cases" for $x_1+x_2$ the $s(x_1+x_2)$ term is the zero vector but the set $P(x_1,x_2)$ is not just the zero vector in this case, and its vectors point along the line bisecting the angle.

This answer is really only a combination of the ideas mentioned above in the comments, but I think it does give a single definition for all the cases.

-
Thanks. In case you are interested, I also posted a solution just now. The key idea of my solution is to use a rotation matrix. –  Shiyu Nov 10 '12 at 3:47
Yes, that works. And it gives a simpler formula than the combined linear sum which I used in my answer. Interesting problem to have thought of! +1 on the question. –  coffeemath Nov 10 '12 at 4:07

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:

1. the rotation matrix rotates a vector clockwise or counter-clockwise?

2. how to define the angle $\theta$?

3. 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$.

-
For your problem I think you shoulod be looking for the bisecting line rather than the bisector used for angles, which is a ray. I say this because in the case of bisecting 180 degrees there's no uniform choice of which side to draw a ray on, but there is a unique line bisecting both angles. The rotation should start from either vector and go $\theta/2$ toward the other vector. But I don't see immediately how just from the vectors to get the angle, since the formula $cos(\theta)=x*y/|x||y|$ gives a zero angle when $x,y$ perpendicular. –  coffeemath Nov 10 '12 at 4:24
@coffeemath: two vectors do give two angles and two bisection vectors. But the two bisection vectors are collinear and have opposite directions. We can define the angle and rotation matrix carefully such than we can always compute one of the bisection vector, even if the angle is 180 deg. –  Shiyu Nov 10 '12 at 15:37

A reasonable definition of "bisector" is the set of vectors $y$ such that $y^T(x_1-x_2) = 0$. If you are willing to accept this as the definition, then it's completely general, and does not involve any special cases.

However, this set is a plane, not a line or a vector. It's a plane perpendicular to the "paper" in your pictures. If you want your "bisector" to be a vector, you need to intersect the bisector plane with some other plane. In your pictures, the "other plane" that's being used is the plane of the two vectors. But, if the two given vectors are parallel, then this construction doesn't work.

So, in short -- "bisector plane" can be defined generally, but "bisector vector" can not (as far as I can see).

All of the above is pretty sloppy, mathematically. I have deliberately confused "affine" and vectorial concepts. Explaining in rigorous terms would take longer, and it wouldn't be any more helpful, I suspect.

-
"However, this set is a plane, not a line or a vector." -- Depends on what vector space you're working in! –  Rahul May 27 '12 at 8:02
Thanks. But the definition $y^T(x_1-x_2)=0$ is no general because it fails to describe the bisection when $x_1=x_2$ (the lower right case where the bisection should equal $x_1$ or $x_2$). –  Shiyu May 27 '12 at 12:00
Regarding the plane or vector, we can first assume we are working in a 2D space. –  Shiyu May 27 '12 at 12:00