[Math] How to find basis for linear combination

linear algebra

Let us say that there is a linear combination $c_1\mathbb{x_1} + c_2\mathbb{x_2} + c_3\mathbb{x_3} + c_4\mathbb{x_4}$.

where $x_k$ is a $n \times 1$ matrix.

How do I figure out the basis of the space generated by this linear combination formally?

For example, if $\mathbb{x_1} = \begin{bmatrix}0 \\ 0 \\ 0 \\ 0 \end{bmatrix}, \mathbb{x_2}= \begin{bmatrix} 0 \\ 0 \\ 1 \\ 1\end{bmatrix}, \mathbb{x_3} = \begin{bmatrix} 1 \\ 1 \\ 0 \\ 0 \end{bmatrix}, \mathbb{x_4} = \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}$, how do I figure out the space of the basis of the linear combination of these matrices?

Best Answer

All you have to do is row reduce! Put everything into one matrix, and get rid of as many rows as you can.

Logically, in a basis, first of all there cannot be the zero vector. Secondly, no vector in a basis can be a linear combination of any other vectors. In your example, $X_4 = X_3 + X_2$, so you can leave out $X_4$. You are left with your basis: $X_2, X_3$

If you want to row reduce with a more complex question, you have the following matrix: $\left[ \begin{array}{cccc} 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 1 & 1 & 1 & 1 \end{array} \right]$

Move the zero row to the bottom for convenience.

$\left[ \begin{array}{cccc} 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0 \end{array} \right]$

Now subtract the first row + the second row from the third row.

$\left[ \begin{array}{cccc} 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array} \right]$

We cannot row reduce anymore. Your answer is the rows that are not completely 0's. The first row, which maps to $X_2$, and the second row, which maps to $X_3$, is your basis. Remember, for the basis, you should use the original vectors, so the original $X_2$ and $X_3$ (coincidentally they are the same this time).

So your basis is $X_2, X_3 = \begin{bmatrix} 0 \\ 0 \\ 1 \\ 1\end{bmatrix},\begin{bmatrix} 1 \\ 1 \\ 0 \\ 0 \end{bmatrix}$

Related Question