Finding a linear operator where $T$ maps $\mathbb{R}^4$ to $\mathbb{R}^4$ such that $\ker(T)=\text{im}(T)$ I've visited other similar examples on the internet and this page but I cannot understand the content. 
This is a question in part of my assignment along with show no such operator exists for the linear map of $\mathbb{R}^{3}$. I have compiled an answer for the second half using the theorem of conservation of dimension. The first part is meant to be the easiest but I'm struggling in the course content and am lost at how to go about it.
For the second half I had 
$$\dim(U)=\dim(\ker(T)) + \dim(\text{im}(T)),$$
therefore 
$$\dim(U)= 2\dim(\text{im}(T)) = 2 \dim(\ker(T)).$$
Hence showing that $\dim(U)$ is always even. Hence we cannot have an operator for $\mathbb{R}^{3}$ as the image and kernel could not be equal.
But for the first half I have been playing around with what I've found online.
I understand that for the kernel everything is mapped to zero
$$\ker(T) := \{u\in U: T(u)=0\}$$
and for $$\text{im}(T) :=\{T(u):u\in U\},$$
but I don't understand the connection.
There was an example concerning linear map to $\mathbb{R}^{2}$ on this site but it did not make sense to me. It was where $T(x,y) = (y,0)$ and they said this satisfied it for the linear map $\mathbb{R}^{2}$
I played around with 
$$T(x,y,z,w)=(x-z,y-w,z-x,w-y)$$
and 
$$T(x,y,z,y)=(y,z,w,x).$$
I'm lost at the fundamentals and how to work out if the map in fact has $\text{im}(T)=\ker(T)$. Could someone please try and explain this to me?
 A: Start by choosing bases. But specifically, let $\{e_1, e_2\}$ be a basis for $\ker(T)$ (why is $\dim \ker (T) = 2$?) then extend this to a basis $\{e_1, e_2, e_3, e_4\}$ for $\mathbb R^4$. We will attempt to define $T$ on this basis in a way that works.
First and foremost,
$$Te_1 = Te_2 = 0$$
by definition.
Secondly, you want $\mathrm{im}(T) = \ker(T)$ so
$$Te_3, Te_4 \in \mathrm{span}\{e_1, e_2\} \quad\text{(why?)}$$
and
$$\ker(T) = \mathrm{span}\{Te_3, Te_4\} \quad\text{(again, why?)}.$$
Now give an easy way to satisfy these two conditions and show that such a $T$ gives what you want.
A: Let $A$ be the matrix corresponding to the transformation $T$.
We have $T(T(\Bbb R^4)) = T(\operatorname{im}(T)) = T(\ker(T)) = \{\vec 0\}$.
Therefore, $A^2 = O$.
Thus, $A$ is a nilpotent matrix with degree $2$.
Examples include $\begin{pmatrix}0&0&a&b\\0&0&0&c\\0&0&0&0\\0&0&0&0\end{pmatrix}$ and $\begin{pmatrix}0&0&0&0\\0&0&0&0\\a&0&0&0\\b&c&0&0\end{pmatrix}$ and their similar matrices ($BAB^{-1}$).
A: Let $T=\begin{bmatrix} T_{11} & T_{12} \\ T_{21} & T_{22} \end{bmatrix}$ where each $T_{ij}$ is a $2 \times 2$ matrix.
If we set $T_{21} = T_{22} = 0$, then see that ${\cal R} T \bot \operatorname{sp} \{ e_3,e_4\}$, so we would like
${\cal R} T = \ker T = \operatorname{sp} \{ e_1,e_2\}$.
To achieve ${\cal R} T = \operatorname{sp} \{ e_1,e_2\}$ we can pick
$T_{12} = I$ and an arbitrary $T_{11}$ ($T_{11}=0$ will do).
