I’m currently reading Alexer’s linear algebra done right. He proved in the book that $\dim \mathcal{L}(V,W) = \dim V \dim W$ holds if both $V$ and $W$ have finite dimension. I’m wondering if this identity still holds when one of $V$ and $W$ is infinite dimensional (dimension is defined as the cardinality of its Hamel bases).
Obviously the proof for finite dimensional cases does not work in the infinite dimensional case, since the standard basis that sends $v_i$ to $w_j$ and $v_k$ to $0$ $(\forall k \neq i)$where $i < \dim V$ and $j < \dim W$ (for all $i, j$) does not span $\dim \mathcal{L}(V,W)$, as linear combinations must be finite. After some searching I found this question which seems to be a counterexample to the identity, since the identity implies $\dim V^* = \dim V\dim F = \dim V$. But I still would like to know when exactly does this identity fail, like does it hold exactly for finite dimensional spaces or does it still hold for some infinite dimensional $V$ or $W$?