Finding out which vectors are linearly dependent We have following vectors: $(1,2,1,3),(2,-1,3,-1),(3,1,4,2),(1,-3,1,-2)$. I'm trying to find out which of those are linearly dependent and remove them. What I did was to create a matrix: $\begin{pmatrix}
1 & 2 & 3 & 1\\ 
2 & -1 & 1 & -3\\ 
1 & 3 & 4 & 1\\ 
3 & -1 & 2 & -2
\end{pmatrix}$ and by solving the matrix I found out, that the last row will get removed, so they are linearly dependend. However, how do I find out which two vectors are linearly dependent? Thanks
 A: Just reduce it to row echelon form, keeping track of what you do.  Start with $$
\begin{pmatrix}
1 & 2 & 3 & 1 &R_1\\ 
2 & -1 & 1 & -3 &R_2\\ 
1 & 3 & 4 & 1 &R_3\\ 
3 & -1 & 2 & -2 &R_4
\end{pmatrix}$$
Then
\begin{pmatrix}
1 & 2 & 3 & 1 &R_1\\ 
0 & -5 & -5 & -5 &R_2-2R_1\\ 
0 & 1 & 1 & 0 &R_3 -R_1\\ 
0 & -7 & -7 & -5 &R_4-3R_1
\end{pmatrix}
and continue in this fashion. 
A: There are many approaches you can use here.
One approach is to check the linear independence of set of vectors iteratively.  Keep only those vectors which increase the dimension of the space spanned by our collected vectors so far and discard any redundant vectors which did not increase the dimension of the span.
The set containing only the first vector is obviously linearly independent (the only way a set containing only one vector would be dependent is if it were the zero vector).  The set containing the first two is also obviously linearly independent (as neither is the zero vector and they are clearly not multiples of one another).
Now, the question becomes if the set of the first three are linearly independent and if the set of all four are linearly independent.  You will find that the set with the first three are not independent, so the third vector is redundant and should not be included, but the set with the first, second, and fourth are dependent.  As such, you can safely say that the first, second, and fourth are a maximally independent subset of your set of vectors (not necessarily the only one).

Another option is to create a matrix by using each of your vectors as the columns just as you did in your attempt above (not the rows in this case which would have been useful for other tasks).  Now, by row reducing this matrix, the locations of the pivots will reveal to you which columns can form a maximally linearly independent set.
You will find that after row reducing this matrix, the pivots are located in the first, second, and fourth columns so this implies that it is the first, second, and fourth vectors that you can use to form a maximally independent subset of your set of vectors.

(Note: there are potentially many different maximally independent subsets of vectors, say for example the first, third, and fourth instead.  The two processes above will prioritize having the sum of the subindicies of your vectors be minimized.  You could find different maximally independent subsets by changing the order in which you use your original vectors)
A: In the matrix, just check the rank (of the $3 \times 3$ minors).
The minor(s) with highest rank (might be $3$, $2$ or $1$), contain the "base", the other  vectors will be dependent on that base.
