Constructing an L2-space with a given orthonormal basis Coming from a completely different world, I am trying to learn some very basic Fourier analysis, and have been scratching my head around this (it may be a very stupid question with an obvious answer):
Let $(f_n(t))_{n\in\mathbb{N}}$ be defined as $f_n(t)=\exp(it\cdot x_n)$ on some compact $T\subset\mathbb R^d$ for a given sequence $(x_n)_{n\in\mathbb N}$ in $\mathbb R^d$. Is it possible to choose $T$ and construct a measure $\lambda$ on it in such a way to make $(f_n(t))_{n\in\mathbb{N}}$ an orthonormal basis in $L_2(T,\lambda)$? This would be in analogy with the usual Fourier basis on the unit circle where $d=1$ and $x_n$ are the integers. So, we need that $\int\exp(it\cdot(x_n-x_m))d\lambda(t)=0$, for $n\neq m$, which seems impossible for generic $(x_n)_{n\in\mathbb N}$, but it is not obvious that it is since we can choose T and the measure on it freely?
Many thanks,
P.S.
 A: Such T and measure do exist and in certain cases the measure is the restriction of usual Lebeasgue measure in $\mathbb{R}^n$. This kinds of sets are called spectral sets and spectral measures respectively, i.e., sets/ measures for which an complete orthogonal system of exponentials exist. The study of such sets began with the work of Fuglede (Fuglede, B. "Commuting Self-Adjoint Partial Differential Operators and a Group Theoretic Problem." J. Func. Anal. 16, 101-121, 1974.) who conjectured that a set is spectral if and only if it tiles and proved it in the special case when the spectrum or the tiling set is a lattice. The conjecture however has been disproved in dimension bigger than 3 following the work of Terence Tao, "Fuglede's Conjecture Is False in 5 and Higher Dimensions." ( http://arxiv.org/abs/math.CO/0306134.) but remain open in dimension 1,2. Further under additional hypothesis on the set T many positive results are known. The study of spectral measure began with the work of Jorgensen and Pedersen and Strichartz. 
