Ok well I think I somewhat understand now. However I might be tempted to dump the matrices altogether and set up three pairs of vectors for the gyroscopes and then calculate everything with cross-products and dot-products. I'm not really familial with the hardware though. For instance as far as I know the only way a gyro won't move is if you are rotating around it's axis. So it seems to me that at least two of the gyros will always be moving if you are changing orientation, but I guess maybe the computer combines the 3 gyros input and gives you the solution.
In any case I'm still betting you could do it a much easier way.