[Math] How to remove linearly dependent rows/cols

linear algebramatricesnumerical linear algebra

How would one remove linearly dependent rows/columns from a rank-deficient matrix.

For example, (from wikipedia):

$$
A =
\begin{bmatrix}
2 & 4 & 1 & 3 \\
-1 & -2 & 1 & 0 \\
0 & 0 & 2 & 2 \\
3 & 6 & 2 & 5
\end{bmatrix}.
$$

If you convert it to row-echelon-form, you get:

$$
A =
\begin{bmatrix}
1 & 2 & 0 & 1 \\
0 & 0 & 1 & 1 \\
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0
\end{bmatrix}
$$

This demonstrates that there are two linearly independent columns. As noted in the wikipedia article, "We see that the second column is twice the first column, and that the fourth column equals the sum of the first and the third". How can one extract the linearly independent columns (or rows) and get a result like:

$$
A =
\begin{bmatrix}
2 & 1 \\
-1 & 1 \\
0 & 2 \\
3 & 2
\end{bmatrix}.
$$

Best Answer

Look at the row-echelon form. Each non-zero row has a "leading 1" (that is, the first non-zero entry in each such row is a 1). The columns with a leading 1 are the 1st and the 3rd. It follows that the 1st and 3rd columns of the original matrix are linearly independent, indeed, are a basis for the vector space spanned by the columns.

Related Question