How to prove that the $L^p$ spaces are infinite dimensional

As Norbert mentioned, this is simply not true if $S$ is finite.

In general, suppose you can find a collection of countably infinite pairwise disjoint measurable sets $\{ A_n:n\in \mathbb{N}\}$, each with finite positive measure. Then, the collection $\{ 1_{A_n}:n\in \mathbb{N}\}$ is an infinite linearly independent set contained in $L^p$. Why? First of all, the fact that each $A_k$ has finite measure guarantees that $1_{A_k}$ is an element of $L^p$. As for linear independence, suppose we have some finite linear combination of these functions that is equal to $0$: $$ a_11_{A_{n_1}}+\cdots +a_m1_{A_{n_m}}=0. $$ Now, multiply this equation by $1_{A_{n_k}}$ and integrate. You will find that $$ a_k\mu (A_{n_k})=0, $$ and hence, because $\mu (A_{n_k})>0$, we have that $a_k=0$, which proves linear independence.


Since $l^{p}$ embeds isomorphically into $L^{p}$,and it's easy to check that $l^{p}$ is infinitive dimensional.