Let mu(M, D) be a self-similar measure generated by an n x n expanding real matrix M = rho I-1 and a finite digit set D subset of Z(n), where 0 < vertical bar rho vertical bar < 1 and I is an n x n unit matrix. In this paper, we study the existence of a Fourier basis for L-2(mu(M,D)), i.e., we find a discrete set Lambda such that E-Lambda = {e(2 pi i <lambda,x >) : lambda epsilon Lambda} is an orthonormal basis for L-2(mu M,D). Under some suitable conditions for D, some necessary and sufficient conditions for L-2(mu(M, D)) to admit infinite orthogonal exponential functions are given. Then we set up a framework to obtain necessary and sufficient conditions for L-2(mu(M, D)) to have a Fourier basis. Finally, we demonstrate how these results can be applied to self-similar measures.