[Math] Find matrix $P$ such that $P^{-1}AP=B$

linear algebramatricesmatrix equations

Given $$A = \begin{bmatrix}
1 & 0 & 0 \\
0 & 2 & -3 \\
1 & 3 & 2 \end{bmatrix}$$ $$B= \begin{bmatrix}
1 & 0 & 0 \\
0 & 2 & -3 \\
0 & 3 & 2 \end{bmatrix}$$ find $P$ such that $P^{-1} A P = B$.

Firstly I said that $AP=PB$

Solved the 9 equations in 9 unknowns. and got that:

$$P= \left( \begin{array}{ccc}
-10x & 0 & 0 \\
3x & y & z \\
x & -z & y \end{array} \right)$$

Then I used computer to find $P^{-1}$ in terms of those unknowns and plugged it back in to

$P^{-1}AP=B$

Compared the coefficients and i end up with
$B= \left( \begin{array}{ccc}
1 & 0 & 0 \\
-z/10x & 2 & -3 \\
1-y/10x & 3 & 2 \end{array} \right) $

Set $x=1$, $y=10$, $z=0$ and indeed $P^{-1}AP=B$

The doubts I am having is the fact that P is not unique. I could set x,y,z to different numbers.

Can anyone explain this? Thank you.

Best Answer

The computation is correct, and we cannot expect that $P$ is unique in general. A somewhat extreme case is $A=B=0$, where any invertible $P$ will do.