Master Keying Matrix Formula