If $X$ is compact Hausdorff space and $C(X)$ is the set of all continuous complex valued functions on $X$,then prove that $C(X)$ is finite dimensional if and only if $X$ is finite.
My problem:If we suppose $X=\{x_1,x_2,...,x_n\}$ then how we can prove that $C(X)$ is spanned by the functions $e_i(x_j)=\delta_{ij}$ and $C(X)\cong \mathbb{C^n}$? And if we suppose $X$ is infinite then can I use the solution (When is the vector space of continuous functions on a compact Hausdorff space finite dimensional?) by replacing $\mathbb{R}$ by $\mathbb{C}$?