Tristimulus color space as a mathematical projection
Continuing with our mathematical description of light using the wave equation, a good model for the way our receptors work can be explained in terms of Hilbert spaces and orthogonal projections. Indeed, as mentioned previously, the light going through point (x,y,z) in space is a signal. It is useful to think of this signal as some function in L2, the space of square-integrable functions. This space is a (infinite dimensional!) Hilbert space, which means that it has a useful notion of orthogonal projection.
Each receptor can be thought of as a unit vector. For instance, the red receptor would be some vector r of light, whose Fourier transform would be large in the 405 to 480 THz interval, and smaller elsewhere. If we take the Fourier transform of v and plot its absolute value, we obtain whan is called the frequency response curve of the human red receptor.
Then, the amount of "red" present in any color will be the orthogonal projection onto the axis generated by the vector r. In fact, only the magnitude of the orthogonal projection onto r is measured by our receptors. There are two more vectors, one for blue and one for green. Therefore, our color perception is in fact limited to a three-dimensional subspace of the infinite dimensional space of all possible colors.
CIE XYZ color space

One of the first mathematically defined color spaces is the CIE XYZ color space (also known as CIE 1931 color space), created by the International Commission on Illumination at 1931. This color space is based on the Standard Colorimetric Observer functions. The figure shows the related chromaticity diagram with wavelengths in nanometers.
In this diagram, x and y are related to the S, M, and L stimuli under Human tristimulus color space above according to:
- x = L/(S + M + L),
- y = M/(S + M + L).
The values for S, M, and L are obtained by integrating the product of the spectrum of a light beam and the published sensitivity spectra of the three receptors. The z coordinate represents luminosity and is obtained by integrating the product of the light spectrum and a fourth "overall-sensitivity" curve that peaks at green wavelengths. Blue and red wavelengths do not contribute strongly to the luminosity, which is illustrated by the following example: