6

Determine whether or not the vector $\langle 0,7,3 \rangle$ belongs to the cone generated by

$$\langle 1,1,1\rangle \qquad \langle -1,2,1\rangle \qquad \langle 0,-1,1\rangle \qquad \langle 0,1,0\rangle$$

That is, I am asked to determine whether or not $\langle 0,7,3 \rangle$ is a linear combination of the other four listed vectors. I have a solution (which I now realize is not correct) $$ \langle 0,7,3 \rangle=(2)\langle 1,1,1\rangle+(2)\langle -1,2,1\rangle+(-1)\langle 0,-1,1\rangle+(0)\langle 0,1,0\rangle. $$ My question is more so how would I set up a linear system of equations for the question at hand? I could throw in several more vectors and multiply them all by $0$ as well to have $\langle 0,7,3 \rangle$ in a variety of cones, but that is rather trivial (just multiplying other vectors by $0$). How would I set up the original question here as an augmented matrix so I could row reduce it effectively?

Question: Can anyone find nonegative weights for $\langle 1,1,1\rangle$, $\langle -1,2,1\rangle$, and $\langle 0,-1,1\rangle$ that will give $\langle 0,7,3 \rangle$?

  • In order that the vector is in the cone, the coefficients in the linear combination have to be non-negative. – daw Feb 14 '17 at 14:08
  • @daw Oi thanks, didn't notice that rather significant mistake. – user407200 Feb 14 '17 at 14:09
  • 1
    $(0,7,3)$ will surely by a linear combination of the four you specify - in many ways since three independent ones would give you a unique solution. That will put the vector in the span, which is all of $\mathbb{R}^3$. To be in the cone you have to find a combination with nonnegative coefficients. – Ethan Bolker Feb 14 '17 at 14:09
  • 1
    The definition of a cone you are using is linear combination of four vectors?! That seems really strange to me. The set of all elements on the cone would then be a linear subspace.. – rschwieb Feb 14 '17 at 14:09
  • @EthanBolker It looks as though $\langle 0,7,3\rangle$ would not be in the cone then after obtaining the reduced row-echelon form. I end with a $-1$, but I need nonnegative coefficients as you said. That means I can conclude that the given vector is not in the cone yes? – user407200 Feb 14 '17 at 14:15
  • That particular representation has one negative coefficient but there may be other representations that don't. You have to find all the representations, then look among them to see if there's one that's positive. Finding all the representations is a linear algebra problem you should be able to solve with row reduction. @RodrigodeAzevedo has answered the question that way and you've accepted his answer. – Ethan Bolker Feb 14 '17 at 14:31

3 Answers3

3

The given vector is in the given cone if and only if the following linear program is feasible

$$\begin{array}{ll} \text{minimize} & 0\\ \text{subject to} & \begin{bmatrix} 1 & -1 & 0 & 0\\ 1 & 2 & -1 & 1\\ 1 & 1 & 1 & 0\end{bmatrix} \begin{bmatrix} t_1\\ t_2\\ t_3\\ t_4\end{bmatrix} = \begin{bmatrix} 0\\ 7\\ 3\end{bmatrix}\\ & t_1, t_2, t_3, t_4 \geq 0\end{array}$$

Fortunately, the problem is sufficiently low-dimensional that we can tackle it with linear algebra and do not have to resort to linear programming.

Using SymPy, we compute the RREF (reduced row echelon form) of the augmented matrix:

>>> from sympy import *
>>> M = Matrix([[1,-1, 0, 0, 0],
                [1, 2,-1, 1, 7],
                [1, 1, 1, 0, 3]])
>>> M.rref()
(Matrix([
[1, 0, 0,  1/5,  2],
[0, 1, 0,  1/5,  2],
[0, 0, 1, -2/5, -1]]), [0, 1, 2])

Thus, the solution set is the line parametrized by

$$\begin{bmatrix} t_1\\ t_2\\ t_3\\ t_4\end{bmatrix} = \begin{bmatrix} 2\\ 2\\ -1\\ 0\end{bmatrix} + \gamma \begin{bmatrix} -\frac{1}{5}\\ -\frac{1}{5}\\ \frac{2}{5}\\ 1\end{bmatrix}$$

If $\gamma \in \left[ \frac 52, 10 \right]$, we obtain points in the nonnegative octant. Choosing $\gamma = 5$, we obtain

$$\begin{bmatrix} t_1\\ t_2\\ t_3\\ t_4\end{bmatrix} = \begin{bmatrix} 1\\ 1\\ 1\\ 5\end{bmatrix}$$

which is nonnegative. Thus, the given vector is indeed in the given cone.

hansolo
  • 103
  • 4
    +1 for sympy to do the grunt work and then for explaining. – Ethan Bolker Feb 14 '17 at 14:35
  • Follow up (and thanks a lot for this detailed answer!): Could you find nonegative weights for $\langle 1,1,1\rangle$, $\langle -1,2,1\rangle$, and $\langle 0,-1,1\rangle$ that will give $\langle 0,7,3 \rangle$? That is, where we do not have $\langle 0,1,0\rangle$ at our disposal? Using row reduction, I end up with $\langle 2,2,-1\rangle$ which I cannot have. – user407200 Feb 14 '17 at 14:36
  • 1
    @rudy If you remove the last vector, you end up with a system of 3 equations in 3 unknowns. Since this system is consistent, it has only one solution, and it happens that this solution is non-admissible. You need to have more vectors than dimensions to have degrees of freedom. Then try to intersect the solution space with the nonnegative orthant. – Rodrigo de Azevedo Feb 14 '17 at 14:52
  • Got it, thanks so much for your help. Greatly appreciated. – user407200 Feb 14 '17 at 14:56
0

The idea is to ask whether exist $a,b,c$ such that $(0,7,3)=a(1,1,1)+b(-1,2,1)+c(0,1,0)+d(0,-1,1)$. Now let's place these vectors in the columns of a matrix such that $ \begin{bmatrix} 1 & -1 & 0& 0& 0 \\ 1 & 2 & 1& -1& 7 \\ 1 & 1 & 0& 1& 3 \end{bmatrix} $

Now the idea is to simply row reduce this matrix. Note that we put the vector that we're looking to represent on the right most column.

  • You should also have $+d(0,-1,1)$ should you not? For the original question. That is, I want to find the solution I came up with not by experimenting but by row reducing. – user407200 Feb 14 '17 at 14:04
0

Vectors $\langle 1,1,1\rangle,\langle -1,2,1\rangle,\langle 0,-1,1\rangle$ are linearly independent, so they generate the whole $\mathbb{R}^3$ space.

By the same reason, you might have used $\langle -1,2,1\rangle,\langle 0,-1,1\rangle,\langle 0,1,0\rangle$ instead.

larry01
  • 1,852
  • Since the given vectors generate all of $\mathbb{R}^3$, it would seem as though $(0,7,3)$ would then be in the cone, but I cannot come up with any linear combination of the three given vectors to show this. Any ideas? – user407200 Feb 14 '17 at 14:18
  • You talk about linear combinations when you should be talking about conic combinations. – Rodrigo de Azevedo Feb 14 '17 at 14:20
  • @RodrigodeAzevedo Is there a way to use mathematica or something else to determine the conic combination for my given vectors? – user407200 Feb 14 '17 at 14:22