So, I have to prove the following result that I found in my book:
Let $f:V \to W$ be a linear map and let $V$ be a finite dimensional vector space. Then:
$\dim(Ker(f)) + rank(f) = \dim(V)$
Proof Attempt:
Let $\dim(V) = n$. Since $Ker(f)$ is a subspace of $V$, it is finite-dimensional so let us have $\dim(Ker(f)) = m$.
Let $A = (v_1,v_2,...,v_n)$ be a basis of $V$ and let $B = (u_1,u_2,....,u_m)$ be a basis of $Ker(f)$. Let $w \in Im(f)$. Then, there exists a vector $v \in V$ such that $f(v) = w$. Since any vector $v$ can be written as a linear combination of the vectors in $A$, it is the case that every vector in $Im(f)$ can be written as a linear combination of the vectors $(f(v_1),....,f(v_n))$. This shows that Im(f) must be finite-dimensional since there are a list of vectors, linearly independent or not, that do span it.
Now, $B$ forms a linearly independent list of vectors in $V$ and $L(A+B) = V$, where $A+B$ simply means that we are combining both lists of vectors together.
By the Basis Extension Theorem, we can take vectors from $A$ and adjoin them to $B$ in order to form a list, called B', that is a basis for $V$. In particular, we need $n-m$ vectors from $A$ in order to do this. So, we have our new list written as follows:
$B' = (u_1,....,u_m,v_{j_1},....v_{j_{n-m}})$
Since any vector in $V$ can be written as a linear combination of the vectors in $B'$, it follows that any vector in $Im(f)$ can be written as a linear combination of the vectors $(f(u_1),....,f(u_m),f(v_{j_1}),.....,f(v_{j_{n-m}}))$. In other words, the linear hull of these vectors is equal to $Im(f)$.
However, if we consider any vector $v$ that is formed by the linear combination of the vectors in $B'$ and act on it with $f$, then we are left with:
$f(v) = \sum_{k=1}^{n-m} \beta_k v_{j_k}$
The reason for that is because $\forall i \in \{1,...,m\}: f(u_i) = 0$. So, we have a list of length $n-m$ that spans $Im(f)$ and is also a linearly independent list. Hence, it forms a basis for $Im(f)$. So, we have:
$rank(f) = n - m = \dim(V) - \dim(Ker(f))$
$\implies \dim(Ker(f)) + rank(f) = \dim(V)$
That proves the desired result.
I need feedback on the proof I have above. Is it correct? If it is, is there a shorter way to approach the problem? If it isn't, what's the exact flaw and what can I do to fix it? Is the proof clear or have I been too ambiguous in certain instances?