sorry if that is a bit cryptic for others, for me it is not. this is the secret 110 pseudo code from the readme files of my quadrophony plug-ins from 2003, which is more verbose than a simple math formula to give you (no, pardon: me) a better picture of what happens and why.
phi is the “relative phase” and phi 0 means that you only take the real output from the transform. and as you can see i also prefer to think of 270° instead of the more common “-90°”
if you would implement that with max or java “L phi 0 plus R phi 180” would simply be “L minus R”, because a phase shift of 180 degrees can be reached by inversion and adding -x is the same as deducting x…
doby b+ stands for “modified dolby b” and it applies to the formula by adding is wherever you want, i.e. you can put it before or after the weighting “√2 times 0.5” (= 0.707107) which means basically “minus 3 decibel”.
the “modified dolby B” was usually in the analog decoder and consists of a special form of compressor, noisegate, corrected for yet another -3db unless you awere using weaker speakers. you mainly needed it for analog sound in cinemas.
while we are on it, you can also add a haas delay for the surround channel in the decoder. not in the studio, where you sit in the hotspot, but at home, where you sit with the back at the wall.
and there is another thing which i left out and that is the actual “logic” of the pro logic system, which is kind of an auto-exaggeration of the L vs R panning contained in the audio signal. it does not make too much sense for music, imho.
so…
Lt = L[φ_0] + C*0.5*√2[φ_0] + S*0.5*√2[bandpass][dolby B+][φ_270]
means that after you recorded or mixed a 4 channel LCRS track you convert it to the left stereo channel for your dolby surround CD by taking the left channel as is, 0.707 percent of the center channel and 0.707 of the surround channel, and each of these channels have to pass a hilbert transform to get those 4 different phase angels before you sum them.
putting the bandpass filters (100-150hz / 7000Hz) in the encoder already is only a proposal of mine, and you can also just leave them out for digitally mixed content and when you later use a digital decoder. in 1984 this was requried because of cheap shit dolby filter components and to make speech better.
damn, i just notice that the times sign in my post vanished and led to italic style.^^ let me see if i can fix this then it might make more sense…
haha, now that i fixed it in code tags the phi φ looks ugly.
p.s.:
these should be the most common quads. there are 11 or 12 but some of the totall suck or there are only 5 recording ever made with it. 
SQ is absolutely incompatible with most others.
QS
Sansui Quadrophonic Sound, Regular Matrix
Encoder
Lt = L*(cos(pi/8))[φ_0] + R*(sin(pi/8))[φ_0] + Lb*(cos(pi/8))[φ_90] + Rb*(sin(pi/8))[φ_90]
Rt = L*(sin(pi/8))[φ_0] + R*(cos(pi/8))[φ_0] + Lb*(sin(pi/8))[φ_270] + Rb*(cos(pi/8))[φ_270]
Decoder
L = Lt*(cos(pi/8))[φ_0] + Rt*(sin(pi/8))[φ_0]
R = Lt*(sin(pi/8))[φ_0] + Rt*(cos(pi/8))[φ_0]
Lb = Lt*(cos(pi/8))[φ_270] + Rt*(sin(pi/8))[φ_90]
Rb = Lt*(sin(pi/8))[φ_90] + Rt*(cos(pi/8))[φ_270]
EV
Electro Voice EV-4, Stereo-4
Encoder
Lt = L*(1.0)[φ_0] + R*(0.3)[φ_0] + Lb*(1.0)[φ_0] + Rb*(0.5)[φ_180]
Rt = L*(0.3)[φ_0] + R*(1.0)[φ_0] + Lb*(0.5)[φ_180] + Rb*(1.0)[φ_0]
Decoder
L = Lt*(1.0)[φ_0] + Rt*(0.2)[φ_0]
R = Lt*(0.2)[φ_0] + Rt*(1.0)[φ_0]
Lb = Lt*(1.0)[φ_0] + Rt*(0.8)[φ_180]
Rb = Lt*(0.8)[φ_180] + Rt*(1.0)[φ_0]
DQ
Dynaco Dynaquad
Encoder
Lt = L[φ_0] + Lb*(cos(1)/sin(1))[φ_0] + Rb*(1-(cos(1)/sin(1)))[φ_180]
Rt = R[φ_0] + Lb*(1-(cos(1)/sin(1)))[φ_180] + Rb*(cos(1)/sin(1))[φ_0]
Decoder
L = Lt[φ_0]
R = Rt[φ_0]
Lb = Lt[φ_0] + Rt[φ_180]
Rb = Lt[φ_180] + Rt[φ_0]