views:

130

answers:

1

Hi,

I have two problems. I have to calculate two equations:

X = A - inv(B) * Y * inv(B)

and

X = Y + A' * inv(B) * A

where, A, B and Y are known p*p matrices (p can be small or large, depends the situation). Matrices are quite dense, without any structure (except B being non-singular of course).

Is it possible to solve X in those equations without inverting the matrix B? I have to calculate these equations n times, n being hundreds or thousands, and all the matrices change over time.

Thank you very much.

A: 

Memo-ize inv(B), i.e. only invert B when it changes, and keep the inverse around.

If changes to B are small, possibly you could use a delta-approximation.

Mike Dunlavey