TITLE: A topological space with cardinality strictly less than its weight?
QUESTION [10 upvotes]: My book states that 

if $X$ is compact, then $w(X) \leq |X|$.

This leads me to wonder, is there a nice example of a (non-compact) topological space where $w(x) > |X|$ holds?
The weight of a topological space is the smallest cardinality of a basis of the topology.

REPLY [11 votes]: The maximal weight of a space $X$ is $2^{|X|}$ and in this answer I give some examples (with proofs) of spaces that realise this maximum. E.g. a countable dense subset of $\{0,1\}^{\mathbb{R}}$ in the product topology has weight $|\mathbb{R}|$. 
The bound $w(X) \le |X|$ for compact spaces follows from the equality $nw(X) =w(X)$ for (locally) compact spaces (and it also holds for metrisable spaces and orderable spaces), so many standard examples don’t work.