linear algebra – Is the dimension concept always well defined for unfinished dimensional spaces?

The question is quite simple: if $ mathbb {V} $ is a vector space and $ B $ and $ B & # 39; are the basis for $ mathbb V $, so do $ B $ and $ B & # 39; to have the same cardinality?

I tried to answer the question as follows: suppose that $ B & # 39; is taller than $ B $. Then there is a map $ f: B & # 39; to B $ surjective but not injective. Extend this to a linear map $ f: mathbb V to mathbb V $ we have that $ mathbb V / ker f # cong mathrm {Im} f & # 39; = mathbb V $with $ ker f $ to be non-trivial. But is it really a contradiction? (Of course, it's in finite dimension, since we know that all bases have the same cardinality in this case, but that's exactly what we're trying to prove here …)