# Solving for B matrix in terms of A. Can someone check my answer?

1. Sep 15, 2012

### thepatient

1. The problem statement, all variables and given/known data

Suppose P is invertible and A = PBP^-1. Solve for B in terms of A.

2. Relevant equations

(AB)^-1 = B^-1*A^-1

3. The attempt at a solution

multiply from the left of each side of the equation by P^-1:
P^-1 *A = BP^-1

Take the inverse of both sides:

(P^-1*A)^-1 = (BP^-1)^-1
A^-1 * P = P*B^-1

Multiply from the left of each side of the equation by P^-1:
P^-1*A^-1*P = B^-1

Take the inverse of both sides:

[P^-1(A^-1*P)]^-1 = B

B = (A^-1*P)^-1*P
B = P^-1 *A * P

Is that correct?

2. Sep 15, 2012

### LCKurtz

Yes, it looks OK but is much more complicated than it needs to be. At the first step where you have $P^{-1}A= BP^{-1}$ just multiply by $P$ on the right.

3. Sep 15, 2012

### thepatient

Hahaaaa. That's right. Thanks. :]

4. Sep 15, 2012

### thepatient

I wasn't sure if you can multiply from the right too.

5. Sep 15, 2012

### Ray Vickson

Why not? Two matrices can be multiplied as long as their row and column numbers match up properly. If all three of A, B and P (and P^(-1)) are nxn they can be multiplied in any order.

RGV