6

enter image description here

I am trying to find a way to determine whether an angle is between two given angles where all angles are provided as vectors on the unit circle i.e.: $\mathbf{a}=(\cos(\theta),\sin(\theta))$

Note that by inbetween I mean on the arc of the smaller of the two segments of the unit circle formed by the vectors we want to check between.

Specifically I do not want to obtain the angles from the given vectors by applying the inverse trig functions I just want to work with the given vectors.

I think the following is true if and only if the angle $\mathbf{c}$ is between $\mathbf{a}$ and $\mathbf{b}$: $$|\mathbf{a} + \mathbf{b} - \mathbf{c}|\leq 1$$

but I'm having trouble proving it. Is this statement true and can you prove it?

Plog
  • 163

1 Answers1

4

It's true (except possibly for edge cases).

It is fairly obvious if you draw a diagram with two unit circles - one at the origin with vectors $\mathbf{a}$ and $\mathbf{b}$ in it, and the other unit circle centred at $\mathbf{a}+\mathbf{b}$ and which contains the vector $-\mathbf{c}$. Vectors $\mathbf{a}$ and $\mathbf{b}$ will then point to the intersections of the unit circles.

For $|\mathbf{a} + \mathbf{b} - \mathbf{c}| < 1$ to hold, the head of $-\mathbf{c}$ must lie inside the first unit circle, and this happens exactly when it lies on the circular arc between the two intersection points. Therefore by symmetry of the paralellogram the same is true for $\mathbf{c}$ when placed at the origin. Those intersection points are pointed at by $\mathbf{a}$ and $\mathbf{b}$, so $|\mathbf{a} + \mathbf{b} - \mathbf{c}| < 1$ iff $\mathbf{c}$ lies strictly between $\mathbf{a}$ and $\mathbf{b}$.

enter image description here

Note that you used a $\le$ sign, but you'll have to think about whether that is what you want or if strict inequality is better. Does $\mathbf{a}$ itself lie between $\mathbf{a}$ and $\mathbf{b}$? And in the case of $\mathbf{a}=-\mathbf{b}$, does every unit vector lie between them or none at all?

  • "'between' is interpreted to mean strictly inside the parallelogram of which and are two edges." -- not sure this quite makes sense, if the angle between $a$ and $b$ is great enough (over $\pi/3$ I think) then the parallelogram spanned by $a$ and $b$ is a strict subset of the unit disk. – Neal Jun 29 '20 at 14:29
  • Thanks. I had a similar drawing in my notes myself which is what led me to think it was true in the first place. Was hoping there was a neat purely mathematical proof to boost my confidence in it but your more precise pictures and argument do the trick as well, thanks. – Plog Jun 29 '20 at 14:29
  • @Neal Yes, that is a good point. for larger angles the circular arcs in the diagram fall (partially or wholly) outside the parallelogram. I'll try to rephrase it. – Jaap Scherphuis Jun 29 '20 at 14:32
  • 1
    Assuming $a\neq -b$, the vectors that lie "between" $a$ and $b$ are exactly those that lie in the interior of the unit disk upon reflection across the line equidistant between $0$ and $a+b$. This set is preserved by reflection across the line spanned by $a+b$. The composition of these two reflections maps a unit vector $c$ to $a+b-c$. Thus $c$ is between $a$ and $b$ iff $|a+b-c| < 1$. – Neal Jun 29 '20 at 14:40