Q:

Meaning of the Fourier transform of $1$

According to Wolfram, Fourier transform of $1$ is $\sqrt{2\pi} \, \delta(\omega)$. Can someone explain what this means? 
The only frequency the function $1$ should just be $0$ since $\cos(0) = 1$.
So, shouldn't the result have just been $0$ instead of that expression?

A:

Short intuitive answer: The Fourier transform breaks functions down into their constituent frequencies, and frequency is the inverse of wavelength. A constant function $1$ is so spread out that it effectively has infinite wavelength, or zero frequency. Hence its Fourier transform is concentrated at $0$, giving a spike (e.g. a delta function). Conversely, the Fourier transform of $\delta$ is constant.

Long technical answer: The Fourier transform is most easily defined on $\mathcal{S}$, the space of Schwarz functions, where we have a formula that
$$\hat{f}(\xi) = \int_{\mathbb{R}} f(x) e^{-2\pi i x \xi} \, dx.$$
This definition leads to a lot of useful properties, such as
$$\int_{\mathbb{R}} \hat{f} g \, dx = \int_{\mathbb{R}} f \hat{g} \, dx.$$
We can use this to define the distributional Fourier transform by taking this as a definition: Given a (tempered) distribution $T$ that acts on Schwarz functions $g$ via the pairing $\langle T, g\rangle$, we define the Fourier transform of $T$ to be the distrubtion that acts via
$$\langle \hat{T}, g\rangle = \langle T, \hat{g}\rangle.$$
Basically, all this means is that we can move the hat back and forth just like with "nice" functions.

Given all this, the delta function is best viewed as the distribution which acts via
$$\langle \delta, g\rangle = g(0).$$
Thinking of $\delta$ as a spike at zero with area one and integrating this against $g$ also makes sense. Then the Fourier transform of $\delta$ is the distribution that acts via
$$\langle \hat{\delta}, g\rangle = \langle \delta, \hat{g}\rangle = \hat{g}(0) = \int_{\mathbb{R}} g \, dx = \int_{\mathbb{R}} 1 \cdot g \, dx.$$
Therefore, we can think of $\hat{\delta}$ as simply integrating against a constant function $1$, and identify $\hat{\delta} = 1$. (Depending, of course, on the normalization of the Fourier transform).

