# Adding vector to span a space

Let $A=\left\{\left(\begin{array}{c} 18 \\ 6 \\ -4 \\ 12 \end{array}\right),\left(\begin{array}{c} 6 \\ 2 \\ 2 \\ -6 \end{array}\right)\right\}$ find the vectos to be added so A will span $\mathbb{R}^4$?

So what I did is :

\begin{pmatrix} 18 & 6 & -4 & 12 \\ 6 & 2 & 2 & -6 \\ \end{pmatrix}

the row reduced echelon form is:

\begin{pmatrix} 1 & \frac{1}{3} & 0 & 0 \\ 0 & 0 & 1 & -10 \\ \end{pmatrix}

What should I do next? I need to write the vectors that should be added with 1 and 0 only?

You have effectively found a new basis for the 2-dimensional subspace generated by $A.$ The large number of zero components makes it easy to find vectors, as it happens with only one 1 and three zero components, that are linearly independent from $A$ and even such that the complete set of four vectors is linearly independent. Now any set of 4 linearly independent vectors in a 4-dimensional space is automatically a basis.

Observe that the "core" elements that make those two vectors linearly independent is the tiny little matrix formed by their second and third elements:

$$M(2,3) = \begin{matrix} 6 & 2 \\ -4 & 2 \\ \end{matrix}$$

which has non-zero determinant.

If we can add two other vectors such that the determinant of the four column vectors is reduced to the calculation of the determinant of $M(2,3)$, which is $\neq 0$, then we have found a span of $\mathbb{R}^4$.

Fortunately that's easy:

$$\begin{vmatrix} 18 & 6 & 0 & 1\\ 6 & 2 & 0 & 0\\ -4 & 2 & 0 & 0\\ 12 & -6 & 1 & 0\\ \end{vmatrix} = -\begin{vmatrix} 6 & 2 & 0\\ -4 & 2 & 0\\ 12 & -6 & 1\\ \end{vmatrix} = -\begin{vmatrix} 6 & 2\\ -4 & 2\\ \end{vmatrix}\neq 0$$

So the vectors that you can add are the last two columns of the big determinant.

## Linear independence

First, we must check to see if our initial two vectors are linearly independent. In this instance, the signs provide essential clues. The sign patterns reveal they aren't proportional: $$\begin{array}{cccc} + & + & - & + \\ + & + & + & - \\ \end{array}$$

## Gram-Schmidt orthogonalization

The Gram-Schmidt orthogonalization of the vector set $$\left\{ \, % 1 \left[ \begin{array}{r} 18 \\ 6 \\ -4 \\ 12 \\ \end{array} \right], % 2 \left[ \begin{array}{r} 6 \\ 2 \\ 2 \\ -6 \\ \end{array} \right], % 3 \left[ \begin{array}{c} 1 \\ 0 \\ 0 \\ 0 \\ \end{array} \right], % 4 \left[ \begin{array}{r} 0 \\ 0 \\ 0 \\ 1 \\ \end{array} \right] % \, \right\}$$ provides one solution $$\mathbb{R}^{4} = \text{span } \left\{ \, % 1 \frac{1}{2\sqrt{130}} \left[ \begin{array}{r} 9 \\ 3 \\ -2 \\ 6 \\ \end{array} \right], % 2 \frac{1}{\sqrt{130}} \left[ \begin{array}{r} 6 \\ 2 \\ 3 \\ -9 \\ \end{array} \right], % 3 \frac{1}{\sqrt{10}} \left[ \begin{array}{r} 1 \\ -3 \\ 0 \\ 0 \\ \end{array} \right], % 4 \frac{1}{\sqrt{10}} \left[ \begin{array}{r} 0 \\ 0 \\ 1 \\ -3 \\ \end{array} \right] % \, \right\}$$