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?