# The infimum angle between two vectors

Consider two unit-length vectors $x=[x_1,\dots,x_n]^T\in\mathbb{R}^n$ and $w=[w_1,\dots,w_n]^T\in\mathbb{R}^n$. The vector $w$ is given and $w_i>0$ for all $i$. The vector $x$ is variable but non-zero elements in $x$ are not with the same sign.

Clearly the angle subtended by $x$ and $w$ cannot be zero. Can we determine the minimum angle subtended by the two vectors?

-
"non-zero elements in $x$ always have different signs". So there are at most $2$ non-zero elements in $x$? Also you do not show a minimum exists (indeed it doesn't), so you should say infimum. – Marc van Leeuwen Sep 7 '12 at 8:38
do you want to minimize the angle between $x$ and $w$? Please clarify 'angle subtended by the two vectors'. – ajay Sep 7 '12 at 8:38
Also does "constant" mean "given"? Any vector is constant. – Marc van Leeuwen Sep 7 '12 at 8:41
At most two components of $x$ can be nonzero, but to minimize the angle it does not help to have a component be negative, so it suffices to only consider $x$ as a standard basis vector, as in Marc's answer. For fixed $w$, the minimum angle is then attained by the basis vector along which $w$ has the largest projection. – Rahul Sep 7 '12 at 10:06
@MarcvanLeeuwen: My original question is inaccurate. The non-zero elements in $w$ are not with the same sign. And there may exist more than two nonzero elements. – Shiyu Sep 7 '12 at 10:40

## 1 Answer

The infimum is zero; take $x$ a standard basis vector, and $w$ as close to that as you like.

[Added] Now that it appears that $w$ is given, and that $x$ is required to have at least one positive and one negative entry (I'll skip over the difficulty at $n=1$), it seems one can always make the angle smaller by (assuming wlog the initial angle acute) moving a negative entry of $x$ closer to $0$, and rescaling to a unit vector. So for the infimum we may suppose all entries of $x$ nonnegative with at least one equal to $0$. But then, fixing the set of positions where $x$ has coordinate $0$ by projecting $w$ onto the subspace with coordinates $0$ in those positions, one sees that one can do no better for $x$ than to choose its remaining coordinates equal (up tu a scalar) to those of $w$. I think it is not hard to see that the smallest angle is obtained by selecting the coordinate of minimal value in $w$ and making that zero (or infinitesimally negative in the original problem) in $x$, and rescaling.

-
I suspect that you are onto something in one of your comments, and that $w$ is meant to be given. – Gerry Myerson Sep 7 '12 at 9:47
The vector $w$ is given, and the infimum then is not zero. – Shiyu Sep 7 '12 at 10:48
Thanks. I got it now. By making the minimal element in $w$ to zero, we actually obtain the largest projection of $w$ onto a plane that is perpendicular to a coordinate axis. The angle between $w$ and the projection is the infimum of the angle between $x$ and $w$. – Shiyu Sep 7 '12 at 13:57