Why is $\text{dim ker}(T) = 0$ a requirement for invertibility of a finite dimensional operator, but not for an infinite dimensional operator? I have read that Fredholm operators generalize the notion of invertibility, and that all finite dimensional operators are Fredholm with index 0. Also, if you have a Fredholm operator with index zero, then it is surjective if and only if it is injective. So if a Fredholm operator has index 0 and is injective then it will be invertible.
So consider the finite dimensional operator $T: \mathbb{R}^n \to \mathbb{R}^n$ given by the matrix $A$ as follows:
$$
A =
\begin{bmatrix}
1 & 0 & 0 & \dots & \dots & 0 \\
0 & 1 & 0 & \dots & \dots & 0 \\
0 & 0 & 1 & \dots & \dots & 0 \\
0 & 0 & 1 & \dots & \dots & 0 \\
\vdots & \dots & \ddots & \ddots & 0 & 0 \\
\vdots & \dots & \dots & 0 & 1 & 0 \\
0 & 0 & \dots & 0 & 0 & 0 \\
\end{bmatrix}.
$$
That is, the elements of the diagonal of $A$ are $1$, except for the final diagonal element which is $0$.
$A$ has a kernel and cokernel (they are the same) both with dimension $1$ so it is Fredholm with index zero. However it is not injective and therefore not invertible. It seems that for any finite dimensional operator (matrix) I choose with non-trivial kernel, I will never have an injective operator as it can always be reduced to row echelon form in which it will have one or more rows that are all zero.
So the only way an operator $T$ can be invertible in the finite dimensional case is if it has $\text{dim ker}(T) = \text{dim (coker}(T)) = 0$.
On the other hand, from reading about infinite dimensional operators, it seems invertibility is often shown by first showing the operator is Fredholm with index 0, and then showing it is injective.
I don't understand why having $\text{dim ker}(T) \neq 0$ prevents invertibility in the finite dimensional case, yet it doesn't seem to be an issue in the infinite dimensional case? For a finite dimensional operator with a non-trivial kernel we can never have injectivity, so how is it possible that an infinte dimensional operator with non-trivial kernel can be injective?
 A: Because it only shows injectivity in the infinite case. Recall you use dimension arguments in the finite case to show injective iff finite when the dimensions match by showing a basis is mapped to a basis--you show it is mapped to a linearly independent set, and then use counting to show this is a basis, effectively reducing this to the statement "injective functions on finite sets of the same cardinality are bijections". Obviously this is not doable when the dimension is infinite, since there are plenty of injective functions on infinite sets which are not surjections.  However, consider the clearly injective map

$$T: \begin{cases}
C^{\infty}(\Bbb R)\to C^\infty(\Bbb R)\\
f\mapsto \displaystyle\int_0^x f(t)\,dt
\end{cases}$$

By convention (and necessarily) $T(0)=0$. This gives a specific anti-derivative for any given function (all anti-derivatives differ by a constant, so the lower limit of $0$ makes the choice and forces injectivity). However, the map is not surjective as, for example, there is no $f$ so that $T(f) = 1$.
If you don't like the calculus-based example, there's always a shift map, Consider the set of bounded, real sequences $\ell^\infty(\Bbb R)$

$$\sigma: \begin{cases}
\ell^\infty(\Bbb R)\to\ell^\infty (\Bbb R) \\
(x_1, x_2,\ldots, x_n,\ldots)\mapsto (0,x_1,x_2,\ldots, x_{n-1},\ldots)\end{cases}$$

is clearly injective and linear, but not surjective as no sequence beginning with $1$ is in the image.
A: Basically, because of the rank-nullity theorem and the way cardinal arithmetic works.
For any vector spaces $V,W$ and linear map $f:V \to W$, we have that the exact sequence
$$0 \to \ker f \to V \stackrel{f}{\to} V/ \ker f\to 0$$
splits (due to the fact that we are dealing with vector spaces). Therefore, 
$$V\cong \ker f \oplus V/\ker f.$$
Due to the isomorphism theorem,
$$V \cong \ker f \oplus \mathrm{im} f.$$
This can be seen as a "generalization" of the rank-nullity theorem without talking about cardinal arithmetic. This implies, of course, that $\dim V=\dim \ker f+ \dim \mathrm{im} f$. In particular, if $\dim \ker f=0$, then $\dim \mathrm{im} f=\dim V$. In particular, if $W=V$, then the image is a subspace of the original space of same cardinality. Therefore, everything bogs down to:

A subspace $A$ of a finite dimensional space $V$ which has the same dimension as $V$ must be $V$ itself.

And this holds since, if it weren't, you would be able to add one more linearly independent vector to it and have a set of linearly independent vectors inside of it which exceeds the cardinality of a spanning set. We are using the fact that $n+1>n$ here.
The lemma above is not true if we are not in finite dimensional spaces. For instance, $X=\bigoplus_{n \in\mathbb{N}}\mathbb{R}$ has as a subspace the set $S$ of elements which have $0$ as first coordinate, which has a basis of same cardinality of $X$. Since (as was explained) these issues are closely related, this also furnishes a counter-example to your claim: Consider the right-shift map $r_s: X \to X$ which sends $(x_1,x_2,x_3,\cdots)\to (0,x_1,x_2,\cdots)$. Its kernel is trivial, but it is clearly not surjective (note that the image has same dimension as the whole space, as was expected).
