# How to turn span into linear equality constraint?

Suppose $$\text{Im}(A) = \text{span}\{\begin{bmatrix} 0 \\ 1 \\ 0 \\ 1 \end{bmatrix} , \begin{bmatrix} 1 \\ 0 \\ 1\\ 0 \end{bmatrix} \}$$

How would you go about turning this very set into a linear equality constraint of the form: $$\text{Im}(A) = \{x \in \mathbb{R}^4 | Gx = 0\}$$

In other words, how do you find the $G$?

## 2 Answers

First your system of vectors obviously has rank $2$. In $\mathbf R^4$, their span requires $4-2=2$ linearly independent equations.

Although one may guess the system of equations, due to the very simple of vectors, I'll show the general method; the vector $u=\begin{bmatrix}x\\y\\z\\t\end{bmatrix}$ lies inthe span of $e_1=\begin{bmatrix}0\\1\\0\\1\end{bmatrix}$ and $e_2=\begin{bmatrix}1\\0\\1\\0\end{bmatrix}$ if and only if the system of equations in $\lambda,\mu$: $$u=\lambda e_1+\mu e_2$$ has a solution. Let's solve this system by Gauß's pivot method applied to the bordered matrix: $$\begin{bmatrix}0&1&x\\1&0&y\\0&1&z\\1&0&t\end{bmatrix}\rightsquigarrow\begin{bmatrix}1&0&y\\0&1&x\\0&1&z\\1&0&t\end{bmatrix}\rightsquigarrow\begin{bmatrix}1&0&y\\0&1&x\\0&0&z-x\\0&0&t-y\end{bmatrix}$$ (we first swapped row 1 and row 2, then substracted row1 from row 3, and row 3 from row 4). Hence the consistency conditions to have a solution are $$\begin{cases} x-z=0,\\y-t=0. \end{cases}$$

• Couple questions: 1. how do you do it by inspection? 2. why did you form the matrix $[e_1, e_2 | u]$? 3. what do you mean by consistency condition? – Carlos - the Mongoose - Danger Oct 31 '15 at 2:33
• The matrix $[e_1 , e_2 \mid u]$ is simply the matrix of the linear system $\lambda e_1+\mu e_2=u$. As there are more equations than unknowns, there are compatibility conditions in order to have solutions, which we obtain by row reduction. You can see form the final form of the system that if one of $z-x, t-y$ is non-zero, there can be no solutions. – Bernard Oct 31 '15 at 10:39

let $x = a\begin{bmatrix} 0 \\ 1 \\ 0 \\ 1 \end{bmatrix} + b\begin{bmatrix} 1 \\ 0 \\ 1\\ 0 \end{bmatrix} = \begin{bmatrix} b \\ a \\ b \\ a \end{bmatrix}$ for any $a,b \in \mathbb{R}$

Since $Im(A)$ equal to the span, $Gx=0$

Now we can just consider G as a row vector, let $G=[g_1,g_2,g_3,g_4]$

$Gx=0 \implies g_1b+g_2a+g_3b+g_4a=0 \implies (g_1+g_3)b+ (g_2+g_4)a=0$

now since this must be true for all $a$ and $b$ in $\mathbb{R}$,

$(g_1+g_3)=0$ and $(g_2+g_4)=0$

$g_1=-g_3$ and $g_2=-g_4$

Therefore $G=[p,q,-p,-q]$ for any $p$ or $q$ in $\mathbb{R}$