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.
Using SymPy:
If $\rm A X - X B = O_3$, we have an underdetermined homogeneous system of $3^2 - 1$ linear equations in $3^2$ unknowns. Thus, we have at least $1$ degree of freedom. We vectorize the matrix equation
$$\left( \mathrm I_3 \otimes \mathrm A - \mathrm B^{\top} \otimes \mathrm I_3 \right) \mbox{vec} (\mathrm X) = 0_9$$
and let $\mathrm M := \mathrm I_3 \otimes \mathrm A - \mathrm B^{\top} \otimes \mathrm I_3$. Using SymPy:
Hence, we have $3^2 - 6 = 3$ degrees of freedom.