How to determine if a point lies in this particular convex region?

63 Views Asked by At

I have a family of hyperplanes which do not contain the origin: \begin{eqnarray} a_{11}x_1+a_{12}x_2+\dots+a_{1n}x_n &=& k_1\\ a_{21}x_1+a_{22}x_2+\dots+a_{2n}x_n &=& k_2\\ &\vdots&\\ a_{n1}x_1+a_{n2}x_2+\dots+a_{nn}x_n &=& k_n\\ \end{eqnarray} These hyperplanes cut $\mathbb{R}^n$ in a bunch of convex regions; I need to determine a way of telling if a point $P$ lies in the same region as the origin. If $P=(p_1,\dots,p_n)$ I think that $P$ lies in that region if for each hyperplane it holds that \begin{eqnarray} a_{i1}p_1+a_{i2}p_2+\dots+a_{in}p_n &<& k_i\\ \end{eqnarray} whenever $k_i>0$, and the other way around if $k_i<0$. Is this correct? I'm implementing this but it seems not right. It could be that my program has some other bug, but I wanted to check if the math is correct.

1

There are 1 best solutions below

0
On BEST ANSWER

You're right. You could write the same thing more succinctly by saying that the point lies in the same region as the origin if $(a_{i1}p_1+a_{i2}p_2+\dots+a_{in}p_n-k_i)k_i\lt0$ for all $i$.