Two Hamel bases of the same vector space have the same cardinality, so we define the dimension of a vector space as the cardinality of one of its Hamel basis.
Could you confirm if my below understanding is fine?
Let $E$ be an infinite-dimensional Banach space. Let $G$ be a closed subspace of $E$. Let $L$ be a (topological) complement of $G$, i.e., $L$ is a closed subspace of $E$ such that $G\cap L = \{0\}$ and $G+L=E$.
- By cardinal arithmetic, $\dim G +\dim L = \dim E$. This identity implies a result (for Hilbert spaces) in this question.
- By rank-nullity theorem, $\operatorname{codim} L + \dim L = \dim E$.
Then $\dim G = \operatorname{codim} L$ follows from below Lemma.
Lemma Let $A, B, C$ be non-empty sets. If $|A|+|B| = |A|+|C|$, then $|B|=|C|$. Here $|A|$ is the cardinality of $A$.
As indicated in a comment, above Lemma is not true. I would like to ask if $\dim G = \operatorname{codim} L$ still holds.
Thanks to this enlightening comment by Jochen, I have come up with below proof.
We need some results from Brezis' Functional Analysis, i.e.,
Let $\pi:E \to G$ be the continuous linear projection map defined in above paragraph. Then $\pi$ is surjective homomorphism such that $\ker \pi = L$. By first isomorphism theorem for groups, $$ \operatorname{im} \pi \cong E / \ker \pi. $$
It follows that $G \cong E/L$ and thus $\dim G = \dim (E/L) =: \operatorname{codim} L$.