I am watching the linear algebra course of MIT presented by Gilbert Strang and in Lecture 13 he solves the equation $Ax = b$. This is not the usual "find $x$", instead $x$ and $b$ are given and we need to find the matrix $A$ The link is at https://www.youtube.com/watch?v=l88D4r74gtM&t=841s at about minute 14:00. We know:
$Ax = b$
$b=\begin{bmatrix}2\\4\\2\end{bmatrix}$
$x=\begin{bmatrix}2\\0\\0\end{bmatrix}$ + $c\begin{bmatrix}1\\1\\0\end{bmatrix}$ + $d\begin{bmatrix}0\\0\\1\end{bmatrix}$
$\dim N(A)=2$
$A$ is a $3\times 3$ matrix.
But you can see all of that in the video, it looks much clearer on a blackboard.
I am having problems understanding what did professor Gilbert do to get the answer $A=\begin{bmatrix}1&&-1&&0\\2&&-2&&0\\1&&-1&&0\end{bmatrix}$
I just don't seem to understand what happened, at all. How did he come up with the first column? Then how about the other 2? How did he use the nullspace? Why did it work? How did he use $x$ and $b$ ?
Recall that
$$A\begin{bmatrix}a\\b\\c\end{bmatrix}=a\cdot col_1(A)+b\cdot col_2(A)+c\cdot col_3(A)$$
then we know that
$$A\begin{bmatrix}2\\0\\0\end{bmatrix}=\begin{bmatrix}2\\4\\2\end{bmatrix} \implies col_1(A)=\begin{bmatrix}1\\2\\1\end{bmatrix}$$
morover from
$$A\begin{bmatrix}1\\1\\0\end{bmatrix}=\begin{bmatrix}0\\0\\0\end{bmatrix} \implies col_2(A)=-col_1(A)=\begin{bmatrix}-1\\-2\\-1\end{bmatrix}$$
Can you conclude for $col_3(A)$?