constructing a matrix given its column space and null space This is not homework, class or a project. I've been out of college for some time now and decided to learn math on my own time.
I can't figure out how to solve the following problem:
Construct a 4 x 4 matrix A whose column space R and null space N are given by 
$$ R = \alpha \begin{bmatrix} 1\\2\\0\\0 \end{bmatrix} + \beta \begin{bmatrix} 0\\1\\2\\0 \end{bmatrix}$$
$$ N = \alpha \begin{bmatrix} 1\\2\\0\\0 \end{bmatrix} + \beta \begin{bmatrix} 0\\1\\2\\0 \end{bmatrix}$$
How do I approach this problem?
 A: Let $A=[v_1\;v_2\;v_3\;v_4]$ be the required matrix. You need that
$$
A\begin{bmatrix}1\\2\\0\\0\end{bmatrix}=v_1+2v_2=0
$$
so $v_1=-2v_2$; also
$$
A\begin{bmatrix}0\\1\\2\\0\end{bmatrix}=v_2+2v_3=0
$$
so $v_2=-2v_3$ and $v_1=4v_3$.
You see that $v_4$ can be anything; now just take
$$
v_3=\begin{bmatrix}1\\2\\0\\0\end{bmatrix}
\quad
v_4=\begin{bmatrix}0\\1\\2\\0\end{bmatrix}
$$
Then the matrix
$$
A=[v_1\;v_2\;v_3\;v_4]=
\begin{bmatrix}
4 & -2 & 1 & 0 \\
8 & -4 & 2 & 1 \\
0 & 0 & 0 & 2 \\
0 & 0 & 0 & 0
\end{bmatrix}
$$
will have the required column space and null space: indeed, the column space is generated by $v_3$ and $v_4$, so it has dimension $2$. Since the null space contains the required one, it will be equal to it by the rank-nullity theorem.
A: One way to approach such problems is to make use of the fact that, for a suitable choice of bases for the domain and codomain, the matrix of a linear transformation $T:\mathbb R^n\to\mathbb R^m$ takes the form $$M=\left(\begin{array}{c|c}I_r&0\\\hline0&0\end{array}\right),$$ where $r$ is equal to the rank of the transformation. A straightforward change-of-basis operation then gives you the matrix relative to the standard bases.   
What do these bases look like? For the domain, start with a basis $(v_{r+1},\dots,v_n)$ for the kernel of T and extend it to a basis $(v_1,\dots,v_r,v_{r+1},\dots,v_n)$ of $\mathbb R^n$. For the codomain, take $(Tv_1,\dots,Tv_r)$, which is a basis for the image of $T$ (why?), and extend that to a basis $(Tv_1,\dots,Tv_r,w_{r+1},\dots,w_m)$ of $\mathbb R^m$. Note that these bases are in general not unique: there will be many choices of basis for the kernel, and you are free to extend the two bases in any way you like. Observe also that in practice, it’s not necessary to compute an extension to the image basis because right-multiplying by $M$ will zero out the columns that correspond to the additional basis vectors. This makes sense: it shouldn’t matter what we choose for additional basis vectors for the codomain since they don’t contribute to the image of a vector under $T$, anyway.  
For your problem, we don’t have the transformation itself, but we do have bases for its image and kernel, so we can proceed similarly: we extend the kernel basis to all of $\mathbb  R^4$, declare that the images of the extension basis vectors are the given basis vectors for the image, and then extend the image basis to all of $\mathbb R^4$. As above, we don’t need to extend the image basis explicitly, so we really only need to find a pair of linearly independent vectors, $v_1$ and $v_2$, that are outside of the span of the two given vectors that generate the kernel. The vector $(0,0,0,1)^T$ obviously fits the bill, and it shouldn’t be too hard to find another. Once we have these two vectors, the desired matrix can then be found by computing $$\pmatrix{1&0&0&0\\2&1&0&0\\0&2&0&0\\0&0&0&0}\pmatrix{\mid&\mid&1&0\\v_1&v_2&2&1\\\mid&\mid&0&2\\\mid&\mid&0&0}^{-1}.$$

Update: We can also produce a matrix that satisfies the conditions of the problem fairly simply and directly without having to invert a matrix by combining the above idea with the following two facts: the columns of a transformation matrix are the images of the basis vectors, and the result of (left-)multiplying a column vector by a matrix is a linear combination of the columns of the matrix with coefficients given by the components of the vector.  
Since $(0,1,2,0)^T$ is in the kernel, we know that the second column of the matrix must be $-2$ times the third. Similarly, the first column must be $-2$ times the second, that is, $4$ times the third. Conveniently for us, the standard basis vectors $(0,0,1,0)^T$ and $(0,0,0,1)^T$ are a valid extension of the kernel basis, so for the third and fourth columns we can take any pair of basis vectors for the image (column space) of the matrix. We’ve been given such a pair of vectors, so we’re done. Other matrices that solve the problem correspond to different choices of basis for the column space.
A: Hint: Use the first and fourth columns to get the correct column space, then use the null space to figure out what the second and third columns need to be.
