0

Assume three vectors $$ \vec{A} = \left(\begin{array}{c} a_x\\ a_y\\ a_z \end{array}\right), \vec{B} = \left(\begin{array}{c} b_x\\ b_y\\ b_z \end{array}\right), \vec{C} = \left(\begin{array}{c} c_x\\ c_y\\ c_z \end{array}\right). $$

How can I find if the point $(h_x,h_y,h_z)$ is inside the cone generated by these three vectors ?

Adad
  • 3

2 Answers2

2

You could solve $\vec H=x\vec A+y\vec B+z\vec C$ for $x$, $y$ and $z$ and see if these numbers are nonnegative.

Angina Seng
  • 158,341
  • Small note: if no solution exists, then $H$ is also not in the cone. If multiple solutions exist, it's in the cone if ONE of them has the nonnegative property. (All this is only relevant if $A, B, C$ are not linearly independent, in which case the cone they span is somewhat degenerate.) – John Hughes May 20 '17 at 10:40
1

You can use the definition of cone generated by some vectors: $\vec H = (h_x, h_y, h_z)$ belongs to the cone generated by $\vec A$, $\vec B$ and $\vec C$ (I assume they are linearly independent) if and only if there are three non-negative real numbers $\lambda, \mu, \eta$ such that $$\vec H = \lambda \vec A + \mu \vec B + \eta \vec C;$$ thus you have to solve the linear system given by the three equations (I assume $\vec A$, $\vec B$, $\vec C$, $\vec H$ are given) $$h_x = \lambda a_x + \mu b_x + \eta c_x,$$ $$h_y = \lambda a_y + \mu b_y + \eta c_y,$$ $$h_z = \lambda a_z + \mu b_z + \eta c_z.$$

The solutions $\lambda, \mu, \eta$ are non-negative if and only if $\vec H$ belongs to the cone generated by $\vec A$, $\vec B$ and $\vec C$ (and they are all strictly positive iff $\vec H$ belongs to the interior of the cone).