Finding A Basis - Need help finding vectors which aren't linear combinations of vectors from a given set I want to know if there is a method for finding vectors which are independent from a given set.
For example, say I was given a set $S$ with $3$ linearly independent vectors, and then asked to extend this to a basis in $\mathbb{R}^4$. Is there a method that I can use to find a vector which is not a linear combination of the vectors in $S$?
Also is there a method that will work for Basis of say $P_3(x)$ - all real valued functions of degree $3$ or less.
Thank you
 A: Let's say you have $3$ vectors $v_i = (v_{i1}, v_{i2}, v_{i3}, v_{i4})$ with $i \in \{1,2,3\}$. Then a fourth vector $w = (w_1,w_2,w_3,w_4)$ is linearly independent of $v_1$, $v_2$ and $v_3$ if and only if
$$\det\begin{pmatrix}
v_{11} & v_{12} & v_{13} & v_{14}\\
v_{21} & v_{22} & v_{23} & v_{24}\\
v_{31} & v_{32} & v_{33} & v_{34}\\
w_1 & w_2 & w_3 & w_4
\end{pmatrix} \neq 0$$
Probably the easiest way to find a vector $w$ that satisfies this (without random guessing/brute force), is to check among the standard basis of $\mathbb{R}^4$: $e_1 = (1,0,0,0), e_2 = (0,1,0,0)$, $e_3 = (0,0,1,0)$ and $e_4 = (0,0,0,1)$. At least one of these vectors will be linearly independent of $S$ (else $S$ would spawn a $4$-dimensional space!).
To check if $v_1$ is linearly independent of $S$, you must then calculate
$$\det\begin{pmatrix}
v_{11} & v_{12} & v_{13} & v_{14}\\
v_{21} & v_{22} & v_{23} & v_{24}\\
v_{31} & v_{32} & v_{33} & v_{34}\\
1 & 0 & 0 & 0
\end{pmatrix} = -\det\begin{pmatrix}
v_{12} & v_{13} & v_{14}\\
v_{22} & v_{23} & v_{24}\\
v_{32} & v_{33} & v_{34}
\end{pmatrix}$$
If the result is nonzero, you know $e_1$ is linearly independent of $S$. If the result is zero, go to $e_2$, which again boils down to calculating a $3 \times 3$-determinant, etc.
If by $P_3(x)$ you mean the polynomials in $\mathbb{R}[x]$ of degree $\leq 3$, the same thing works there. 
A: Are you familiar with the null space (or kernel) of a matrix and the concept of direct sum? This can give you a systematic way of extending a linearly independent set to a basis. And even if you haven't seen these concepts, you may still be able to pratically use the method based on it.
If you have $k$ linearly independent vectors in $\mathbb{R^n}$ (with $1\le k < n$), then these vector form a basis of a $k$-dimensional subspace $W$ of $\mathbb{R^n}$. But then $\mathbb{R^n}=W\oplus W^\perp$ where $W^\perp$ is the orthogonal complement of $W$ (of dimension $n-k$); i.e. the subspace of all vectors perpendicular to the vectors of $W$. If you can find a basis of $W^\perp$, then these basis vectors extend the basis of $W$ to a basis of $\mathbb{R^n}$.
You may know (or otherwise simply use the fact) that vectors of the row space of a matrix are orthogonal to vectors of the null space. So if you place the given $k$ vectors in the rows of a $k \times n$-matrix, then you can obtain a basis for $W^\perp$ by finding a basis for the null space of this matrix. These are precisely the vectors you can add to the given vectors to extend them to a basis of $\mathbb{R^n}$.

I'll add an example to fit your specific question, but I'll change $\mathbb{R^4}$ to $\mathbb{R^5}$ to get a better idea of how it works in general. So you are given 3 linearly independent vectors in $\mathbb{R^5}$; for example:
$$(2,-1,0,0,3) \;,\; (0,1,-2,0,1) \;,\; (3,0,1,1,-2)$$
Referring to the notations above, you have that:
$$W = \mbox{span}\left\{ \color{red}{(2,-1,0,0,3) , (0,1,-2,0,1) , (3,0,1,1,-2)} \right\}$$
and these 3 vectors form a basis of $W$. We want a basis for $W^\perp$ and will get this by finding a basis for the null space of the matrix:
$$A = \begin{pmatrix}
2&-1&0&0&3 \\
0&1&-2&0&1 \\
3&0&1&1&-2
\end{pmatrix}$$
The null space is the set of vectors $x$ satisfying $Ax=0$, so we can simply row reduce $A$ to get:
$$\begin{pmatrix}
1&0&0&\tfrac{1}{4}&0 \\
0&1&0&\tfrac{1}{2}&-3 \\
0&0&1&\tfrac{1}{4}&-2
\end{pmatrix}$$
And then it is clear that the null space is spanned by $(-\tfrac{1}{4},-\tfrac{1}{2},-\tfrac{1}{4},1,0)$ and $(0,3,2,0,1)$ so we also have (simplifying a bit by scaling the first vector):
$$W^\perp = \mbox{span}\left\{ \color{blue}{(1,2,1,-4,0) , (0,3,2,0,1)} \right\}$$
So a basis for $\mathbb{R^5}$ containing the initially given 3 (red) vectors is:
$$\left\{ \color{red}{(2,-1,0,0,3) , (0,1,-2,0,1) , (3,0,1,1,-2)} , \color{blue}{(1,2,1,-4,0) , (0,3,2,0,1)}\right\}$$
