I have $2$ vectors with size $8\times1$. How to find linear combination of those two vectors to be positive with positive coefficient?
i.e. $a_{1}.v_{1}+a_{2}.v_{2}\ge 0$ where $v_{1}$ and $v_{1}$ are vectors and $a_{1}$, $a_{2}$ are positive constants.
I have provided with only $v_{1}$, $v_{1}$vectors.
$a_{1}$, $a_{2}$ are any positive unknowns.
You want to find an element of the polyhedron $\{ a : a_1 v_1 + a_2 v_2 \geq 0, a \geq 0 \}$. The polyhedron is defined by ten inequalities in $\mathbb{R}^2$. One solution approach is to draw the inequalities. You will see that each inequality can be represented with a line through the origin. The inequalities are of the form $$a_1 \geq -((v_2)_i / (v_1)_i) a_2 \text{ if } (v_1)_i > 0$$ $$a_1 \leq -((v_2)_i / (v_1)_i) a_2 \text{ if } (v_1)_i < 0$$ Therefore: $$\max_i \{ -(v_2)_i / (v_1)_i : (v_1)_i > 0 \}a_2 \leq a_1 \leq \min_i \{ -(v_2)_i / (v_1)_i : (v_1)_i < 0 \} a_2$$ In Matlab you can find the coefficients for $a_2$:
This results in the coefficients 1.192006592501030 and 1.191980971797486, which leads to a contradiction since the first one is larger than the second one. For your other example, you obtain the coefficients 0.3598 and 1.4275. That means that $0.3598 a_2 \leq a_1 \leq 1.4275 a_2$. For any nonnegative $a_2$ you can find a nonnegative $a_1$ that satisfies this inequality.