I found this great stuff that helped me understanding and implementing panning for two channels. Does it make sense to make panning for more than two channels (3, 4, 5, 7, or even 9)? What are benefits? Could you provide background theory and formulas behind this topic?
The theory you found at the CMU article explains things very well - particularly when looking at the differences between linear and constant power panning.
In every case you are "panning" a mono signal across two or more output channels using some sort of control surface.
in the case of 2 or 3 channels the ideal control would be a "rotary knob" where you are able to dial in the pan positioning. Anything more than 3 channels would require an additional "knob" giving access to a second "dimension" of panning. In reality this is implemented using a joystick, but initially it's easier to understand the extrapolation of panning using a two-knob model.
If you can understand the panning of a mono signal across two or three channels using the techniques outlined in the CMU article, extension to 4, 5, 6, 7 or 9 channels is actually just a case of implementing that second dimension of panning.
Your axioms in panning are a basic two channel or three channel panner.
Everything else can be derived from these.
For instance a 4-channel panner is basically an X/Y panner based on two 2-channel panners.
4 Channel Panner
6 Channel Panner
9 Channel Panner
This should be enough to allow you to derive everything else.