How can Bob decrypt the message?
Since Alice specified that she was going to use 3-by-3 secret matrix and we have a decrypted matrix and its pre-decrypted matrix, we can solve for secret matirx by multiplying encrypted matrix by inverse of decrypted matrix
format rat A=[1 0 4;0 1 0;1 0 1]; B=[2 0 0;0 1 0;0 0 3]; secret= B*inv(A) % secret = % % -2/3 0 8/3 % 0 1 0 % 1 0 -1 %