Other writeups have stated that CDMA is based around `codes'; these codes may be described as sets of m n-element vectors of real numbers. We then assign one code Ci to each of the m users. We can choose the codes arbitrarily; the only requirement is that
    Ci·Cj = 0   for i ≠ j
Here Ci is a vector in Rn, and the · symbol denotes the dot product. This is the magical property that allows many different users to transmit on the same channel at the same time without interfering with each other. Geometrically, this means that the vectors representing the codes assigned to any pair of users must be perpendicular, or orthogonal. The vectors {Ci} therefore form a basis of an m-dimensional vector space.

It isn't very difficult to come up with codes that satisfy this property. For example, let m = n = 3. At this point we are just looking for a basis for R3; an obvious choice is

    T1 = i = (1, 0, 0)
    T2 = j = (0, 1, 0)
    T3 = k = (0, 0, 1)
This is just an ordinary Cartesian coordinate system, but clearly these satisfy the orthogonality requirement. We can generalize this to any n and m ≤ n: just let the ith component of Ci equal 1, and let all the other components equal zero.

So what kind of code is this? We see that only T1 has a non-zero first component, only T2 has a non-zero second component, and so on. In physical terms, that means that only the user assigned to Ti gets to transmit in the ith `time slot'. But that is just TDMA; TDMA is therefore a special case of CDMA.

Alternately, we might remember from a class on Fourier transforms that

    1
    /
    | cos(2πit) cos(2πjt) dt = 0 ,  i ≠ j
    /
    0
We can approximate the integral as a summation:
    n-1    
    ---
    \   cos(2πi (k/n)) cos(2πj (k/n)) ≈ 0 ,  i ≠ j
    /--
    k=0 
The Nyquist theorem tells us that as long as a < n/2 we aren't even approximating, and the summation is exactly equal to zero. In any case this summation is just the dot product of two vectors Fi and Fj, where Fa is an n-element vector such that its kth component is equal to
    cos(2πa ((k-1)/n))
Clearly the set {F0, F1, F2, ...} is orthogonal. So now we are sharing our channel by modulating each user's message with a different sinusoid, and each value of a corresponds to a different frequency. That is just FDMA; FDMA is therefore a special case of CDMA.

In practice we can come up with much better codes than these. Otherwise there wouldn't be much point to the way that CDMA is typically implemented, which involves huge amounts of digital signal processing. However, the math behind CDMA holds for any multiple-access system in which the receivers correlate the received signal against the `reference waveforms', and that is almost any practical multiple-access scheme.


Actually it should be obvious that everyone is glossing over a lot of details here. We are dealing entirely with vectors of real numbers, and it is not possible to connect n real numbers to an antenna. Electromagnetic fields are described as functions of time, not vectors in Rn. It turns out that it is possible to define a vector space of functions. Then we can map our vectors in Rn into signals that can be sent over the air, and everything in this node becomes useful and rigorous.

Further confusing things, Qualcomm has a set of standards with CDMA in the name (like CDMA2000, also known as 1x). These don't just specify the modulation scheme; they specify everything, including stuff like how long a phone number can be. They do, of course, use CDMA for the modulation.