Finding a linear mapping given span of the kernel Finding a linear mapping  given the span of the kernel,  where u=(1,2,3,4) and v=(0,1,1,1)  now if u and v span kernel then how can I find the linear mapping?
 A: Complete $u,v$ to a basis say $\{u,v,(0,0,1,1),(0,0,0,1)\}$ and define
$f: u\to 0, \ v\to0,\ (0,0,1,1)\to (0,0,1,1),\ (0,0,0,1)\to (0,0,0,1)$
Then $f$ is linear with the appropriate kernel
Every linear map is determined by its image of some basis. For your example you want a linear map $f:\mathbb{R}^4\to\mathbb{R}^4$ so if a have a basis $\{e_1,e_2,e_3,e_4\}$ then $f(x,y,z,w)=xf(e_1)+yf(e_2)+zf(e_3)+wf(e_4)$. So I just complete the set of $\{u,v\}$ into a basis of $\mathbb{R}^4$ ny adding two vectors s.t. the whole set is linearly idependent. Now I have to find a map $f$ with kernel $\{u,v\}$ so it has to be $f(u)=f(v)=0$. For the other two vectors of the basis I have to choose their images to be linearly independent.
It is $e_1=u-2v-(0,0,1,1)-(0,0,0,1)$
$e_2=v-(0,0,1,1)$
$e_3=(0,0,1,1)-(0,0,0,1)$
$e_4=(0,0,0,1)$
So $$f(x,y,z,w)=xf(e_1)+yf(e_2)+zf(e_3)+wf(e_4)= \\ x[f(u)-2f(v)-f(0,0,1,1)-f(0,0,0,1)]+y[f(v)-f(0,0,1,1)]+ z[f(0,0,1,1)-f(0,0,0,1)]+wf(0,0,0,1)= \\ x(0,0,-1,-2)+y(0,0,-1,-1)+z(0,0,1,0)+w(0,0,0,1)=(0,0,-x-y+z,-2x-y+w)$$
A: Step 1: Extend $\{u, v\}$ to a basis $\{ u, v, x, y \}$ of $\mathbb{R}^4$.
Step 2: Define the linear mapping $f: \mathbb{R}^4 \to \mathbb{R}^4$ by the following: $f(u) = 0, f(v) = 0$; as for $f(x)$ and $f(y)$, they can be any two linearly independent vectors.

In more detail
Here is a systematic way to do Steps 1 and 2 (that also works in general).
Step 1: To extend a set to a basis, you can do the following process that also works more generally: put the vectors into the rows of a matrix. In this case, we have $\begin{bmatrix}1 & 2 & 3 & 4\\ 0 & 1 & 1 & 1\end{bmatrix}$. Then reduce this matrix. Find which variables are free variables, then add on the standard basis vectors corresponding to those free variables. For example, in this case, the matrix reduces to $\begin{bmatrix}1 & 0 & 1 & 2\\ 0 & 1 & 1 & 1\end{bmatrix}$. The free variables correspond to the $3$rd and $4$th columns, so we add on the standard basis vectors $e_3 = (0, 0, 1, 0)$ and $e_4 = (0, 0, 0, 1)$. Then our new set $\{u, v, e_3, e_4\}$ is a basis for $\mathbb{R}^4$.
Why does this work? Well, since elementary row operations don’t change the row space, we can reduce the matrix without changing the space spanned by the vectors that we put as the rows of the matrix. Reducing the matrix makes it easier to see which variables are free variables, so that we can add on the standard basis vectors corresponding to those free variables, which will extend our original set of vectors to a basis of the whole space.
Step 2: Step 2 works basically because we have the following theorem from linear algebra (which you can try to prove as an exercise if you want):

*

*Theorem: Suppose $V, W$ are vector spaces. Suppose $V$ is finite-dimensional, say $v_1, …, v_n$ is a basis for $V$. Let $w_1, …, w_n$ be any $n$ vectors (not necessarily distinct) in $W$. Then there exists a unique linear mapping $T: V \to W$ such that $Tv_i = w_i$ for each $i \in \{1, …, n \}$.

So, for your case, we have $V = \mathbb{R}^4$, $v_1 = u = (1, 2, 3, 4), v_2 = v = (0, 1, 1, 1)$, and we want $w_1 = (0, 0, 0, 0), w_2 = (0, 0, 0, 0)$. We need to find $v_3$ and $v_4$ to extend the set $\{u, v\}$ to a basis of $\mathbb{R}^4$, which has been done in Step 1. And for $w_3, w_4$, you can choose any two linearly independent vectors. Then (Exercise) $\{u, v\}$ is a basis for the kernel and, as the Theorem guarantees, the mapping defined by $Tv_i = w_i$ for all $i \in \{1, 2, 3, 4\}$ is indeed linear. We have specified the linear mapping completely because we have specified what it does to the vectors of a basis.
