If A is a square matrix, A\B is roughly the same as inv(A)*B, except it is computed in a different way.
Now your I-((1-alpha)*P) is certainly square, so you should be able to replace inv(I-((1-alpha)*P)) * Q by
(but see below.)
When we scan further left to inv(B) we encounter a problem: you have B as n x m, not as square, so inv(B) does not exist, which leads to questions about the correctness of your original formula. You can have B on the left side of the "\" operator (the meaning is well defined) but you should reconsider your formula to see whether it makes sense. You might need to put () around portions, for example.
You need to be cautious because MATLAB processes operations of equal priority from left to right. Your formula
alpha * inv(B) * Q' * inv(I-((1-alpha)*P)) * Q
would be interpreted as
(((alpha * inv(B)) * Q') * inv(I-((1-alpha)*P))) * Q
Algebraically, with matrix multiplication, (A * B) * C is the same as A * (B * C), but numerically they are not the same. (alpha * (inv(B) * Q')) differs from ((alpha * inv(B)) * Q') proportional to eps(alpha^max(m,n)) [I think it is -- I could be wrong.] You thus need to consider the order you do the calculations in. For example, perhaps instead of using X * ((I-((1-alpha)*P)) \ Q) you should instead use (X / (I-((1-alpha)*P))) * Q
Best Answer