# Orthogonal Projection of a function onto $M$ [closed]

Let $I_1, · · · , I_N$ be pairwise disjoint intervals whose union is $[0,1]$. Let $$M = \lbrace g ∈ L^2([0,1]) :\text{ g is constant on I_n } \forall n \rbrace.$$ Suppose $f \in L^2([0,1])$. Determine $P_M f$.

Let $e_i=\frac{1}{\sqrt{|I_n|}}\chi_{I_n}$, where $|I_n|$ denotes the length of $I_n$, and $\chi_{I_n}$ is the indicator function of $I_n$. Note that $(e_i,e_j)=\delta_{ij}$, so the $e_i$ form an orthonormal basis for $M$. Hence $P_Mf = \sum_{i=1}^N (f,e_i)e_i$.
• Otherwise $(e_i,e_i)$ wouldn't be 1. In general, the norm of a vector is $\sqrt{(v,v)}$, so we're dividing by the norm of $e_i$. – jgon Nov 30 '17 at 7:42