Extension of the Fourier transform from $S(\mathbb R^n)$ to $L^2(\mathbb R^n)$ and from $L^2(\mathbb R^n)$ to $L^2(\mathbb R^n)$ I want prove that the Fourier transform $\mathcal F$ it extends from $S(\mathbb R^n)$ to $L^2(\mathbb R^n)$ and (called yet the extension $\mathcal F$) then $\mathcal F$ :$L^2(\mathbb R^n)\rightarrow L^2(\mathbb R^n)$ is a surjective isometry
My idea is use a theorem of metric spaces:
Let $X$ a complete metric space and $Y$ a metric space, $T:X \rightarrow Y $ continuous, a set $X_0\subseteq X $ dense in $X,$ $T_{|X_0} $ is an isometry and $T(X_0)$ is dense in $Y$ then $T$ is a surjective isometry
 A: Given the hint, you want to show that


*

*$\mathcal F$ is an isometry, that is, $\|\mathcal Ff\|_2 = \|f\|_2$ for all $f\in S(\mathbb R^n)$, and

*$\mathcal F(S(\mathbb R^n))$ is dense in $L^2(\mathbb R^n)$.


The first of these, as mentioned in a comment, is known as Plancherel's theorem. To prove it, let $f\in S(\mathbb R^n)$, and let $\hat f = \mathcal Ff$. Then by the Fourier inversion theorem,
$$ f(x) = \int \hat f(\zeta) e^{2\pi ix\cdot \zeta} \, d\zeta$$
and so
$$ \overline{f(x)}=\int \overline{\hat f(\zeta)}e^{-2\pi ix\cdot \zeta} \, d\zeta.$$
Hence,
\begin{align*}
\|f\|_2^2 &= \int |f(x)|^2 \, dx \\
&= \int f(x)\overline{f(x)} \, dx \\
&= \int \left(\int\hat f(\zeta) e^{2\pi i x\cdot \zeta} \, d\zeta \right) \left(\int\overline{\hat f(\xi)} e^{-2\pi ix\cdot\xi} d\xi\right) \, dx \\
&= \int\overline{\hat f(\xi)} \left(\iint \hat f(\zeta)e^{2\pi ix \cdot (\zeta-\xi)} \, d\zeta \, dx\right)d\xi.
\end{align*}
We will be done if we can show $\iint \hat f(\zeta)e^{2\pi ix\cdot(\zeta-\xi)} \, d\zeta \, dx= \hat f(\xi)$. But this once again follows from Fourier inversion:
\begin{align*}
\hat f(\xi) &= \int f(x) e^{-2\pi ix\cdot\xi} \, dx \\
&= \int \left(\int \hat f (\zeta) e^{2\pi i x\cdot \zeta} \, d\zeta \right) e^{-2\pi ix\cdot\xi} \, dx \\
&=\iint f(\zeta)e^{2\pi ix\cdot(\zeta-\xi)} \, d\zeta \, dx.
\end{align*}
The second point is much simpler. Since $\mathcal F$ is invertible on $S(\mathbb R^n)$, $\mathcal F(S(\mathbb R^n)) = S(\mathbb R^n)$, which is dense in $L^2(\mathbb R^n)$.
