I am given 2 vectors, u & v. I'm not sure how to find the 3rd vector. I know for linearly independent, the coefficients for the linear combination must all equal 0 in order to get the 0 vector. For linearly dependent, I know that the not all of the coefficients can equate to 0.
find a vector →w in ℝ4 so that {→u, →v, →w} is linearly independent and a non-zero vector →z in ℝ4 so that {→u, →v, →z} is linearly dependent:
2 Answers
The second question is easier. The answer exploits the fact that every set containing at least a vector and the zero vector is linearly dependent. Alternatively, you can solve it simply choosing two scalars $\alpha, \beta \in \Bbb R$ so that $z=\alpha u+ \beta v$.
As to the first one, the formal way would be use the definition of linear independence and go through a linear system in four equations. Nonetheless with a bit of logic you can easily solve it without using any kind of computation. For example, if you call $w=(3,3,0,0)$ the set will still be linearly independent. Why? Try to think about the linear combinations of the first two components of the vectors $v,u$. Can you find two scalars such that their linear combination with the first two components of the vectors $v,u$ gives you back the first two components of the vector $w$? In this way you can construct as many example as you want.
If I understand your question correctly, you can use orthogonal-triangular decomposition (also called QR decomposition). If u and v are column vectors of length N, then the MATLAB statement
[Q,R] = qr([u,v] )
returns an N x N orthonormal matrix Q and an upper triangular N x 2 matrix R. The first two columns of Q are vectors that span the subspace of u and v. So any linear combination of those two vectors are linearly dependent on u and v. The remaining N-2 columns of Q are orthogonal to u and v. So any linear combination of those N-2 vectors are linearly independent of u and v. This works for N>2.
