Relationship between the dimensions of $\ker T$ and $\ker T^*$ Let $V$ be a Hilbert space. Suppose $T: V \to V$ is a bounded linear map such that $\ker T$ has finite dimension. Is it true that $\ker T^*$ also has finite dimension, where $T^*$ is the adjoint of $T$?
I know that $\ker T^*$ = $(\text{im} T)^\perp$, so this question could also be phrased: what is the relationship between the dimension of $\ker T$ and $(\operatorname{im} T)^{\perp}$?
 A: There is zero relation, in the following sense: given $m,n\in\mathbb N\cup\{\infty\}$ there exists $T\in B(H)$ with
$$
\dim \ker T=m,\qquad\qquad\dim\ker T^*=n.
$$
Let us assume without loss of generality that $m\leq n$ (we can otherwise switch the roles of $T$ and $T^*$).
Fix an orthonormal basis $\{e_k\}$. Consider first the case where $m=0$. If $n=\infty$, we define $T$ by
$$
Te_k=e_{2k}
$$
and extended by linearity. As $T$ is isometric it is injective, so $\dim\ker T=0$. It is useful to find the dimensions to note that
$$
\ker T=\ker T^*T,\qquad\qquad \ker T^*=\ker TT^*. 
$$
In this case a quick computation shows that $$T^*e_k=\begin{cases}0,&\ k\ \text{ odd }\\ e_{k/2},&\ k\ \text{ even}\end{cases}
$$
Then $e_{2k+1}\in\ker T^*$ for all $k$, and so $\dim\ker T^*=\infty$.
When $n<\infty$, let $T$ be the linear operator such that
$$
Te_k=e_{k+n}. 
$$
Then $\ker T^*=\operatorname{span}\{e_1,\ldots,e_n\}$ and so $\dim T^*=n$.
Finally, if $m>0$, relabel the orthonormal basis in two parts, $$\{f_j\}_{j=1}^m\cup\{e_k\}_{k\in\mathbb N}.$$
Now define $R$ as the linear operator with
$$
Rf_j=0,\qquad\qquad j=1,\ldots,m
$$
and on $\{e_k\}$ use the previous part to define $S$ with $\dim\ker S=0$, $\dim\ker S^*=n-m$. Then $T=R\oplus S$ satisfies $\dim\ker T=m$ and $\dim\ker T^*=n$
