A proof sketch. The codimension of $\ker T$ is just the dimension of the quotient space $U / \ker T$, so in order to the prove the claim, it suffices to show that $\newcommand{\range}{\mathop{\operatorname{range}}}$ $U / \ker T \cong \range T$. To this end, try to demonstrate an explicit isomorphism $S : U/\ker T \to \range T$.
Hint. Any element of $U/\ker T$ is a coset of the form $x + \ker T$ for some $x \in U$. Do you see a natural way to define $S(x + \ker T)$? Once you define $S$, to complete the proof, you will need to show that the map $S$ is
- well-defined (What does well-defined mean in this context?),
- linear,
- bijective (i.e., surjective and injective).
We have $L:\Bbb R^3\to\Bbb R^3$ mapping $(x_1,x_2,x_3)\mapsto (x_1,x_1,x_1)$.
Its kernel, by definition, consists of those real triples $(x_1,x_2,x_3)$ which are mapped to $(0,0,0)$ by $L$. For this specific $L$ above, these are exactly the ones where $x_1=0$ and $x_2,x_3$ are arbitrary.
These can be parametrized without further restrictions with $2$ real numbers (namely, by $x_2$ and $x_3$), so it will be a $2$ dimensional space.
Turning this into the language of bases, just get the vectors where one of the parameters is $1$, and the rest are $0$.
In our case, $(0,1,0)$, $\ (0,0,1)$ will give a basis for $\ker L$.
Its range, by definition, consists of the possible values the function can take. These are now $(a,a,a)$ for all possible real $a$. $\ $ [Indeed, e.g. $L(a,0,0)=(a,a,a)$ for any $a\in\Bbb R$.]
It can be given with $1$ parameter, it will have dimension $1$, and a basis is given by $(1,1,1)$.
Best Answer
This is false in the infinite-dimensional case. For example, take $T_L : \mathbb{R}^{\mathbb{N}} \to \mathbb{R}^{\mathbb{N}}$ to be the left shift
$$T_L(a_1, a_2, \dots) = (a_2, a_3, \dots).$$
Then $\dim \text{ker}(T_L) = 1$ but $\text{codim } \text{im}(T_L) = 0$.
In general the left shift and the right shift
$$T_R(a_1, a_2, \dots) = (0, a_1, a_2, \dots)$$
are the first counterexamples you should look at in infinite-dimensional linear algebra. For example the right shift $T_R$ satisfies $\dim \text{ker}(T_R) = 0$ but $\text{codim } \text{im}(T_R) = 1$. It also famously has no eigenvalues (unlike the left shift).