Transforming a spanning subset into a homogeneous equation system I am taking Linear Algebra 1 at my university, and I have seen exercises that require transforming the representation of a vector space from the span of a finite subset into a homogeneous equation system that the solution is the vector space. 
Let's say I have a subset of $\mathbb{R}^4$ as follows:
$$S=\{(1,0,-1,-2),(-1,-1,0,2),(1,2,1,-2)\}$$
I want to represent $\mathrm{span}(S)$ as the solution of an equation system. How do I do this? Thanks in advance.
 A: You want to have a system of equations, with each equation having the form
$$
a_1 x_1 + a_2x_2 + a_3x_3 + a_4 x_4 = 0
$$
such that the elements of $S$ are solutions to your system of equations.  In other words, you know that the coefficients in your system of equations must satisfy
$$
a_1(1) + a_2(0) + a_3(-1) + a_4(-2) = 0\\
a_1(-1) + a_2(-1) + a_3(0) + a_4(2) = 0\\
a_1(1) + a_2(2) + a_3(1) + a_4(-2) = 0
$$
Consider these equations as a system of equations to be solved for the coefficients $a_1,a_2,a_3,a_4$.
A: Viewing this problem in matrix terms, you’re looking for some four-column matrix whose null space is $S$. Recall that the null space of a matrix is the orthogonal complement of its row space, and that for any subspace $V$ of $\mathbb R^n$, $(V^\perp)^\perp=V$. So, if you assemble a matrix with the given vectors as its rows and then find a basis for its null space, you’ll have the rows of the coefficient matrix of a system of linear equations that define $S$.  
Using your example, apply Gaussian elimination: $$\left[\begin{array}{r}1&0&-1&-2\\-1&-1&0&2\\1&2&1&-2\end{array}\right] \to \left[\begin{array}{r}1&0&-1&-2\\0&1&1&0\\0&0&0&0\end{array}\right]$$ from which you can read the null space basis $\{(1,-1,1,0)^T,(2,0,0,1)^T\}$, giving the system $$x_1-x_2+x_3=0 \\ 2x_1+x_4=0.$$
A: S={(1,0,−1,−2),(−1,−1,0,2),(1,2,1,−2)} spans a given subspace of $R^4$. That means that, if (a, b, c, d) is in that subspace, (a, b, c, d)= x(1, 0, -2, -2)+ y(-1, -1, 0, 2)+ z(1, 2, 1, -2)= (x- y+ z, -y+ 2z, -2x+ z, -2x+ 2y- 2z). That is the system of equations x- y+ z= a, -y+ 2z= b, -2x+ z= c, and -2x+ 2y- 2z= d.
Since you ask for a "homogeneous system" and the 0 vector, (0, 0, 0, 0), is in any subspace, x- y+ z= 0, -y+ 2z= 0, -2x+ z= 0, and -2x+ 2y- 2z= 0.  Of course the only solution to that set of equations is the trivial solution x= y= z= 0.
A: In general, a subspace of dimension $k$ in $\mathbb{R}^n$ is spanned by $k$ linearly independent vectors, and can be represented as the solution set of a system of $n-k$ linearly independent linear equations.
So first, we check the dimension of $\text{span}(S)$, that is, we check the maximal size of a linearly independent subset of $S$.
Writing $S=\{v_1,v_2,v_3\}$, we can see that
$$v_1+2v_2+v_3=0$$
and hence $S$ is linearly dependent. On the other hand, it's easy to see that $\{v_1,v_2\}$ are linearly independent $(v_1$ has a $0$ coordinate on a position where $v_2$ does not$)$.
It follows that $\text{span}(S)=$ $\text{span}(\{v_1,v_2\})$ has dimension $2$.
We therefore need to find $2$ linearly independent linear equations in order to represent $\text{span}(S)$ as the solution set of a system of linear equations.
Now, observe that any equation of the form
$$\sum_i a_ix_i=0 \tag{1}$$
can be written as
$$\left\langle (a_1,a_2,\dots,a_n),(x_1,x_2,\dots,x_n) \right\rangle=0.$$
In other words, any solution $\mathbf x=(x_1,x_2,\dots,x_n)$ to equation $(1)$ must be orthogonal to the coefficient vector $\mathbf a = (a_1,a_2,\dots,a_n)$.
You don't have the coefficients, but you do have linearly independent solutions, namely $v_1$ and $v_2$.
Notice that by the linearity of the inner product, and because $S$ is spanned by $v_1$ and $v_2$, if $\mathbf a\perp v_1$ and $\mathbf a\perp v_2$, then $\mathbf a\perp v$ for all $v\in S$.
In other words, if for $v_1$ and $v_2$ solve $(1)$, then all of $S$ does.
At this point, the problem boils down to finding two linearly independent coefficients vectors $\mathbf a$ and $\stackrel{\sim}{\mathbf a}$ orthogonal, each of which is orthgonal to both $v_1$ and $v_2$.
Do you think you can take it from here?
A: A general procedure is as follows: let $u=(x_1,x_2,x_3,x_4)\in\mathbb{R}^4$. Then:
$$u\in\operatorname{Span}(S)\iff\exists a,b,c\in\mathbb{R},\ (*)\begin{cases}a-b+c=x_1\\\ -b+2c=x_2\\-a\ \ +c=x_3\\-2a+2b-2c=x_4\end{cases}$$
Then perform the Gaussian elimination on System $(*)$:
$$(*)\iff\begin{cases}a-b+c=x_1\\\ -b+2c=x_2\\-b+2c=x_3+x_1\\\ \ \ \ \ \ \ \ \ \ 0=x_4+2x_1\end{cases}\iff\begin{cases}a-b+c=x_1\\-b+2c=x_2\\0=x_3+x_1-x_2\\0=x_4+2x_1.\end{cases}$$
Hence
$$u\in\operatorname{Span}(S)\iff\begin{cases}x_1-x_2+x_3=0\\2x_1+x_4=0\end{cases}$$

The general method is as follows: write
$$u\in\operatorname{Span}(S)$$
as
$$\exists a,b,\ldots\in\mathbb{R}\ \text{such that a certain linear system $(*)$ with unknowns $a,b,\ldots$ is satisfied.}$$
Apply the Gaussian elimination to this system $(*)$. The constraints (i.e., the rows of the form $0=\cdots$) give you a system of equations that describes $\operatorname{Span}(S)$.

Since the Gaussian elimination is rather efficient, this gives you a rather efficient method to solve these types of problems.
